/** * plotly.js v4.1.1 * Copyright 2012-2026, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { "use strict";var Plotly=(()=>{var B1t=Object.create;var S6=Object.defineProperty,q1t=Object.defineProperties,O1t=Object.getOwnPropertyDescriptor,N1t=Object.getOwnPropertyDescriptors,U1t=Object.getOwnPropertyNames,tC=Object.getOwnPropertySymbols,V1t=Object.getPrototypeOf,pN=Object.prototype.hasOwnProperty,Vse=Object.prototype.propertyIsEnumerable;var dN=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),G1t=e=>{throw TypeError(e)};var Use=(e,t,r)=>t in e?S6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fn=(e,t)=>{for(var r in t||(t={}))pN.call(t,r)&&Use(e,r,t[r]);if(tC)for(var r of tC(t))Vse.call(t,r)&&Use(e,r,t[r]);return e},ma=(e,t)=>q1t(e,N1t(t));var Gse=(e,t)=>{var r={};for(var i in e)pN.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&tC)for(var i of tC(e))t.indexOf(i)<0&&Vse.call(e,i)&&(r[i]=e[i]);return r};var Ea=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var W=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Fp=(e,t)=>{for(var r in t)S6(e,r,{get:t[r],enumerable:!0})},Hse=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of U1t(t))!pN.call(e,n)&&n!==r&&S6(e,n,{get:()=>t[n],enumerable:!(i=O1t(t,n))||i.enumerable});return e};var nd=(e,t,r)=>(r=e!=null?B1t(V1t(e)):{},Hse(t||!e||!e.__esModule?S6(r,"default",{value:e,enumerable:!0}):r,e)),Go=e=>Hse(S6({},"__esModule",{value:!0}),e);var Ki=(e,t,r)=>new Promise((i,n)=>{var a=l=>{try{s(r.next(l))}catch(u){n(u)}},o=l=>{try{s(r.throw(l))}catch(u){n(u)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,o);s((r=r.apply(e,t)).next())}),H1t=function(e,t){this[0]=e,this[1]=t};var jse=e=>{var t=e[dN("asyncIterator")],r=!1,i,n={};return t==null?(t=e[dN("iterator")](),i=a=>n[a]=o=>t[a](o)):(t=t.call(e),i=a=>n[a]=o=>{if(r){if(r=!1,a==="throw")throw o;return o}return r=!0,{done:!1,value:new H1t(new Promise(s=>{var l=t[a](o);l instanceof Object||G1t("Object expected"),s(l)}),1)}}),n[dN("iterator")]=()=>n,i("next"),"throw"in t?i("throw"):n.throw=a=>{throw a},"return"in t&&i("return"),n};var E6=W($se=>{"use strict";$se.version="4.1.1"});var Yse=W((Wse,rC)=>{(function(t,r,i){r[t]=r[t]||i(),typeof rC!="undefined"&&rC.exports&&(rC.exports=r[t])})("Promise",typeof window!="undefined"?window:Wse,function(){"use strict";var t,r,i,n=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(w,b,_,M){return Object.defineProperty(w,b,{value:_,writable:!0,configurable:M!==!1})}}catch(g){t=function(b,_,M){return b[_]=M,b}}i=(function(){var w,b,_;function M(x,T){this.fn=x,this.self=T,this.next=void 0}return{add:function(T,A){_=new M(T,A),b?b.next=_:w=_,b=_,_=void 0},drain:function(){var T=w;for(w=b=r=void 0;T;)T.fn.call(T.self),T=T.next}}})();function o(g,w){i.add(g,w),r||(r=a(i.drain))}function s(g){var w,b=typeof g;return g!=null&&(b=="object"||b=="function")&&(w=g.then),typeof w=="function"?w:!1}function l(){for(var g=0;g0&&o(l,b))}catch(_){f.call(new d(b),_)}}}function f(g){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=g,w.state=2,w.chain.length>0&&o(l,w))}function h(g,w,b,_){for(var M=0;M{(function(){var e={version:"3.8.2"},t=[].slice,r=function(z){return t.call(z)},i=self.document;function n(z){return z&&(z.ownerDocument||z.document||z).documentElement}function a(z){return z&&(z.ownerDocument&&z.ownerDocument.defaultView||z.document&&z||z.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(z){r=function(N){for(var Z=N.length,ne=new Array(Z);Z--;)ne[Z]=N[Z];return ne}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(z){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(N,Z){s.call(this,N,Z+"")},o.setAttributeNS=function(N,Z,ne){l.call(this,N,Z,ne+"")},u.setProperty=function(N,Z,ne){c.call(this,N,Z+"",ne)}}e.ascending=f;function f(z,N){return zN?1:z>=N?0:NaN}e.descending=function(z,N){return Nz?1:N>=z?0:NaN},e.min=function(z,N){var Z=-1,ne=z.length,le,fe;if(arguments.length===1){for(;++Z=fe){le=fe;break}for(;++Zfe&&(le=fe)}else{for(;++Z=fe){le=fe;break}for(;++Zfe&&(le=fe)}return le},e.max=function(z,N){var Z=-1,ne=z.length,le,fe;if(arguments.length===1){for(;++Z=fe){le=fe;break}for(;++Zle&&(le=fe)}else{for(;++Z=fe){le=fe;break}for(;++Zle&&(le=fe)}return le},e.extent=function(z,N){var Z=-1,ne=z.length,le,fe,De;if(arguments.length===1){for(;++Z=fe){le=De=fe;break}for(;++Zfe&&(le=fe),De=fe){le=De=fe;break}for(;++Zfe&&(le=fe),De1)return De/(ze-1)},e.deviation=function(){var z=e.variance.apply(this,arguments);return z&&Math.sqrt(z)};function p(z){return{left:function(N,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=N.length);ne>>1;z(N[fe],Z)<0?ne=fe+1:le=fe}return ne},right:function(N,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=N.length);ne>>1;z(N[fe],Z)>0?le=fe:ne=fe+1}return ne}}}var v=p(f);e.bisectLeft=v.left,e.bisect=e.bisectRight=v.right,e.bisector=function(z){return p(z.length===1?function(N,Z){return f(z(N),Z)}:z)},e.shuffle=function(z,N,Z){(ne=arguments.length)<3&&(Z=z.length,ne<2&&(N=0));for(var ne=Z-N,le,fe;ne;)fe=Math.random()*ne--|0,le=z[ne+N],z[ne+N]=z[fe+N],z[fe+N]=le;return z},e.permute=function(z,N){for(var Z=N.length,ne=new Array(Z);Z--;)ne[Z]=z[N[Z]];return ne},e.pairs=function(z){for(var N=0,Z=z.length-1,ne,le=z[0],fe=new Array(Z<0?0:Z);N=0;)for(De=z[N],Z=De.length;--Z>=0;)fe[--le]=De[Z];return fe};var g=Math.abs;e.range=function(z,N,Z){if(arguments.length<3&&(Z=1,arguments.length<2&&(N=z,z=0)),(N-z)/Z===1/0)throw new Error("infinite range");var ne=[],le=w(g(Z)),fe=-1,De;if(z*=le,N*=le,Z*=le,Z<0)for(;(De=z+Z*++fe)>N;)ne.push(De/le);else for(;(De=z+Z*++fe)=N.length)return le?le.call(z,ze):ne?ze.sort(ne):ze;for(var We=-1,ft=ze.length,ht=N[He++],Ot,jt,pt,Dt=new _,zt;++We=N.length)return me;var He=[],We=Z[ze++];return me.forEach(function(ft,ht){He.push({key:ft,values:De(ht,ze)})}),We?He.sort(function(ft,ht){return We(ft.key,ht.key)}):He}return z.map=function(me,ze){return fe(ze,me,0)},z.entries=function(me){return De(fe(e.map,me,0),0)},z.key=function(me){return N.push(me),z},z.sortKeys=function(me){return Z[N.length-1]=me,z},z.sortValues=function(me){return ne=me,z},z.rollup=function(me){return le=me,z},z},e.set=function(z){var N=new D;if(z)for(var Z=0,ne=z.length;Z=0&&(ne=z.slice(Z+1),z=z.slice(0,Z)),z)return arguments.length<2?this[z].on(ne):this[z].on(ne,N);if(arguments.length===2){if(N==null)for(z in this)this.hasOwnProperty(z)&&this[z].on(ne,null);return this}};function O(z){var N=[],Z=new _;function ne(){for(var le=N,fe=-1,De=le.length,me;++fe=0&&(Z=z.slice(0,N))!=="xmlns"&&(z=z.slice(N+1)),ce.hasOwnProperty(Z)?{space:ce[Z],local:z}:z}},H.attr=function(z,N){if(arguments.length<2){if(typeof z=="string"){var Z=this.node();return z=e.ns.qualify(z),z.local?Z.getAttributeNS(z.space,z.local):Z.getAttribute(z)}for(N in z)this.each(ge(N,z[N]));return this}return this.each(ge(z,N))};function ge(z,N){z=e.ns.qualify(z);function Z(){this.removeAttribute(z)}function ne(){this.removeAttributeNS(z.space,z.local)}function le(){this.setAttribute(z,N)}function fe(){this.setAttributeNS(z.space,z.local,N)}function De(){var ze=N.apply(this,arguments);ze==null?this.removeAttribute(z):this.setAttribute(z,ze)}function me(){var ze=N.apply(this,arguments);ze==null?this.removeAttributeNS(z.space,z.local):this.setAttributeNS(z.space,z.local,ze)}return N==null?z.local?ne:Z:typeof N=="function"?z.local?me:De:z.local?fe:le}function Ce(z){return z.trim().replace(/\s+/g," ")}H.classed=function(z,N){if(arguments.length<2){if(typeof z=="string"){var Z=this.node(),ne=(z=he(z)).length,le=-1;if(N=Z.classList){for(;++le=0;)(fe=Z[ne])&&(le&&le!==fe.nextSibling&&le.parentNode.insertBefore(fe,le),le=fe);return this},H.sort=function(z){z=pe.apply(this,arguments);for(var N=-1,Z=this.length;++N=N&&(N=le+1);!(ze=De[N])&&++N0&&(z=z.slice(0,le));var De=Ie.get(z);De&&(z=De,fe=Qe);function me(){var We=this[ne];We&&(this.removeEventListener(z,We,We.$),delete this[ne])}function ze(){var We=fe(N,r(arguments));me.call(this),this.addEventListener(z,this[ne]=We,We.$=Z),We._=N}function He(){var We=new RegExp("^__on([^.]+)"+e.requote(z)+"$"),ft;for(var ht in this)if(ft=ht.match(We)){var Ot=this[ht];this.removeEventListener(ft[1],Ot,Ot.$),delete this[ht]}}return le?N?ze:me:N?I:He}var Ie=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Ie.forEach(function(z){"on"+z in i&&Ie.remove(z)});function Oe(z,N){return function(Z){var ne=e.event;e.event=Z,N[0]=this.__data__;try{z.apply(this,N)}finally{e.event=ne}}}function Qe(z,N){var Z=Oe(z,N);return function(ne){var le=this,fe=ne.relatedTarget;(!fe||fe!==le&&!(fe.compareDocumentPosition(le)&8))&&Z.call(le,ne)}}var et,_t=0;function ut(z){var N=".dragsuppress-"+ ++_t,Z="click"+N,ne=e.select(a(z)).on("touchmove"+N,$).on("dragstart"+N,$).on("selectstart"+N,$);if(et==null&&(et="onselectstart"in z?!1:R(z.style,"userSelect")),et){var le=n(z).style,fe=le[et];le[et]="none"}return function(De){if(ne.on(N,null),et&&(le[et]=fe),De){var me=function(){ne.on(Z,null)};ne.on(Z,function(){$(),me()},!0),setTimeout(me,0)}}}e.mouse=function(z){return Xe(z,Y())};var vt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Xe(z,N){N.changedTouches&&(N=N.changedTouches[0]);var Z=z.ownerSVGElement||z;if(Z.createSVGPoint){var ne=Z.createSVGPoint();if(vt<0){var le=a(z);if(le.scrollX||le.scrollY){Z=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var fe=Z[0][0].getScreenCTM();vt=!(fe.f||fe.e),Z.remove()}}return vt?(ne.x=N.pageX,ne.y=N.pageY):(ne.x=N.clientX,ne.y=N.clientY),ne=ne.matrixTransform(z.getScreenCTM().inverse()),[ne.x,ne.y]}var De=z.getBoundingClientRect();return[N.clientX-De.left-z.clientLeft,N.clientY-De.top-z.clientTop]}e.touch=function(z,N,Z){if(arguments.length<3&&(Z=N,N=Y().changedTouches),N){for(var ne=0,le=N.length,fe;ne0?1:z<0?-1:0}function Xt(z,N,Z){return(N[0]-z[0])*(Z[1]-z[1])-(N[1]-z[1])*(Z[0]-z[0])}function Vt(z){return z>1?0:z<-1?Ue:Math.acos(z)}function lr(z){return z>1?Re:z<-1?-Re:Math.asin(z)}function ur(z){return((z=Math.exp(z))-1/z)/2}function Bt(z){return((z=Math.exp(z))+1/z)/2}function Zt(z){return((z=Math.exp(2*z))-1)/(z+1)}function kr(z){return(z=Math.sin(z/2))*z}var $e=Math.SQRT2,tt=2,st=4;e.interpolateZoom=function(z,N){var Z=z[0],ne=z[1],le=z[2],fe=N[0],De=N[1],me=N[2],ze=fe-Z,He=De-ne,We=ze*ze+He*He,ft,ht;if(We0&&(oi=oi.transition().duration(De)),oi.call(Yt.event)}function Li(){Dt&&Dt.domain(pt.range().map(function(oi){return(oi-z.x)/z.k}).map(pt.invert)),$t&&$t.domain(zt.range().map(function(oi){return(oi-z.y)/z.k}).map(zt.invert))}function Pi(oi){me++||oi({type:"zoomstart"})}function Rn(oi){Li(),oi({type:"zoom",scale:z.k,translate:[z.x,z.y]})}function Gi(oi){--me||(oi({type:"zoomend"}),Z=null)}function kn(){var oi=this,zn=jt.of(oi,arguments),Yn=0,qa=e.select(a(oi)).on(He,Mu).on(We,Zu),gs=Lt(e.mouse(oi)),Tl=ut(oi);Dn.call(oi),Pi(zn);function Mu(){Yn=1,ri(e.mouse(oi),gs),Rn(zn)}function Zu(){qa.on(He,null).on(We,null),Tl(Yn),Gi(zn)}}function Ua(){var oi=this,zn=jt.of(oi,arguments),Yn={},qa=0,gs,Tl=".zoom-"+e.event.changedTouches[0].identifier,Mu="touchmove"+Tl,Zu="touchend"+Tl,Wc=[],Be=e.select(oi),gt=ut(oi);or(),Pi(zn),Be.on(ze,null).on(ht,or);function Mt(){var dr=e.touches(oi);return gs=z.k,dr.forEach(function(Br){Br.identifier in Yn&&(Yn[Br.identifier]=Lt(Br))}),dr}function or(){var dr=e.event.target;e.select(dr).on(Mu,vr).on(Zu,wr),Wc.push(dr);for(var Br=e.event.changedTouches,Zr=0,Kr=Br.length;Zr1){var Oi=Jr[0],mi=Jr[1],Fr=Oi[0]-mi[0],Qt=Oi[1]-mi[1];qa=Fr*Fr+Qt*Qt}}function vr(){var dr=e.touches(oi),Br,Zr,Kr,Jr;Dn.call(oi);for(var un=0,Oi=dr.length;un1?1:N,Z=Z<0?0:Z>1?1:Z,le=Z<=.5?Z*(1+N):Z+N-Z*N,ne=2*Z-le;function fe(me){return me>360?me-=360:me<0&&(me+=360),me<60?ne+(le-ne)*me/60:me<180?le:me<240?ne+(le-ne)*(240-me)/60:ne}function De(me){return Math.round(fe(me)*255)}return new ka(De(z+120),De(z),De(z-120))}e.hcl=ei;function ei(z,N,Z){return this instanceof ei?(this.h=+z,this.c=+N,void(this.l=+Z)):arguments.length<2?z instanceof ei?new ei(z.h,z.c,z.l):z instanceof Tn?ds(z.l,z.a,z.b):ds((z=ul((z=e.rgb(z)).r,z.g,z.b)).l,z.a,z.b):new ei(z,N,Z)}var Lr=ei.prototype=new ir;Lr.brighter=function(z){return new ei(this.h,this.c,Math.min(100,this.l+hn*(arguments.length?z:1)))},Lr.darker=function(z){return new ei(this.h,this.c,Math.max(0,this.l-hn*(arguments.length?z:1)))},Lr.rgb=function(){return $i(this.h,this.c,this.l).rgb()};function $i(z,N,Z){return isNaN(z)&&(z=0),isNaN(N)&&(N=0),new Tn(Z,Math.cos(z*=Ve)*N,Math.sin(z)*N)}e.lab=Tn;function Tn(z,N,Z){return this instanceof Tn?(this.l=+z,this.a=+N,void(this.b=+Z)):arguments.length<2?z instanceof Tn?new Tn(z.l,z.a,z.b):z instanceof ei?$i(z.h,z.c,z.l):ul((z=ka(z)).r,z.g,z.b):new Tn(z,N,Z)}var hn=18,ta=.95047,ca=1,dn=1.08883,Vn=Tn.prototype=new ir;Vn.brighter=function(z){return new Tn(Math.min(100,this.l+hn*(arguments.length?z:1)),this.a,this.b)},Vn.darker=function(z){return new Tn(Math.max(0,this.l-hn*(arguments.length?z:1)),this.a,this.b)},Vn.rgb=function(){return ra(this.l,this.a,this.b)};function ra(z,N,Z){var ne=(z+16)/116,le=ne+N/500,fe=ne-Z/200;return le=mo(le)*ta,ne=mo(ne)*ca,fe=mo(fe)*dn,new ka(ho(3.2404542*le-1.5371385*ne-.4985314*fe),ho(-.969266*le+1.8760108*ne+.041556*fe),ho(.0556434*le-.2040259*ne+1.0572252*fe))}function ds(z,N,Z){return z>0?new ei(Math.atan2(Z,N)*ct,Math.sqrt(N*N+Z*Z),z):new ei(NaN,NaN,z)}function mo(z){return z>.206893034?z*z*z:(z-4/29)/7.787037}function Rs(z){return z>.008856?Math.pow(z,1/3):7.787037*z+4/29}function ho(z){return Math.round(255*(z<=.00304?12.92*z:1.055*Math.pow(z,1/2.4)-.055))}e.rgb=ka;function ka(z,N,Z){return this instanceof ka?(this.r=~~z,this.g=~~N,void(this.b=~~Z)):arguments.length<2?z instanceof ka?new ka(z.r,z.g,z.b):_l(""+z,ka,si):new ka(z,N,Z)}function ao(z){return new ka(z>>16,z>>8&255,z&255)}function zs(z){return ao(z)+""}var _a=ka.prototype=new ir;_a.brighter=function(z){z=Math.pow(.7,arguments.length?z:1);var N=this.r,Z=this.g,ne=this.b,le=30;return!N&&!Z&&!ne?new ka(le,le,le):(N&&N>4,ne=ne>>4|ne,le=ze&240,le=le>>4|le,fe=ze&15,fe=fe<<4|fe):z.length===7&&(ne=(ze&16711680)>>16,le=(ze&65280)>>8,fe=ze&255)),N(ne,le,fe))}function yu(z,N,Z){var ne=Math.min(z/=255,N/=255,Z/=255),le=Math.max(z,N,Z),fe=le-ne,De,me,ze=(le+ne)/2;return fe?(me=ze<.5?fe/(le+ne):fe/(2-le-ne),z==le?De=(N-Z)/fe+(N0&&ze<1?0:De),new hr(De,me,ze)}function ul(z,N,Z){z=Le(z),N=Le(N),Z=Le(Z);var ne=Rs((.4124564*z+.3575761*N+.1804375*Z)/ta),le=Rs((.2126729*z+.7151522*N+.072175*Z)/ca),fe=Rs((.0193339*z+.119192*N+.9503041*Z)/dn);return Tn(116*le-16,500*(ne-le),200*(le-fe))}function Le(z){return(z/=255)<=.04045?z/12.92:Math.pow((z+.055)/1.055,2.4)}function ot(z){var N=parseFloat(z);return z.charAt(z.length-1)==="%"?Math.round(N*2.55):N}var lt=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});lt.forEach(function(z,N){lt.set(z,ao(N))});function kt(z){return typeof z=="function"?z:function(){return z}}e.functor=kt,e.xhr=Jt(F);function Jt(z){return function(N,Z,ne){return arguments.length===2&&typeof Z=="function"&&(ne=Z,Z=null),Rt(N,Z,z,ne)}}function Rt(z,N,Z,ne){var le={},fe=e.dispatch("beforesend","progress","load","error"),De={},me=new XMLHttpRequest,ze=null;self.XDomainRequest&&!("withCredentials"in me)&&/^(http(s)?:)?\/\//.test(z)&&(me=new XDomainRequest),"onload"in me?me.onload=me.onerror=He:me.onreadystatechange=function(){me.readyState>3&&He()};function He(){var We=me.status,ft;if(!We&&Wt(me)||We>=200&&We<300||We===304){try{ft=Z.call(le,me)}catch(ht){fe.error.call(le,ht);return}fe.load.call(le,ft)}else fe.error.call(le,me)}return me.onprogress=function(We){var ft=e.event;e.event=We;try{fe.progress.call(le,me)}finally{e.event=ft}},le.header=function(We,ft){return We=(We+"").toLowerCase(),arguments.length<2?De[We]:(ft==null?delete De[We]:De[We]=ft+"",le)},le.mimeType=function(We){return arguments.length?(N=We==null?null:We+"",le):N},le.responseType=function(We){return arguments.length?(ze=We,le):ze},le.response=function(We){return Z=We,le},["get","post"].forEach(function(We){le[We]=function(){return le.send.apply(le,[We].concat(r(arguments)))}}),le.send=function(We,ft,ht){if(arguments.length===2&&typeof ft=="function"&&(ht=ft,ft=null),me.open(We,z,!0),N!=null&&!("accept"in De)&&(De.accept=N+",*/*"),me.setRequestHeader)for(var Ot in De)me.setRequestHeader(Ot,De[Ot]);return N!=null&&me.overrideMimeType&&me.overrideMimeType(N),ze!=null&&(me.responseType=ze),ht!=null&&le.on("error",ht).on("load",function(jt){ht(null,jt)}),fe.beforesend.call(le,me),me.send(ft==null?null:ft),le},le.abort=function(){return me.abort(),le},e.rebind(le,fe,"on"),ne==null?le:le.get(Tr(ne))}function Tr(z){return z.length===1?function(N,Z){z(N==null?Z:null)}:z}function Wt(z){var N=z.responseType;return N&&N!=="text"?z.response:z.responseText}e.dsv=function(z,N){var Z=new RegExp('["'+z+` ]`),ne=z.charCodeAt(0);function le(He,We,ft){arguments.length<3&&(ft=We,We=null);var ht=Rt(He,N,We==null?fe:De(We),ft);return ht.row=function(Ot){return arguments.length?ht.response((We=Ot)==null?fe:De(Ot)):We},ht}function fe(He){return le.parse(He.responseText)}function De(He){return function(We){return le.parse(We.responseText,He)}}le.parse=function(He,We){var ft;return le.parseRows(He,function(ht,Ot){if(ft)return ft(ht,Ot-1);var jt=function(pt){for(var Dt={},zt=ht.length,$t=0;$t=jt)return ht;if($t)return $t=!1,ft;var Cr=pt;if(He.charCodeAt(Cr)===34){for(var Gr=Cr;Gr++24?(isFinite(N)&&(clearTimeout(Mi),Mi=setTimeout(yn,N)),ti=0):(ti=1,an(yn))}e.timer.flush=function(){fa(),Wn()};function fa(){for(var z=Date.now(),N=br;N;)z>=N.t&&N.c(z-N.t)&&(N.c=null),N=N.n;return z}function Wn(){for(var z,N=br,Z=1/0;N;)N.c?(N.t=0;--me)pt.push(le[He[ft[me]][2]]);for(me=+Ot;me1&&Xt(z[Z[ne-2]],z[Z[ne-1]],z[le])<=0;)--ne;Z[ne++]=le}return Z.slice(0,ne)}function Io(z,N){return z[0]-N[0]||z[1]-N[1]}e.geom.polygon=function(z){return q(z,ps),z};var ps=e.geom.polygon.prototype=[];ps.area=function(){for(var z=-1,N=this.length,Z,ne=this[N-1],le=0;++zbt)me=me.L;else if(De=N-dc(me,Z),De>bt){if(!me.R){ne=me;break}me=me.R}else{fe>-bt?(ne=me.P,le=me):De>-bt?(ne=me,le=me.N):ne=le=me;break}var ze=Ol(z);if(so.insert(ne,ze),!(!ne&&!le)){if(ne===le){iu(ne),le=Ol(ne.site),so.insert(ze,le),ze.edge=le.edge=au(ne.site,ze.site),Ss(ne),Ss(le);return}if(!le){ze.edge=au(ne.site,ze.site);return}iu(ne),iu(le);var He=ne.site,We=He.x,ft=He.y,ht=z.x-We,Ot=z.y-ft,jt=le.site,pt=jt.x-We,Dt=jt.y-ft,zt=2*(ht*Dt-Ot*pt),$t=ht*ht+Ot*Ot,Yt=pt*pt+Dt*Dt,Lt={x:(Dt*$t-Ot*Yt)/zt+We,y:(ht*Yt-pt*$t)/zt+ft};Nc(le.edge,He,jt,Lt),ze.edge=au(He,z,null,Lt),le.edge=au(z,jt,null,Lt),Ss(ne),Ss(le)}}function _u(z,N){var Z=z.site,ne=Z.x,le=Z.y,fe=le-N;if(!fe)return ne;var De=z.P;if(!De)return-1/0;Z=De.site;var me=Z.x,ze=Z.y,He=ze-N;if(!He)return me;var We=me-ne,ft=1/fe-1/He,ht=We/He;return ft?(-ht+Math.sqrt(ht*ht-2*ft*(We*We/(-2*He)-ze+He/2+le-fe/2)))/ft+ne:(ne+me)/2}function dc(z,N){var Z=z.N;if(Z)return _u(Z,N);var ne=z.site;return ne.y===N?ne.x:1/0}function Nl(z){this.site=z,this.edges=[]}Nl.prototype.prepare=function(){for(var z=this.edges,N=z.length,Z;N--;)Z=z[N].edge,(!Z.b||!Z.a)&&z.splice(N,1);return z.sort(bu),z.length};function ja(z){for(var N=z[0][0],Z=z[1][0],ne=z[0][1],le=z[1][1],fe,De,me,ze,He=Uo,We=He.length,ft,ht,Ot,jt,pt,Dt;We--;)if(ft=He[We],!(!ft||!ft.prepare()))for(Ot=ft.edges,jt=Ot.length,ht=0;htbt||g(ze-De)>bt)&&(Ot.splice(ht,0,new r0(Cv(ft.site,Dt,g(me-N)bt?{x:N,y:g(fe-N)bt?{x:g(De-le)bt?{x:Z,y:g(fe-Z)bt?{x:g(De-ne)=-Ne)){var ht=ze*ze+He*He,Ot=We*We+Dt*Dt,jt=(Dt*ht-He*Ot)/ft,pt=(ze*Ot-We*ht)/ft,Dt=pt+me,zt=Zs.pop()||new Hu;zt.arc=z,zt.site=le,zt.x=jt+De,zt.y=Dt+Math.sqrt(jt*jt+pt*pt),zt.cy=Dt,z.circle=zt;for(var $t=null,Yt=vs._;Yt;)if(zt.y0)){if(pt/=Ot,Ot<0){if(pt0){if(pt>ht)return;pt>ft&&(ft=pt)}if(pt=Z-me,!(!Ot&&pt<0)){if(pt/=Ot,Ot<0){if(pt>ht)return;pt>ft&&(ft=pt)}else if(Ot>0){if(pt0)){if(pt/=jt,jt<0){if(pt0){if(pt>ht)return;pt>ft&&(ft=pt)}if(pt=ne-ze,!(!jt&&pt<0)){if(pt/=jt,jt<0){if(pt>ht)return;pt>ft&&(ft=pt)}else if(jt>0){if(pt0&&(le.a={x:me+ft*Ot,y:ze+ft*jt}),ht<1&&(le.b={x:me+ht*Ot,y:ze+ht*jt}),le}}}}}}function yo(z){for(var N=Ro,Z=ph(z[0][0],z[0][1],z[1][0],z[1][1]),ne=N.length,le;ne--;)le=N[ne],(!nu(le,z)||!Z(le)||g(le.a.x-le.b.x)=fe)return;if(We>ht){if(!ne)ne={x:jt,y:De};else if(ne.y>=me)return;Z={x:jt,y:me}}else{if(!ne)ne={x:jt,y:me};else if(ne.y1)if(We>ht){if(!ne)ne={x:(De-zt)/Dt,y:De};else if(ne.y>=me)return;Z={x:(me-zt)/Dt,y:me}}else{if(!ne)ne={x:(me-zt)/Dt,y:me};else if(ne.y=fe)return;Z={x:fe,y:Dt*fe+zt}}else{if(!ne)ne={x:fe,y:Dt*fe+zt};else if(ne.x=We&&zt.x<=ht&&zt.y>=ft&&zt.y<=Ot?[[We,Ot],[ht,Ot],[ht,ft],[We,ft]]:[];$t.point=ze[pt]}),He}function me(ze){return ze.map(function(He,We){return{x:Math.round(ne(He,We)/bt)*bt,y:Math.round(le(He,We)/bt)*bt,i:We}})}return De.links=function(ze){return gh(me(ze)).edges.filter(function(He){return He.l&&He.r}).map(function(He){return{source:ze[He.l.i],target:ze[He.r.i]}})},De.triangles=function(ze){var He=[];return gh(me(ze)).cells.forEach(function(We,ft){for(var ht=We.site,Ot=We.edges.sort(bu),jt=-1,pt=Ot.length,Dt,zt,$t=Ot[pt-1].edge,Yt=$t.l===ht?$t.r:$t.l;++jtYt&&(Yt=We.x),We.y>Lt&&(Lt=We.y),Ot.push(We.x),jt.push(We.y);else for(pt=0;ptYt&&(Yt=Cr),Gr>Lt&&(Lt=Gr),Ot.push(Cr),jt.push(Gr)}var ri=Yt-zt,pi=Lt-$t;ri>pi?Lt=$t+ri:Yt=zt+pi;function Li(Gi,kn,Ua,Qs,lo,oi,zn,Yn){if(!(isNaN(Ua)||isNaN(Qs)))if(Gi.leaf){var qa=Gi.x,gs=Gi.y;if(qa!=null)if(g(qa-Ua)+g(gs-Qs)<.01)Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn);else{var Tl=Gi.point;Gi.x=Gi.y=Gi.point=null,Pi(Gi,Tl,qa,gs,lo,oi,zn,Yn),Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}else Gi.x=Ua,Gi.y=Qs,Gi.point=kn}else Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}function Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn){var qa=(lo+zn)*.5,gs=(oi+Yn)*.5,Tl=Ua>=qa,Mu=Qs>=gs,Zu=Mu<<1|Tl;Gi.leaf=!1,Gi=Gi.nodes[Zu]||(Gi.nodes[Zu]=Lv()),Tl?lo=qa:zn=qa,Mu?oi=gs:Yn=gs,Li(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}var Rn=Lv();if(Rn.add=function(Gi){Li(Rn,Gi,+ft(Gi,++pt),+ht(Gi,pt),zt,$t,Yt,Lt)},Rn.visit=function(Gi){Uc(Gi,Rn,zt,$t,Yt,Lt)},Rn.find=function(Gi){return cp(Rn,Gi[0],Gi[1],zt,$t,Yt,Lt)},pt=-1,N==null){for(;++ptfe||ht>De||Ot=Cr,pi=Z>=Gr,Li=pi<<1|ri,Pi=Li+4;LiZ&&(fe=N.slice(Z,fe),me[De]?me[De]+=fe:me[++De]=fe),(ne=ne[0])===(le=le[0])?me[De]?me[De]+=le:me[++De]=le:(me[++De]=null,ze.push({i:De,x:Es(ne,le)})),Z=W0.lastIndex;return Z=0&&!(ne=e.interpolators[Z](z,N)););return ne}e.interpolators=[function(z,N){var Z=typeof N;return(Z==="string"?lt.has(N.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(N)?mh:Vo:N instanceof ir?mh:Array.isArray(N)?a0:Z==="object"&&isNaN(N)?ju:Es)(z,N)}],e.interpolateArray=a0;function a0(z,N){var Z=[],ne=[],le=z.length,fe=N.length,De=Math.min(z.length,N.length),me;for(me=0;me=0?z.slice(0,N):z,ne=N>=0?z.slice(N+1):"in";return Z=ug.get(Z)||Pv,ne=Wm.get(ne)||F,Tx(ne(Z.apply(null,t.call(arguments,1))))};function Tx(z){return function(N){return N<=0?0:N>=1?1:z(N)}}function xh(z){return function(N){return 1-z(1-N)}}function Bs(z){return function(N){return .5*(N<.5?z(2*N):2-z(2-2*N))}}function Iv(z){return z*z}function Rv(z){return z*z*z}function _h(z){if(z<=0)return 0;if(z>=1)return 1;var N=z*z,Z=N*z;return 4*(z<.5?Z:3*(z-N)+Z-.75)}function cg(z){return function(N){return Math.pow(N,z)}}function Y0(z){return 1-Math.cos(z*Re)}function fp(z){return Math.pow(2,10*(z-1))}function hf(z){return 1-Math.sqrt(1-z*z)}function zv(z,N){var Z;return arguments.length<2&&(N=.45),arguments.length?Z=N/Ge*Math.asin(1/z):(z=1,Z=N/4),function(ne){return 1+z*Math.pow(2,-10*ne)*Math.sin((ne-Z)*Ge/N)}}function hp(z){return z||(z=1.70158),function(N){return N*N*((z+1)*N-z)}}function X0(z){return z<1/2.75?7.5625*z*z:z<2/2.75?7.5625*(z-=1.5/2.75)*z+.75:z<2.5/2.75?7.5625*(z-=2.25/2.75)*z+.9375:7.5625*(z-=2.625/2.75)*z+.984375}e.interpolateHcl=fg;function fg(z,N){z=e.hcl(z),N=e.hcl(N);var Z=z.h,ne=z.c,le=z.l,fe=N.h-Z,De=N.c-ne,me=N.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?N.c:ne),isNaN(fe)?(fe=0,Z=isNaN(Z)?N.h:Z):fe>180?fe-=360:fe<-180&&(fe+=360),function(ze){return $i(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateHsl=hg;function hg(z,N){z=e.hsl(z),N=e.hsl(N);var Z=z.h,ne=z.s,le=z.l,fe=N.h-Z,De=N.s-ne,me=N.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?N.s:ne),isNaN(fe)?(fe=0,Z=isNaN(Z)?N.h:Z):fe>180?fe-=360:fe<-180&&(fe+=360),function(ze){return si(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateLab=Ym;function Ym(z,N){z=e.lab(z),N=e.lab(N);var Z=z.l,ne=z.a,le=z.b,fe=N.l-Z,De=N.a-ne,me=N.b-le;return function(ze){return ra(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateRound=Uf;function Uf(z,N){return N-=z,function(Z){return Math.round(z+N*Z)}}e.transform=function(z){var N=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Z){if(Z!=null){N.setAttribute("transform",Z);var ne=N.transform.baseVal.consolidate()}return new Bv(ne?ne.matrix:Z0)})(z)};function Bv(z){var N=[z.a,z.b],Z=[z.c,z.d],ne=dp(N),le=Vf(N,Z),fe=dp(pc(Z,N,-le))||0;N[0]*Z[1]180?N+=360:N-z>180&&(z+=360),ne.push({i:Z.push(Gf(Z)+"rotate(",null,")")-2,x:Es(z,N)})):N&&Z.push(Gf(Z)+"rotate("+N+")")}function pg(z,N,Z,ne){z!==N?ne.push({i:Z.push(Gf(Z)+"skewX(",null,")")-2,x:Es(z,N)}):N&&Z.push(Gf(Z)+"skewX("+N+")")}function Ov(z,N,Z,ne){if(z[0]!==N[0]||z[1]!==N[1]){var le=Z.push(Gf(Z)+"scale(",null,",",null,")");ne.push({i:le-4,x:Es(z[0],N[0])},{i:le-2,x:Es(z[1],N[1])})}else(N[0]!==1||N[1]!==1)&&Z.push(Gf(Z)+"scale("+N+")")}function pp(z,N){var Z=[],ne=[];return z=e.transform(z),N=e.transform(N),dg(z.translate,N.translate,Z,ne),qv(z.rotate,N.rotate,Z,ne),pg(z.skew,N.skew,Z,ne),Ov(z.scale,N.scale,Z,ne),z=N=null,function(le){for(var fe=-1,De=ne.length,me;++fe0?fe=Lt:(Z.c=null,Z.t=NaN,Z=null,N.end({type:"end",alpha:fe=0})):Lt>0&&(N.start({type:"start",alpha:fe=Lt}),Z=Gn(z.tick)),z):fe},z.start=function(){var Lt,Cr=Ot.length,Gr=jt.length,ri=ne[0],pi=ne[1],Li,Pi;for(Lt=0;Lt=0;)fe.push(We=He[ze]),We.parent=me,We.depth=me.depth+1;Z&&(me.value=0),me.children=He}else Z&&(me.value=+Z.call(ne,me,me.depth)||0),delete me.children;return Wu(le,function(ft){var ht,Ot;z&&(ht=ft.children)&&ht.sort(z),Z&&(Ot=ft.parent)&&(Ot.value+=ft.value)}),De}return ne.sort=function(le){return arguments.length?(z=le,ne):z},ne.children=function(le){return arguments.length?(N=le,ne):N},ne.value=function(le){return arguments.length?(Z=le,ne):Z},ne.revalue=function(le){return Z&&(pf(le,function(fe){fe.children&&(fe.value=0)}),Wu(le,function(fe){var De;fe.children||(fe.value=+Z.call(ne,fe,fe.depth)||0),(De=fe.parent)&&(De.value+=fe.value)})),le},ne};function df(z,N){return e.rebind(z,N,"sort","children","value"),z.nodes=z,z.links=vc,z}function pf(z,N){for(var Z=[z];(z=Z.pop())!=null;)if(N(z),(le=z.children)&&(ne=le.length))for(var ne,le;--ne>=0;)Z.push(le[ne])}function Wu(z,N){for(var Z=[z],ne=[];(z=Z.pop())!=null;)if(ne.push(z),(De=z.children)&&(fe=De.length))for(var le=-1,fe,De;++lele&&(le=me),ne.push(me)}for(De=0;Dene&&(Z=N,ne=le);return Z}function _p(z){return z.reduce(s0,0)}function s0(z,N){return z+N[1]}e.layout.histogram=function(){var z=!0,N=Number,Z=Q0,ne=bp;function le(fe,ht){for(var me=[],ze=fe.map(N,this),He=Z.call(this,ze,ht),We=ne.call(this,He,ze,ht),ft,ht=-1,Ot=ze.length,jt=We.length-1,pt=z?1:1/Ot,Dt;++ht0)for(ht=-1;++ht=He[0]&&Dt<=He[1]&&(ft=me[e.bisect(We,Dt,1,jt)-1],ft.y+=pt,ft.push(fe[ht]));return me}return le.value=function(fe){return arguments.length?(N=fe,le):N},le.range=function(fe){return arguments.length?(Z=kt(fe),le):Z},le.bins=function(fe){return arguments.length?(ne=typeof fe=="number"?function(De){return l0(De,fe)}:kt(fe),le):ne},le.frequency=function(fe){return arguments.length?(z=!!fe,le):z},le};function bp(z,N){return l0(z,Math.ceil(Math.log(N.length)/Math.LN2+1))}function l0(z,N){for(var Z=-1,ne=+z[0],le=(z[1]-ne)/N,fe=[];++Z<=N;)fe[Z]=le*Z+ne;return fe}function Q0(z){return[e.min(z),e.max(z)]}e.layout.pack=function(){var z=e.layout.hierarchy().sort(ed),N=0,Z=[1,1],ne;function le(fe,De){var me=z.call(this,fe,De),ze=me[0],He=Z[0],We=Z[1],ft=ne==null?Math.sqrt:typeof ne=="function"?ne:function(){return ne};if(ze.x=ze.y=0,Wu(ze,function(Ot){Ot.r=+ft(Ot.value)}),Wu(ze,ty),N){var ht=N*(ne?1:Math.max(2*ze.r/He,2*ze.r/We))/2;Wu(ze,function(Ot){Ot.r+=ht}),Wu(ze,ty),Wu(ze,function(Ot){Ot.r-=ht})}return Hv(ze,He/2,We/2,ne?1:1/Math.max(2*ze.r/He,2*ze.r/We)),me}return le.size=function(fe){return arguments.length?(Z=fe,le):Z},le.radius=function(fe){return arguments.length?(ne=fe==null||typeof fe=="function"?fe:+fe,le):ne},le.padding=function(fe){return arguments.length?(N=+fe,le):N},df(le,z)};function ed(z,N){return z.value-N.value}function wp(z,N){var Z=z._pack_next;z._pack_next=N,N._pack_prev=z,N._pack_next=Z,Z._pack_prev=N}function mg(z,N){z._pack_next=N,N._pack_prev=z}function Gv(z,N){var Z=N.x-z.x,ne=N.y-z.y,le=z.r+N.r;return .999*le*le>Z*Z+ne*ne}function ty(z){if(!(N=z.children)||!(ht=N.length))return;var N,Z=1/0,ne=-1/0,le=1/0,fe=-1/0,De,me,ze,He,We,ft,ht;function Ot(Lt){Z=Math.min(Lt.x-Lt.r,Z),ne=Math.max(Lt.x+Lt.r,ne),le=Math.min(Lt.y-Lt.r,le),fe=Math.max(Lt.y+Lt.r,fe)}if(N.forEach(ry),De=N[0],De.x=-De.r,De.y=0,Ot(De),ht>1&&(me=N[1],me.x=me.r,me.y=0,Ot(me),ht>2))for(ze=N[2],cl(De,me,ze),Ot(ze),wp(De,ze),De._pack_prev=ze,wp(ze,me),me=De._pack_next,He=3;HeDt.x&&(Dt=Cr),Cr.depth>zt.depth&&(zt=Cr)});var $t=N(pt,Dt)/2-pt.x,Yt=Z[0]/(Dt.x+N(Dt,pt)/2+$t),Lt=Z[1]/(zt.depth||1);pf(Ot,function(Cr){Cr.x=(Cr.x+$t)*Yt,Cr.y=Cr.depth*Lt})}return ht}function fe(We){for(var ft={A:null,children:[We]},ht=[ft],Ot;(Ot=ht.pop())!=null;)for(var jt=Ot.children,pt,Dt=0,zt=jt.length;Dt0&&(Ap(Te(pt,We,ht),We,Cr),zt+=Cr,$t+=Cr),Yt+=pt.m,zt+=Ot.m,Lt+=Dt.m,$t+=jt.m;pt&&!xg(jt)&&(jt.t=pt,jt.m+=Yt-$t),Ot&&!Tp(Dt)&&(Dt.t=Ot,Dt.m+=zt-Lt,ht=We)}return ht}function He(We){We.x*=Z[0],We.y=We.depth*Z[1]}return le.separation=function(We){return arguments.length?(N=We,le):N},le.size=function(We){return arguments.length?(ne=(Z=We)==null?He:null,le):ne?null:Z},le.nodeSize=function(We){return arguments.length?(ne=(Z=We)==null?null:He,le):ne?Z:null},df(le,z)};function Gc(z,N){return z.parent==N.parent?1:2}function Tp(z){var N=z.children;return N.length?N[0]:z.t}function xg(z){var N=z.children,Z;return(Z=N.length)?N[Z-1]:z.t}function Ap(z,N,Z){var ne=Z/(N.i-z.i);N.c-=ne,N.s+=Z,z.c+=ne,N.z+=Z,N.m+=Z}function Mp(z){for(var N=0,Z=0,ne=z.children,le=ne.length,fe;--le>=0;)fe=ne[le],fe.z+=N,fe.m+=N,N+=fe.s+(Z+=fe.c)}function Te(z,N,Z){return z.a.parent===N.parent?z.a:Z}e.layout.cluster=function(){var z=e.layout.hierarchy().sort(null).value(null),N=Gc,Z=[1,1],ne=!1;function le(fe,De){var me=z.call(this,fe,De),ze=me[0],He,We=0;Wu(ze,function(pt){var Dt=pt.children;Dt&&Dt.length?(pt.x=rt(Dt),pt.y=qe(Dt)):(pt.x=He?We+=N(pt,He):0,pt.y=0,He=pt)});var ft=Ye(ze),ht=At(ze),Ot=ft.x-N(ft,ht)/2,jt=ht.x+N(ht,ft)/2;return Wu(ze,ne?function(pt){pt.x=(pt.x-ze.x)*Z[0],pt.y=(ze.y-pt.y)*Z[1]}:function(pt){pt.x=(pt.x-Ot)/(jt-Ot)*Z[0],pt.y=(1-(ze.y?pt.y/ze.y:1))*Z[1]}),me}return le.separation=function(fe){return arguments.length?(N=fe,le):N},le.size=function(fe){return arguments.length?(ne=(Z=fe)==null,le):ne?null:Z},le.nodeSize=function(fe){return arguments.length?(ne=(Z=fe)!=null,le):ne?Z:null},df(le,z)};function qe(z){return 1+e.max(z,function(N){return N.y})}function rt(z){return z.reduce(function(N,Z){return N+Z.x},0)/z.length}function Ye(z){var N=z.children;return N&&N.length?Ye(N[0]):z}function At(z){var N=z.children,Z;return N&&(Z=N.length)?At(N[Z-1]):z}e.layout.treemap=function(){var z=e.layout.hierarchy(),N=Math.round,Z=[1,1],ne=null,le=Gt,fe=!1,De,me="squarify",ze=.5*(1+Math.sqrt(5));function He(pt,Dt){for(var zt=-1,$t=pt.length,Yt,Lt;++zt<$t;)Lt=(Yt=pt[zt]).value*(Dt<0?0:Dt),Yt.area=isNaN(Lt)||Lt<=0?0:Lt}function We(pt){var Dt=pt.children;if(Dt&&Dt.length){var zt=le(pt),$t=[],Yt=Dt.slice(),Lt,Cr=1/0,Gr,ri=me==="slice"?zt.dx:me==="dice"?zt.dy:me==="slice-dice"?pt.depth&1?zt.dy:zt.dx:Math.min(zt.dx,zt.dy),pi;for(He(Yt,zt.dx*zt.dy/pt.value),$t.area=0;(pi=Yt.length)>0;)$t.push(Lt=Yt[pi-1]),$t.area+=Lt.area,me!=="squarify"||(Gr=ht($t,ri))<=Cr?(Yt.pop(),Cr=Gr):($t.area-=$t.pop().area,Ot($t,ri,zt,!1),ri=Math.min(zt.dx,zt.dy),$t.length=$t.area=0,Cr=1/0);$t.length&&(Ot($t,ri,zt,!0),$t.length=$t.area=0),Dt.forEach(We)}}function ft(pt){var Dt=pt.children;if(Dt&&Dt.length){var zt=le(pt),$t=Dt.slice(),Yt,Lt=[];for(He($t,zt.dx*zt.dy/pt.value),Lt.area=0;Yt=$t.pop();)Lt.push(Yt),Lt.area+=Yt.area,Yt.z!=null&&(Ot(Lt,Yt.z?zt.dx:zt.dy,zt,!$t.length),Lt.length=Lt.area=0);Dt.forEach(ft)}}function ht(pt,Dt){for(var zt=pt.area,$t,Yt=0,Lt=1/0,Cr=-1,Gr=pt.length;++CrYt&&(Yt=$t));return zt*=zt,Dt*=Dt,zt?Math.max(Dt*Yt*ze/zt,zt/(Dt*Lt*ze)):1/0}function Ot(pt,Dt,zt,$t){var Yt=-1,Lt=pt.length,Cr=zt.x,Gr=zt.y,ri=Dt?N(pt.area/Dt):0,pi;if(Dt==zt.dx){for(($t||ri>zt.dy)&&(ri=zt.dy);++Ytzt.dx)&&(ri=zt.dx);++Yt1);return z+N*ne*Math.sqrt(-2*Math.log(fe)/fe)}},logNormal:function(){var z=e.random.normal.apply(e,arguments);return function(){return Math.exp(z())}},bates:function(z){var N=e.random.irwinHall(z);return function(){return N()/z}},irwinHall:function(z){return function(){for(var N=0,Z=0;Z2?Dr:Pr,He=ne?Uv:Nv;return le=ze(z,N,He,Z),fe=ze(N,z,He,yh),me}function me(ze){return le(ze)}return me.invert=function(ze){return fe(ze)},me.domain=function(ze){return arguments.length?(z=ze.map(Number),De()):z},me.range=function(ze){return arguments.length?(N=ze,De()):N},me.rangeRound=function(ze){return me.range(ze).interpolate(Uf)},me.clamp=function(ze){return arguments.length?(ne=ze,De()):ne},me.interpolate=function(ze){return arguments.length?(Z=ze,De()):Z},me.ticks=function(ze){return Xi(z,ze)},me.tickFormat=function(ze,He){return d3_scale_linearTickFormat(z,ze,He)},me.nice=function(ze){return ki(z,ze),De()},me.copy=function(){return Hr(z,N,Z,ne)},De()}function zi(z,N){return e.rebind(z,N,"range","rangeRound","interpolate","clamp")}function ki(z,N){return rr(z,fr(Vi(z,N)[2])),rr(z,fr(Vi(z,N)[2])),z}function Vi(z,N){N==null&&(N=10);var Z=cr(z),ne=Z[1]-Z[0],le=Math.pow(10,Math.floor(Math.log(ne/N)/Math.LN10)),fe=N/ne*le;return fe<=.15?le*=10:fe<=.35?le*=5:fe<=.75&&(le*=2),Z[0]=Math.ceil(Z[0]/le)*le,Z[1]=Math.floor(Z[1]/le)*le+le*.5,Z[2]=le,Z}function Xi(z,N){return e.range.apply(e,Vi(z,N))}var Yr={s:1,g:1,p:1,r:1,e:1};function ai(z){return-Math.floor(Math.log(z)/Math.LN10+.01)}function on(z,N){var Z=ai(N[2]);return z in Yr?Math.abs(Z-ai(Math.max(g(N[0]),g(N[1]))))+ +(z!=="e"):Z-(z==="%")*2}e.scale.log=function(){return En(e.scale.linear().domain([0,1]),10,!0,[1,10])};function En(z,N,Z,ne){function le(me){return(Z?Math.log(me<0?0:me):-Math.log(me>0?0:-me))/Math.log(N)}function fe(me){return Z?Math.pow(N,me):-Math.pow(N,-me)}function De(me){return z(le(me))}return De.invert=function(me){return fe(z.invert(me))},De.domain=function(me){return arguments.length?(Z=me[0]>=0,z.domain((ne=me.map(Number)).map(le)),De):ne},De.base=function(me){return arguments.length?(N=+me,z.domain(ne.map(le)),De):N},De.nice=function(){var me=rr(ne.map(le),Z?Math:ga);return z.domain(me),ne=me.map(fe),De},De.ticks=function(){var me=cr(ne),ze=[],He=me[0],We=me[1],ft=Math.floor(le(He)),ht=Math.ceil(le(We)),Ot=N%1?2:N;if(isFinite(ht-ft)){if(Z){for(;ft0;jt--)ze.push(fe(ft)*jt);for(ft=0;ze[ft]We;ht--);ze=ze.slice(ft,ht)}return ze},De.copy=function(){return En(z.copy(),N,Z,ne)},zi(De,z)}var ga={floor:function(z){return-Math.ceil(-z)},ceil:function(z){return-Math.floor(-z)}};e.scale.pow=function(){return $a(e.scale.linear(),1,[0,1])};function $a(z,N,Z){var ne=Ca(N),le=Ca(1/N);function fe(De){return z(ne(De))}return fe.invert=function(De){return le(z.invert(De))},fe.domain=function(De){return arguments.length?(z.domain((Z=De.map(Number)).map(ne)),fe):Z},fe.ticks=function(De){return Xi(Z,De)},fe.tickFormat=function(De,me){return d3_scale_linearTickFormat(Z,De,me)},fe.nice=function(De){return fe.domain(ki(Z,De))},fe.exponent=function(De){return arguments.length?(ne=Ca(N=De),le=Ca(1/N),z.domain(Z.map(ne)),fe):N},fe.copy=function(){return $a(z.copy(),N,Z)},zi(fe,z)}function Ca(z){return function(N){return N<0?-Math.pow(-N,z):Math.pow(N,z)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return xo([],{t:"range",a:[[]]})};function xo(z,N){var Z,ne,le;function fe(me){return ne[((Z.get(me)||(N.t==="range"?Z.set(me,z.push(me)):NaN))-1)%ne.length]}function De(me,ze){return e.range(z.length).map(function(He){return me+ze*He})}return fe.domain=function(me){if(!arguments.length)return z;z=[],Z=new _;for(var ze=-1,He=me.length,We;++ze0?Z[fe-1]:z[0],feht?0:1;if(We=je)return ze(We,jt)+(He?ze(He,1-jt):"")+"Z";var pt,Dt,zt,$t,Yt=0,Lt=0,Cr,Gr,ri,pi,Li,Pi,Rn,Gi,kn=[];if(($t=(+De.apply(this,arguments)||0)/2)&&(zt=ne===vf?Math.sqrt(He*He+We*We):+ne.apply(this,arguments),jt||(Lt*=-1),We&&(Lt=lr(zt/We*Math.sin($t))),He&&(Yt=lr(zt/He*Math.sin($t)))),We){Cr=We*Math.cos(ft+Lt),Gr=We*Math.sin(ft+Lt),ri=We*Math.cos(ht-Lt),pi=We*Math.sin(ht-Lt);var Ua=Math.abs(ht-ft-2*Lt)<=Ue?0:1;if(Lt&&Sp(Cr,Gr,ri,pi)===jt^Ua){var Qs=(ft+ht)/2;Cr=We*Math.cos(Qs),Gr=We*Math.sin(Qs),ri=pi=null}}else Cr=Gr=0;if(He){Li=He*Math.cos(ht-Yt),Pi=He*Math.sin(ht-Yt),Rn=He*Math.cos(ft+Yt),Gi=He*Math.sin(ft+Yt);var lo=Math.abs(ft-ht+2*Yt)<=Ue?0:1;if(Yt&&Sp(Li,Pi,Rn,Gi)===1-jt^lo){var oi=(ft+ht)/2;Li=He*Math.cos(oi),Pi=He*Math.sin(oi),Rn=Gi=null}}else Li=Pi=0;if(Ot>bt&&(pt=Math.min(Math.abs(We-He)/2,+Z.apply(this,arguments)))>.001){Dt=He0?0:1}function _g(z,N,Z,ne,le){var fe=z[0]-N[0],De=z[1]-N[1],me=(le?ne:-ne)/Math.sqrt(fe*fe+De*De),ze=me*De,He=-me*fe,We=z[0]+ze,ft=z[1]+He,ht=N[0]+ze,Ot=N[1]+He,jt=(We+ht)/2,pt=(ft+Ot)/2,Dt=ht-We,zt=Ot-ft,$t=Dt*Dt+zt*zt,Yt=Z-ne,Lt=We*Ot-ht*ft,Cr=(zt<0?-1:1)*Math.sqrt(Math.max(0,Yt*Yt*$t-Lt*Lt)),Gr=(Lt*zt-Dt*Cr)/$t,ri=(-Lt*Dt-zt*Cr)/$t,pi=(Lt*zt+Dt*Cr)/$t,Li=(-Lt*Dt+zt*Cr)/$t,Pi=Gr-jt,Rn=ri-pt,Gi=pi-jt,kn=Li-pt;return Pi*Pi+Rn*Rn>Gi*Gi+kn*kn&&(Gr=pi,ri=Li),[[Gr-ze,ri-He],[Gr*Z/Yt,ri*Z/Yt]]}function jv(){return!0}function Mx(z){var N=Ja,Z=oo,ne=jv,le=jc,fe=le.key,De=.7;function me(ze){var He=[],We=[],ft=-1,ht=ze.length,Ot,jt=kt(N),pt=kt(Z);function Dt(){He.push("M",le(z(We),De))}for(;++ft1?z.join("L"):z+"Z"}function iy(z){return z.join("L")+"Z"}function Wv(z){for(var N=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++N1&&le.push("H",ne[0]),le.join("")}function bg(z){for(var N=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++N1){me=N[1],fe=z[ze],ze++,ne+="C"+(le[0]+De[0])+","+(le[1]+De[1])+","+(fe[0]-me[0])+","+(fe[1]-me[1])+","+fe[0]+","+fe[1];for(var He=2;He9&&(fe=Z*3/Math.sqrt(fe),De[me]=fe*ne,De[me+1]=fe*le));for(me=-1;++me<=ze;)fe=(z[Math.min(ze,me+1)][0]-z[Math.max(0,me-1)][0])/(6*(1+De[me]*De[me])),N.push([fe||0,De[me]*fe||0]);return N}function Ke(z){return z.length<3?jc(z):z[0]+kp(z,Pe(z))}e.svg.line.radial=function(){var z=Mx(nt);return z.radius=z.x,delete z.x,z.angle=z.y,delete z.y,z};function nt(z){for(var N,Z=-1,ne=z.length,le,fe;++ZUe)+",1 "+ft}function He(We,ft,ht,Ot){return"Q 0,0 "+Ot}return fe.radius=function(We){return arguments.length?(Z=kt(We),fe):Z},fe.source=function(We){return arguments.length?(z=kt(We),fe):z},fe.target=function(We){return arguments.length?(N=kt(We),fe):N},fe.startAngle=function(We){return arguments.length?(ne=kt(We),fe):ne},fe.endAngle=function(We){return arguments.length?(le=kt(We),fe):le},fe};function Pt(z){return z.radius}e.svg.diagonal=function(){var z=at,N=yt,Z=Ut;function ne(le,fe){var De=z.call(this,le,fe),me=N.call(this,le,fe),ze=(De.y+me.y)/2,He=[De,{x:De.x,y:ze},{x:me.x,y:ze},me];return He=He.map(Z),"M"+He[0]+"C"+He[1]+" "+He[2]+" "+He[3]}return ne.source=function(le){return arguments.length?(z=kt(le),ne):z},ne.target=function(le){return arguments.length?(N=kt(le),ne):N},ne.projection=function(le){return arguments.length?(Z=le,ne):Z},ne};function Ut(z){return[z.x,z.y]}e.svg.diagonal.radial=function(){var z=e.svg.diagonal(),N=Ut,Z=z.projection;return z.projection=function(ne){return arguments.length?Z(ar(N=ne)):N},z};function ar(z){return function(){var N=z.apply(this,arguments),Z=N[0],ne=N[1]-Re;return[Z*Math.cos(ne),Z*Math.sin(ne)]}}e.svg.symbol=function(){var z=Vr,N=Ar;function Z(ne,le){return(rn.get(z.call(this,ne,le))||_i)(N.call(this,ne,le))}return Z.type=function(ne){return arguments.length?(z=kt(ne),Z):z},Z.size=function(ne){return arguments.length?(N=kt(ne),Z):N},Z};function Ar(){return 64}function Vr(){return"circle"}function _i(z){var N=Math.sqrt(z/Ue);return"M0,"+N+"A"+N+","+N+" 0 1,1 0,"+-N+"A"+N+","+N+" 0 1,1 0,"+N+"Z"}var rn=e.map({circle:_i,cross:function(z){var N=Math.sqrt(z/5)/2;return"M"+-3*N+","+-N+"H"+-N+"V"+-3*N+"H"+N+"V"+-N+"H"+3*N+"V"+N+"H"+N+"V"+3*N+"H"+-N+"V"+N+"H"+-3*N+"Z"},diamond:function(z){var N=Math.sqrt(z/(2*xn)),Z=N*xn;return"M0,"+-N+"L"+Z+",0 0,"+N+" "+-Z+",0Z"},square:function(z){var N=Math.sqrt(z)/2;return"M"+-N+","+-N+"L"+N+","+-N+" "+N+","+N+" "+-N+","+N+"Z"},"triangle-down":function(z){var N=Math.sqrt(z/cn),Z=N*cn/2;return"M0,"+Z+"L"+N+","+-Z+" "+-N+","+-Z+"Z"},"triangle-up":function(z){var N=Math.sqrt(z/cn),Z=N*cn/2;return"M0,"+-Z+"L"+N+","+Z+" "+-N+","+Z+"Z"}});e.svg.symbolTypes=rn.keys();var cn=Math.sqrt(3),xn=Math.tan(30*Ve);H.transition=function(z){for(var N=wl||++as,Z=ou(z),ne=[],le,fe,De=Xu||{time:Date.now(),ease:_h,delay:0,duration:250},me=-1,ze=this.length;++me0;)ft[--$t].call(z,zt);if(Dt>=1)return De.event&&De.event.end.call(z,z.__data__,N),--fe.count?delete fe[ne]:delete z[Z],1}De||(me=le.time,ze=Gn(ht,0,me),De=fe[ne]={tween:new _,time:me,timer:ze,delay:le.delay,duration:le.duration,ease:le.ease,index:N},le=null,++fe.count)}e.svg.axis=function(){var z=e.scale.linear(),N=$c,Z=6,ne=6,le=3,fe=[10],De=null,me;function ze(He){He.each(function(){var We=e.select(this),ft=this.__chart__||z,ht=this.__chart__=z.copy(),Ot=De==null?ht.ticks?ht.ticks.apply(ht,fe):ht.domain():De,jt=me==null?ht.tickFormat?ht.tickFormat.apply(ht,fe):F:me,pt=We.selectAll(".tick").data(Ot,ht),Dt=pt.enter().insert("g",".domain").attr("class","tick").style("opacity",bt),zt=e.transition(pt.exit()).style("opacity",bt).remove(),$t=e.transition(pt.order()).style("opacity",1),Yt=Math.max(Z,0)+le,Lt,Cr=mr(ht),Gr=We.selectAll(".domain").data([0]),ri=(Gr.enter().append("path").attr("class","domain"),e.transition(Gr));Dt.append("line"),Dt.append("text");var pi=Dt.select("line"),Li=$t.select("line"),Pi=pt.select("text").text(jt),Rn=Dt.select("text"),Gi=$t.select("text"),kn=N==="top"||N==="left"?-1:1,Ua,Qs,lo,oi;if(N==="bottom"||N==="top"?(Lt=Wf,Ua="x",lo="y",Qs="x2",oi="y2",Pi.attr("dy",kn<0?"0em":".71em").style("text-anchor","middle"),ri.attr("d","M"+Cr[0]+","+kn*ne+"V0H"+Cr[1]+"V"+kn*ne)):(Lt=Yf,Ua="y",lo="x",Qs="y2",oi="x2",Pi.attr("dy",".32em").style("text-anchor",kn<0?"end":"start"),ri.attr("d","M"+kn*ne+","+Cr[0]+"H0V"+Cr[1]+"H"+kn*ne)),pi.attr(oi,kn*Z),Rn.attr(lo,kn*Yt),Li.attr(Qs,0).attr(oi,kn*Z),Gi.attr(Ua,0).attr(lo,kn*Yt),ht.rangeBand){var zn=ht,Yn=zn.rangeBand()/2;ft=ht=function(qa){return zn(qa)+Yn}}else ft.rangeBand?ft=ht:zt.call(Lt,ht,ft);Dt.call(Lt,ft,ht),$t.call(Lt,ht,ht)})}return ze.scale=function(He){return arguments.length?(z=He,ze):z},ze.orient=function(He){return arguments.length?(N=He in $f?He+"":$c,ze):N},ze.ticks=function(){return arguments.length?(fe=r(arguments),ze):fe},ze.tickValues=function(He){return arguments.length?(De=He,ze):De},ze.tickFormat=function(He){return arguments.length?(me=He,ze):me},ze.tickSize=function(He){var We=arguments.length;return We?(Z=+He,ne=+arguments[We-1],ze):Z},ze.innerTickSize=function(He){return arguments.length?(Z=+He,ze):Z},ze.outerTickSize=function(He){return arguments.length?(ne=+He,ze):ne},ze.tickPadding=function(He){return arguments.length?(le=+He,ze):le},ze.tickSubdivide=function(){return arguments.length&&ze},ze};var $c="bottom",$f={top:1,right:1,bottom:1,left:1};function Wf(z,N,Z){z.attr("transform",function(ne){var le=N(ne);return"translate("+(isFinite(le)?le:Z(ne))+",0)"})}function Yf(z,N,Z){z.attr("transform",function(ne){var le=N(ne);return"translate(0,"+(isFinite(le)?le:Z(ne))+")"})}e.svg.brush=function(){var z=K(We,"brushstart","brush","brushend"),N=null,Z=null,ne=[0,0],le=[0,0],fe,De,me=!0,ze=!0,He=gf[0];function We(pt){pt.each(function(){var Dt=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",jt).on("touchstart.brush",jt),zt=Dt.selectAll(".background").data([0]);zt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Dt.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var $t=Dt.selectAll(".resize").data(He,F);$t.exit().remove(),$t.enter().append("g").attr("class",function(Gr){return"resize "+Gr}).style("cursor",function(Gr){return Sh[Gr]}).append("rect").attr("x",function(Gr){return/[ew]$/.test(Gr)?-3:null}).attr("y",function(Gr){return/^[ns]/.test(Gr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),$t.style("display",We.empty()?"none":null);var Yt=e.transition(Dt),Lt=e.transition(zt),Cr;N&&(Cr=mr(N),Lt.attr("x",Cr[0]).attr("width",Cr[1]-Cr[0]),ht(Yt)),Z&&(Cr=mr(Z),Lt.attr("y",Cr[0]).attr("height",Cr[1]-Cr[0]),Ot(Yt)),ft(Yt)})}We.event=function(pt){pt.each(function(){var Dt=z.of(this,arguments),zt={x:ne,y:le,i:fe,j:De},$t=this.__chart__||zt;this.__chart__=zt,wl?e.select(this).transition().each("start.brush",function(){fe=$t.i,De=$t.j,ne=$t.x,le=$t.y,Dt({type:"brushstart"})}).tween("brush:brush",function(){var Yt=a0(ne,zt.x),Lt=a0(le,zt.y);return fe=De=null,function(Cr){ne=zt.x=Yt(Cr),le=zt.y=Lt(Cr),Dt({type:"brush",mode:"resize"})}}).each("end.brush",function(){fe=zt.i,De=zt.j,Dt({type:"brush",mode:"resize"}),Dt({type:"brushend"})}):(Dt({type:"brushstart"}),Dt({type:"brush",mode:"resize"}),Dt({type:"brushend"}))})};function ft(pt){pt.selectAll(".resize").attr("transform",function(Dt){return"translate("+ne[+/e$/.test(Dt)]+","+le[+/^s/.test(Dt)]+")"})}function ht(pt){pt.select(".extent").attr("x",ne[0]),pt.selectAll(".extent,.n>rect,.s>rect").attr("width",ne[1]-ne[0])}function Ot(pt){pt.select(".extent").attr("y",le[0]),pt.selectAll(".extent,.e>rect,.w>rect").attr("height",le[1]-le[0])}function jt(){var pt=this,Dt=e.select(e.event.target),zt=z.of(pt,arguments),$t=e.select(pt),Yt=Dt.datum(),Lt=!/^(n|s)$/.test(Yt)&&N,Cr=!/^(e|w)$/.test(Yt)&&Z,Gr=Dt.classed("extent"),ri=ut(pt),pi,Li=e.mouse(pt),Pi,Rn=e.select(a(pt)).on("keydown.brush",Ua).on("keyup.brush",Qs);if(e.event.changedTouches?Rn.on("touchmove.brush",lo).on("touchend.brush",zn):Rn.on("mousemove.brush",lo).on("mouseup.brush",zn),$t.interrupt().selectAll("*").interrupt(),Gr)Li[0]=ne[0]-Li[0],Li[1]=le[0]-Li[1];else if(Yt){var Gi=+/w$/.test(Yt),kn=+/^n/.test(Yt);Pi=[ne[1-Gi]-Li[0],le[1-kn]-Li[1]],Li[0]=ne[Gi],Li[1]=le[kn]}else e.event.altKey&&(pi=Li.slice());$t.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Dt.style("cursor")),zt({type:"brushstart"}),lo();function Ua(){e.event.keyCode==32&&(Gr||(pi=null,Li[0]-=ne[1],Li[1]-=le[1],Gr=2),$())}function Qs(){e.event.keyCode==32&&Gr==2&&(Li[0]+=ne[1],Li[1]+=le[1],Gr=0,$())}function lo(){var Yn=e.mouse(pt),qa=!1;Pi&&(Yn[0]+=Pi[0],Yn[1]+=Pi[1]),Gr||(e.event.altKey?(pi||(pi=[(ne[0]+ne[1])/2,(le[0]+le[1])/2]),Li[0]=ne[+(Yn[0]{(function(e,t){typeof nC=="object"&&typeof Xse!="undefined"?t(nC):(e=e||self,t(e.d3=e.d3||{}))})(nC,function(e){"use strict";var t=new Date,r=new Date;function i(re,pe,we,Fe){function Se(ke){return re(ke=arguments.length===0?new Date:new Date(+ke)),ke}return Se.floor=function(ke){return re(ke=new Date(+ke)),ke},Se.ceil=function(ke){return re(ke=new Date(ke-1)),pe(ke,1),re(ke),ke},Se.round=function(ke){var _e=Se(ke),Ie=Se.ceil(ke);return ke-_e0))return Oe;do Oe.push(Qe=new Date(+ke)),pe(ke,Ie),re(ke);while(Qe=_e)for(;re(_e),!ke(_e);)_e.setTime(_e-1)},function(_e,Ie){if(_e>=_e)if(Ie<0)for(;++Ie<=0;)for(;pe(_e,-1),!ke(_e););else for(;--Ie>=0;)for(;pe(_e,1),!ke(_e););})},we&&(Se.count=function(ke,_e){return t.setTime(+ke),r.setTime(+_e),re(t),re(r),Math.floor(we(t,r))},Se.every=function(ke){return ke=Math.floor(ke),!isFinite(ke)||!(ke>0)?null:ke>1?Se.filter(Fe?function(_e){return Fe(_e)%ke===0}:function(_e){return Se.count(0,_e)%ke===0}):Se}),Se}var n=i(function(){},function(re,pe){re.setTime(+re+pe)},function(re,pe){return pe-re});n.every=function(re){return re=Math.floor(re),!isFinite(re)||!(re>0)?null:re>1?i(function(pe){pe.setTime(Math.floor(pe/re)*re)},function(pe,we){pe.setTime(+pe+we*re)},function(pe,we){return(we-pe)/re}):n};var a=n.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=i(function(re){re.setTime(re-re.getMilliseconds())},function(re,pe){re.setTime(+re+pe*o)},function(re,pe){return(pe-re)/o},function(re){return re.getUTCSeconds()}),h=f.range,d=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getMinutes()}),p=d.range,v=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o-re.getMinutes()*s)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getHours()}),m=v.range,g=i(function(re){re.setHours(0,0,0,0)},function(re,pe){re.setDate(re.getDate()+pe)},function(re,pe){return(pe-re-(pe.getTimezoneOffset()-re.getTimezoneOffset())*s)/u},function(re){return re.getDate()-1}),w=g.range;function b(re){return i(function(pe){pe.setDate(pe.getDate()-(pe.getDay()+7-re)%7),pe.setHours(0,0,0,0)},function(pe,we){pe.setDate(pe.getDate()+we*7)},function(pe,we){return(we-pe-(we.getTimezoneOffset()-pe.getTimezoneOffset())*s)/c})}var _=b(0),M=b(1),x=b(2),T=b(3),A=b(4),y=b(5),E=b(6),S=_.range,C=M.range,k=x.range,D=T.range,F=A.range,P=y.range,R=E.range,L=i(function(re){re.setDate(1),re.setHours(0,0,0,0)},function(re,pe){re.setMonth(re.getMonth()+pe)},function(re,pe){return pe.getMonth()-re.getMonth()+(pe.getFullYear()-re.getFullYear())*12},function(re){return re.getMonth()}),I=L.range,B=i(function(re){re.setMonth(0,1),re.setHours(0,0,0,0)},function(re,pe){re.setFullYear(re.getFullYear()+pe)},function(re,pe){return pe.getFullYear()-re.getFullYear()},function(re){return re.getFullYear()});B.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setFullYear(Math.floor(pe.getFullYear()/re)*re),pe.setMonth(0,1),pe.setHours(0,0,0,0)},function(pe,we){pe.setFullYear(pe.getFullYear()+we*re)})};var O=B.range,$=i(function(re){re.setUTCSeconds(0,0)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getUTCMinutes()}),Y=$.range,K=i(function(re){re.setUTCMinutes(0,0,0)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getUTCHours()}),j=K.range,q=i(function(re){re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCDate(re.getUTCDate()+pe)},function(re,pe){return(pe-re)/u},function(re){return re.getUTCDate()-1}),J=q.range;function U(re){return i(function(pe){pe.setUTCDate(pe.getUTCDate()-(pe.getUTCDay()+7-re)%7),pe.setUTCHours(0,0,0,0)},function(pe,we){pe.setUTCDate(pe.getUTCDate()+we*7)},function(pe,we){return(we-pe)/c})}var V=U(0),X=U(1),H=U(2),G=U(3),Q=U(4),te=U(5),ce=U(6),ge=V.range,Ce=X.range,be=H.range,he=G.range,oe=Q.range,Ee=te.range,ye=ce.range,ue=i(function(re){re.setUTCDate(1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCMonth(re.getUTCMonth()+pe)},function(re,pe){return pe.getUTCMonth()-re.getUTCMonth()+(pe.getUTCFullYear()-re.getUTCFullYear())*12},function(re){return re.getUTCMonth()}),ee=ue.range,ae=i(function(re){re.setUTCMonth(0,1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCFullYear(re.getUTCFullYear()+pe)},function(re,pe){return pe.getUTCFullYear()-re.getUTCFullYear()},function(re){return re.getUTCFullYear()});ae.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setUTCFullYear(Math.floor(pe.getUTCFullYear()/re)*re),pe.setUTCMonth(0,1),pe.setUTCHours(0,0,0,0)},function(pe,we){pe.setUTCFullYear(pe.getUTCFullYear()+we*re)})};var xe=ae.range;e.timeDay=g,e.timeDays=w,e.timeFriday=y,e.timeFridays=P,e.timeHour=v,e.timeHours=m,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=M,e.timeMondays=C,e.timeMonth=L,e.timeMonths=I,e.timeSaturday=E,e.timeSaturdays=R,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=_,e.timeSundays=S,e.timeThursday=A,e.timeThursdays=F,e.timeTuesday=x,e.timeTuesdays=k,e.timeWednesday=T,e.timeWednesdays=D,e.timeWeek=_,e.timeWeeks=S,e.timeYear=B,e.timeYears=O,e.utcDay=q,e.utcDays=J,e.utcFriday=te,e.utcFridays=Ee,e.utcHour=K,e.utcHours=j,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=$,e.utcMinutes=Y,e.utcMonday=X,e.utcMondays=Ce,e.utcMonth=ue,e.utcMonths=ee,e.utcSaturday=ce,e.utcSaturdays=ye,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=V,e.utcSundays=ge,e.utcThursday=Q,e.utcThursdays=oe,e.utcTuesday=H,e.utcTuesdays=be,e.utcWednesday=G,e.utcWednesdays=he,e.utcWeek=V,e.utcWeeks=ge,e.utcYear=ae,e.utcYears=xe,Object.defineProperty(e,"__esModule",{value:!0})})});var z3=W((aC,Zse)=>{(function(e,t){typeof aC=="object"&&typeof Zse!="undefined"?t(aC,vN()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(aC,function(e,t){"use strict";function r(Re){if(0<=Re.y&&Re.y<100){var Ve=new Date(-1,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L);return Ve.setFullYear(Re.y),Ve}return new Date(Re.y,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L)}function i(Re){if(0<=Re.y&&Re.y<100){var Ve=new Date(Date.UTC(-1,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L));return Ve.setUTCFullYear(Re.y),Ve}return new Date(Date.UTC(Re.y,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L))}function n(Re,Ve,ct){return{y:Re,m:Ve,d:ct,H:0,M:0,S:0,L:0}}function a(Re){var Ve=Re.dateTime,ct=Re.date,Tt=Re.time,Xt=Re.periods,Vt=Re.days,lr=Re.shortDays,ur=Re.months,Bt=Re.shortMonths,Zt=h(Xt),kr=d(Xt),$e=h(Vt),tt=d(Vt),st=h(lr),xt=d(lr),Je=h(ur),Ct=d(ur),ir=h(Bt),hr=d(Bt),Ur={a:Rs,A:ho,b:ka,B:ao,c:null,d:L,e:L,f:Y,g:te,G:ge,H:I,I:B,j:O,L:$,m:K,M:j,p:zs,q:_a,Q:ut,s:vt,S:q,u:J,U,V:X,w:H,W:G,x:null,X:null,y:Q,Y:ce,Z:Ce,"%":_t},si={a:Xs,A:_l,b:yu,B:ul,c:null,d:be,e:be,f:ue,g:Ie,G:Qe,H:he,I:oe,j:Ee,L:ye,m:ee,M:ae,p:Le,q:ot,Q:ut,s:vt,S:xe,u:re,U:pe,V:Fe,w:Se,W:ke,x:null,X:null,y:_e,Y:Oe,Z:et,"%":_t},ei={a:ta,A:ca,b:dn,B:Vn,c:ra,d:A,e:A,f:D,g:_,G:b,H:E,I:E,j:y,L:k,m:T,M:S,p:hn,q:x,Q:P,s:R,S:C,u:v,U:m,V:g,w:p,W:w,x:ds,X:mo,y:_,Y:b,Z:M,"%":F};Ur.x=Lr(ct,Ur),Ur.X=Lr(Tt,Ur),Ur.c=Lr(Ve,Ur),si.x=Lr(ct,si),si.X=Lr(Tt,si),si.c=Lr(Ve,si);function Lr(lt,kt){return function(Jt){var Rt=[],Tr=-1,Wt=0,br=lt.length,Xr,ti,Mi;for(Jt instanceof Date||(Jt=new Date(+Jt));++Tr53)return null;"w"in Rt||(Rt.w=1),"Z"in Rt?(Wt=i(n(Rt.y,0,1)),br=Wt.getUTCDay(),Wt=br>4||br===0?t.utcMonday.ceil(Wt):t.utcMonday(Wt),Wt=t.utcDay.offset(Wt,(Rt.V-1)*7),Rt.y=Wt.getUTCFullYear(),Rt.m=Wt.getUTCMonth(),Rt.d=Wt.getUTCDate()+(Rt.w+6)%7):(Wt=r(n(Rt.y,0,1)),br=Wt.getDay(),Wt=br>4||br===0?t.timeMonday.ceil(Wt):t.timeMonday(Wt),Wt=t.timeDay.offset(Wt,(Rt.V-1)*7),Rt.y=Wt.getFullYear(),Rt.m=Wt.getMonth(),Rt.d=Wt.getDate()+(Rt.w+6)%7)}else("W"in Rt||"U"in Rt)&&("w"in Rt||(Rt.w="u"in Rt?Rt.u%7:"W"in Rt?1:0),br="Z"in Rt?i(n(Rt.y,0,1)).getUTCDay():r(n(Rt.y,0,1)).getDay(),Rt.m=0,Rt.d="W"in Rt?(Rt.w+6)%7+Rt.W*7-(br+5)%7:Rt.w+Rt.U*7-(br+6)%7);return"Z"in Rt?(Rt.H+=Rt.Z/100|0,Rt.M+=Rt.Z%100,i(Rt)):r(Rt)}}function Tn(lt,kt,Jt,Rt){for(var Tr=0,Wt=kt.length,br=Jt.length,Xr,ti;Tr=br)return-1;if(Xr=kt.charCodeAt(Tr++),Xr===37){if(Xr=kt.charAt(Tr++),ti=ei[Xr in o?kt.charAt(Tr++):Xr],!ti||(Rt=ti(lt,Jt,Rt))<0)return-1}else if(Xr!=Jt.charCodeAt(Rt++))return-1}return Rt}function hn(lt,kt,Jt){var Rt=Zt.exec(kt.slice(Jt));return Rt?(lt.p=kr[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ta(lt,kt,Jt){var Rt=st.exec(kt.slice(Jt));return Rt?(lt.w=xt[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ca(lt,kt,Jt){var Rt=$e.exec(kt.slice(Jt));return Rt?(lt.w=tt[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function dn(lt,kt,Jt){var Rt=ir.exec(kt.slice(Jt));return Rt?(lt.m=hr[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function Vn(lt,kt,Jt){var Rt=Je.exec(kt.slice(Jt));return Rt?(lt.m=Ct[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ra(lt,kt,Jt){return Tn(lt,Ve,kt,Jt)}function ds(lt,kt,Jt){return Tn(lt,ct,kt,Jt)}function mo(lt,kt,Jt){return Tn(lt,Tt,kt,Jt)}function Rs(lt){return lr[lt.getDay()]}function ho(lt){return Vt[lt.getDay()]}function ka(lt){return Bt[lt.getMonth()]}function ao(lt){return ur[lt.getMonth()]}function zs(lt){return Xt[+(lt.getHours()>=12)]}function _a(lt){return 1+~~(lt.getMonth()/3)}function Xs(lt){return lr[lt.getUTCDay()]}function _l(lt){return Vt[lt.getUTCDay()]}function yu(lt){return Bt[lt.getUTCMonth()]}function ul(lt){return ur[lt.getUTCMonth()]}function Le(lt){return Xt[+(lt.getUTCHours()>=12)]}function ot(lt){return 1+~~(lt.getUTCMonth()/3)}return{format:function(lt){var kt=Lr(lt+="",Ur);return kt.toString=function(){return lt},kt},parse:function(lt){var kt=$i(lt+="",!1);return kt.toString=function(){return lt},kt},utcFormat:function(lt){var kt=Lr(lt+="",si);return kt.toString=function(){return lt},kt},utcParse:function(lt){var kt=$i(lt+="",!0);return kt.toString=function(){return lt},kt}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Re,Ve,ct){var Tt=Re<0?"-":"",Xt=(Tt?-Re:Re)+"",Vt=Xt.length;return Tt+(Vt68?1900:2e3),ct+Tt[0].length):-1}function M(Re,Ve,ct){var Tt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ve.slice(ct,ct+6));return Tt?(Re.Z=Tt[1]?0:-(Tt[2]+(Tt[3]||"00")),ct+Tt[0].length):-1}function x(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+1));return Tt?(Re.q=Tt[0]*3-3,ct+Tt[0].length):-1}function T(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.m=Tt[0]-1,ct+Tt[0].length):-1}function A(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.d=+Tt[0],ct+Tt[0].length):-1}function y(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+3));return Tt?(Re.m=0,Re.d=+Tt[0],ct+Tt[0].length):-1}function E(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.H=+Tt[0],ct+Tt[0].length):-1}function S(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.M=+Tt[0],ct+Tt[0].length):-1}function C(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.S=+Tt[0],ct+Tt[0].length):-1}function k(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+3));return Tt?(Re.L=+Tt[0],ct+Tt[0].length):-1}function D(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+6));return Tt?(Re.L=Math.floor(Tt[0]/1e3),ct+Tt[0].length):-1}function F(Re,Ve,ct){var Tt=l.exec(Ve.slice(ct,ct+1));return Tt?ct+Tt[0].length:-1}function P(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct));return Tt?(Re.Q=+Tt[0],ct+Tt[0].length):-1}function R(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct));return Tt?(Re.s=+Tt[0],ct+Tt[0].length):-1}function L(Re,Ve){return c(Re.getDate(),Ve,2)}function I(Re,Ve){return c(Re.getHours(),Ve,2)}function B(Re,Ve){return c(Re.getHours()%12||12,Ve,2)}function O(Re,Ve){return c(1+t.timeDay.count(t.timeYear(Re),Re),Ve,3)}function $(Re,Ve){return c(Re.getMilliseconds(),Ve,3)}function Y(Re,Ve){return $(Re,Ve)+"000"}function K(Re,Ve){return c(Re.getMonth()+1,Ve,2)}function j(Re,Ve){return c(Re.getMinutes(),Ve,2)}function q(Re,Ve){return c(Re.getSeconds(),Ve,2)}function J(Re){var Ve=Re.getDay();return Ve===0?7:Ve}function U(Re,Ve){return c(t.timeSunday.count(t.timeYear(Re)-1,Re),Ve,2)}function V(Re){var Ve=Re.getDay();return Ve>=4||Ve===0?t.timeThursday(Re):t.timeThursday.ceil(Re)}function X(Re,Ve){return Re=V(Re),c(t.timeThursday.count(t.timeYear(Re),Re)+(t.timeYear(Re).getDay()===4),Ve,2)}function H(Re){return Re.getDay()}function G(Re,Ve){return c(t.timeMonday.count(t.timeYear(Re)-1,Re),Ve,2)}function Q(Re,Ve){return c(Re.getFullYear()%100,Ve,2)}function te(Re,Ve){return Re=V(Re),c(Re.getFullYear()%100,Ve,2)}function ce(Re,Ve){return c(Re.getFullYear()%1e4,Ve,4)}function ge(Re,Ve){var ct=Re.getDay();return Re=ct>=4||ct===0?t.timeThursday(Re):t.timeThursday.ceil(Re),c(Re.getFullYear()%1e4,Ve,4)}function Ce(Re){var Ve=Re.getTimezoneOffset();return(Ve>0?"-":(Ve*=-1,"+"))+c(Ve/60|0,"0",2)+c(Ve%60,"0",2)}function be(Re,Ve){return c(Re.getUTCDate(),Ve,2)}function he(Re,Ve){return c(Re.getUTCHours(),Ve,2)}function oe(Re,Ve){return c(Re.getUTCHours()%12||12,Ve,2)}function Ee(Re,Ve){return c(1+t.utcDay.count(t.utcYear(Re),Re),Ve,3)}function ye(Re,Ve){return c(Re.getUTCMilliseconds(),Ve,3)}function ue(Re,Ve){return ye(Re,Ve)+"000"}function ee(Re,Ve){return c(Re.getUTCMonth()+1,Ve,2)}function ae(Re,Ve){return c(Re.getUTCMinutes(),Ve,2)}function xe(Re,Ve){return c(Re.getUTCSeconds(),Ve,2)}function re(Re){var Ve=Re.getUTCDay();return Ve===0?7:Ve}function pe(Re,Ve){return c(t.utcSunday.count(t.utcYear(Re)-1,Re),Ve,2)}function we(Re){var Ve=Re.getUTCDay();return Ve>=4||Ve===0?t.utcThursday(Re):t.utcThursday.ceil(Re)}function Fe(Re,Ve){return Re=we(Re),c(t.utcThursday.count(t.utcYear(Re),Re)+(t.utcYear(Re).getUTCDay()===4),Ve,2)}function Se(Re){return Re.getUTCDay()}function ke(Re,Ve){return c(t.utcMonday.count(t.utcYear(Re)-1,Re),Ve,2)}function _e(Re,Ve){return c(Re.getUTCFullYear()%100,Ve,2)}function Ie(Re,Ve){return Re=we(Re),c(Re.getUTCFullYear()%100,Ve,2)}function Oe(Re,Ve){return c(Re.getUTCFullYear()%1e4,Ve,4)}function Qe(Re,Ve){var ct=Re.getUTCDay();return Re=ct>=4||ct===0?t.utcThursday(Re):t.utcThursday.ceil(Re),c(Re.getUTCFullYear()%1e4,Ve,4)}function et(){return"+0000"}function _t(){return"%"}function ut(Re){return+Re}function vt(Re){return Math.floor(+Re/1e3)}var Xe;mt({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 mt(Re){return Xe=a(Re),e.timeFormat=Xe.format,e.timeParse=Xe.parse,e.utcFormat=Xe.utcFormat,e.utcParse=Xe.utcParse,Xe}var bt="%Y-%m-%dT%H:%M:%S.%LZ";function Ne(Re){return Re.toISOString()}var Ue=Date.prototype.toISOString?Ne:e.utcFormat(bt);function Ge(Re){var Ve=new Date(Re);return isNaN(Ve)?null:Ve}var je=+new Date("2000-01-01T00:00:00.000Z")?Ge:e.utcParse(bt);e.isoFormat=Ue,e.isoParse=je,e.timeFormatDefaultLocale=mt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var gN=W((oC,Kse)=>{(function(e,t){typeof oC=="object"&&typeof Kse!="undefined"?t(oC):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(oC,(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((y=(T=A?T.toExponential(A-1):T.toExponential()).indexOf("e"))<0)return null;var y,E=T.slice(0,y);return[E.length>1?E[0]+E.slice(2):E,+T.slice(y+1)]}function i(T){return T=r(Math.abs(T)),T?T[1]:NaN}function n(T,A){return function(y,E){for(var S=y.length,C=[],k=0,D=T[0],F=0;S>0&&D>0&&(F+D+1>E&&(D=Math.max(1,E-F)),C.push(y.substring(S-=D,S+D)),!((F+=D+1)>E));)D=T[k=(k+1)%T.length];return C.reverse().join(A)}}function a(T){return function(A){return A.replace(/[0-9]/g,function(y){return T[+y]})}}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,y=1,E=-1,S;y0&&(E=0);break}return E>0?T.slice(0,E)+T.slice(S+1):T}var c;function f(T,A){var y=r(T,A);if(!y)return T+"";var E=y[0],S=y[1],C=S-(c=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,k=E.length;return C===k?E:C>k?E+new Array(C-k+1).join("0"):C>0?E.slice(0,C)+"."+E.slice(C):"0."+new Array(1-C).join("0")+r(T,Math.max(0,A+C-1))[0]}function h(T,A){var y=r(T,A);if(!y)return T+"";var E=y[0],S=y[1];return S<0?"0."+new Array(-S).join("0")+E:E.length>S+1?E.slice(0,S+1)+"."+E.slice(S+1):E+new Array(S-E.length+2).join("0")}var d={"%":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 h(T*100,A)},r:h,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 v=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(T){var A=T.grouping===void 0||T.thousands===void 0?p:n(v.call(T.grouping,Number),T.thousands+""),y=T.currency===void 0?"":T.currency[0]+"",E=T.currency===void 0?"":T.currency[1]+"",S=T.decimal===void 0?".":T.decimal+"",C=T.numerals===void 0?p:a(v.call(T.numerals,String)),k=T.percent===void 0?"%":T.percent+"",D=T.minus===void 0?"-":T.minus+"",F=T.nan===void 0?"NaN":T.nan+"";function P(L){L=s(L);var I=L.fill,B=L.align,O=L.sign,$=L.symbol,Y=L.zero,K=L.width,j=L.comma,q=L.precision,J=L.trim,U=L.type;U==="n"?(j=!0,U="g"):d[U]||(q===void 0&&(q=12),J=!0,U="g"),(Y||I==="0"&&B==="=")&&(Y=!0,I="0",B="=");var V=$==="$"?y:$==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",X=$==="$"?E:/[%p]/.test(U)?k:"",H=d[U],G=/[defgprs%]/.test(U);q=q===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,q)):Math.max(0,Math.min(20,q));function Q(te){var ce=V,ge=X,Ce,be,he;if(U==="c")ge=H(te)+ge,te="";else{te=+te;var oe=te<0||1/te<0;if(te=isNaN(te)?F:H(Math.abs(te),q),J&&(te=u(te)),oe&&+te==0&&O!=="+"&&(oe=!1),ce=(oe?O==="("?O:D:O==="-"||O==="("?"":O)+ce,ge=(U==="s"?m[8+c/3]:"")+ge+(oe&&O==="("?")":""),G){for(Ce=-1,be=te.length;++Cehe||he>57){ge=(he===46?S+te.slice(Ce+1):te.slice(Ce))+ge,te=te.slice(0,Ce);break}}}j&&!Y&&(te=A(te,1/0));var Ee=ce.length+te.length+ge.length,ye=Ee>1)+ce+te+ge+ye.slice(Ee);break;default:te=ye+ce+te+ge;break}return C(te)}return Q.toString=function(){return L+""},Q}function R(L,I){var B=P((L=s(L),L.type="f",L)),O=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,$=Math.pow(10,-O),Y=m[8+O/3];return function(K){return B($*K)+Y}}return{format:P,formatPrefix:R}}var w;b({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function b(T){return w=g(T),e.format=w.format,e.formatPrefix=w.formatPrefix,w}function _(T){return Math.max(0,-i(Math.abs(T)))}function M(T,A){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(i(A)/3)))*3-i(Math.abs(T)))}function x(T,A){return T=Math.abs(T),A=Math.abs(A)-T,Math.max(0,i(A)-i(T))+1}e.FormatSpecifier=l,e.formatDefaultLocale=b,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=_,e.precisionPrefix=M,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var Qse=W((y7r,Jse)=>{"use strict";Jse.exports=function(e){for(var t=e.length,r,i=0;i13)&&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 sn=W((x7r,ele)=>{"use strict";var j1t=Qse();ele.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&j1t(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Kn=W((_7r,tle)=>{"use strict";tle.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 mN=W((sC,rle)=>{(function(e,t){typeof sC=="object"&&typeof rle!="undefined"?t(sC):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(sC,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i>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},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var v=new ArrayBuffer(s),m=new Uint8Array(v);for(u=0;u>4,m[c++]=(h&15)<<4|d>>2,m[c++]=(d&3)<<6|p&63;return v};e.decode=a,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var oy=W((b7r,ile)=>{"use strict";ile.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 yc=W(Lp=>{"use strict";var $1t=mN().decode,W1t=oy(),yN=Array.isArray,Y1t=ArrayBuffer,X1t=DataView;function nle(e){return Y1t.isView(e)&&!(e instanceof X1t)}Lp.isTypedArray=nle;function lC(e){return yN(e)||nle(e)}Lp.isArrayOrTypedArray=lC;function Z1t(e){return!lC(e[0])}Lp.isArray1D=Z1t;Lp.ensureArray=function(e,t){return yN(e)||(e=[]),e.length=t,e};var Qu={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};Qu.uint8c=Qu.u1c;Qu.uint8=Qu.u1;Qu.int8=Qu.i1;Qu.uint16=Qu.u2;Qu.int16=Qu.i2;Qu.uint32=Qu.u4;Qu.int32=Qu.i4;Qu.float32=Qu.f4;Qu.float64=Qu.f8;function xN(e){return e.constructor===ArrayBuffer}Lp.isArrayBuffer=xN;Lp.decodeTypedArraySpec=function(e){var t=[],r=K1t(e),i=r.dtype,n=Qu[i];if(!n)throw new Error('Error in dtype: "'+i+'"');var a=n.BYTES_PER_ELEMENT,o=r.bdata;xN(o)||(o=$1t(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new n(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var ole=sn(),bN=yc().isArrayOrTypedArray;cle.exports=function(t,r){if(ole(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var i=r.split("."),n,a,o,s;for(s=0;s{"use strict";var B3=k6(),rgt=/^\w*$/,igt=0,fle=1,uC=2,hle=3,Sx=4;dle.exports=function(t,r,i,n){i=i||"name",n=n||"value";var a,o,s,l={};r&&r.length?(s=B3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|uC,f.set(h,null);if(c){for(a=d;a{"use strict";var ngt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,agt=/^[^\.\[\]]+$/;vle.exports=function(e,t){for(;t;){var r=e.match(ngt);if(r)e=r[1];else if(e.match(agt))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 cC=W((S7r,mle)=>{"use strict";var ogt=sn();mle.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var i=Math.log(Math.min(r[0],r[1]))/Math.LN10;return ogt(i)||(i=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),i}});var _le=W((E7r,xle)=>{"use strict";var yle=yc().isArrayOrTypedArray,C6=oy();xle.exports=function e(t,r){for(var i in r){var n=r[i],a=t[i];if(a!==n)if(i.charAt(0)==="_"||typeof n=="function"){if(i in t)continue;t[i]=n}else if(yle(n)&&yle(a)&&C6(n[0])){if(i==="customdata"||i==="ids")continue;for(var o=Math.min(n.length,a.length),s=0;ssgt,modHalf:()=>lgt});function sgt(e,t){let r=e%t;return r<0?r+t:r}function lgt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var O3=Ea(()=>{"use strict"});var tn=W(L6=>{"use strict";var ble=oy(),D6=Array.isArray;function ugt(e,t){var r,i;for(r=0;r{"use strict";wle.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;i===void 0&&(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}});var P6=W((D7r,Tle)=>{"use strict";Tle.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var sy=W((F7r,Sle)=>{"use strict";var Ale=P6(),Mle=Ho(),wN=Mle({editType:"none"});wN.family.dflt=Ale.HOVERFONT;wN.size.dflt=Ale.HOVERFONTSIZE;Sle.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:wN,grouptitlefont:Mle({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 N3=W((L7r,Ele)=>{"use strict";var cgt=Ho(),I6=sy().hoverlabel,R6=tn().extendFlat;Ele.exports={hoverlabel:{bgcolor:R6({},I6.bgcolor,{arrayOk:!0}),bordercolor:R6({},I6.bordercolor,{arrayOk:!0}),font:cgt({arrayOk:!0,editType:"none"}),align:R6({},I6.align,{arrayOk:!0}),namelength:R6({},I6.namelength,{arrayOk:!0}),showarrow:R6({},I6.showarrow),editType:"none"}}});var Wa=W((P7r,kle)=>{"use strict";var fgt=Ho(),hgt=N3();kle.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:fgt({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:hgt.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var _ce=W((N7r,xce)=>{var pU=Object.defineProperty,dgt=Object.getOwnPropertyDescriptor,pgt=Object.getOwnPropertyNames,vgt=Object.prototype.hasOwnProperty,ggt=(e,t)=>{for(var r in t)pU(e,r,{get:t[r],enumerable:!0})},mgt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pgt(t))!vgt.call(e,n)&&n!==r&&pU(e,n,{get:()=>t[n],enumerable:!(i=dgt(t,n))||i.enumerable});return e},ygt=e=>mgt(pU({},"__esModule",{value:!0}),e),qle={};ggt(qle,{a98:()=>uxt,average:()=>pmt,averageAngle:()=>Jv,averageNumber:()=>tue,blend:()=>d2t,blerp:()=>YN,clampChroma:()=>P2t,clampGamut:()=>UU,clampRgb:()=>L2t,colorsNamed:()=>Nle,convertA98ToXyz65:()=>XN,convertCubehelixToRgb:()=>Qle,convertDlchToLab65:()=>xC,convertHsiToRgb:()=>uue,convertHslToRgb:()=>hue,convertHsvToRgb:()=>_U,convertHwbToRgb:()=>gue,convertItpToXyz65:()=>KN,convertJabToJch:()=>QN,convertJabToRgb:()=>SU,convertJabToXyz65:()=>AU,convertJchToJab:()=>eU,convertLab65ToDlch:()=>_C,convertLab65ToRgb:()=>G6,convertLab65ToXyz65:()=>mU,convertLabToLch:()=>Mg,convertLabToRgb:()=>kU,convertLabToXyz50:()=>DC,convertLchToLab:()=>Sg,convertLchuvToLuv:()=>FU,convertLrgbToOklab:()=>LU,convertLrgbToRgb:()=>Px,convertLuvToLchuv:()=>DU,convertLuvToXyz50:()=>wC,convertOkhslToOklab:()=>iU,convertOkhsvToOklab:()=>aU,convertOklabToLrgb:()=>Y3,convertOklabToOkhsl:()=>rU,convertOklabToOkhsv:()=>nU,convertOklabToRgb:()=>$6,convertP3ToXyz65:()=>oU,convertProphotoToXyz50:()=>uU,convertRec2020ToXyz65:()=>fU,convertRgbToCubehelix:()=>Jle,convertRgbToHsi:()=>cue,convertRgbToHsl:()=>due,convertRgbToHsv:()=>bU,convertRgbToHwb:()=>mue,convertRgbToJab:()=>MU,convertRgbToLab:()=>CU,convertRgbToLab65:()=>H6,convertRgbToLrgb:()=>Lx,convertRgbToOklab:()=>j6,convertRgbToXyb:()=>jue,convertRgbToXyz50:()=>W3,convertRgbToXyz65:()=>ly,convertRgbToYiq:()=>Jue,convertXybToRgb:()=>$ue,convertXyz50ToLab:()=>FC,convertXyz50ToLuv:()=>bC,convertXyz50ToProphoto:()=>lU,convertXyz50ToRgb:()=>$3,convertXyz50ToXyz65:()=>Zue,convertXyz65ToA98:()=>ZN,convertXyz65ToItp:()=>JN,convertXyz65ToJab:()=>TU,convertXyz65ToLab65:()=>yU,convertXyz65ToP3:()=>sU,convertXyz65ToRec2020:()=>cU,convertXyz65ToRgb:()=>uy,convertXyz65ToXyz50:()=>Xue,convertYiqToRgb:()=>Que,converter:()=>ys,cubehelix:()=>cxt,differenceCie76:()=>smt,differenceCie94:()=>lmt,differenceCiede2000:()=>umt,differenceCmc:()=>cmt,differenceEuclidean:()=>j3,differenceHueChroma:()=>V6,differenceHueNaive:()=>eue,differenceHueSaturation:()=>U6,differenceHyab:()=>fmt,differenceItp:()=>dmt,differenceKotsarenkoRamos:()=>hmt,displayable:()=>NU,dlab:()=>fxt,dlch:()=>hxt,easingGamma:()=>pce,easingInOutSine:()=>sxt,easingMidpoint:()=>sce,easingSmootherstep:()=>axt,easingSmoothstep:()=>rxt,easingSmoothstepInverse:()=>ixt,filterBrightness:()=>V2t,filterContrast:()=>G2t,filterDeficiencyDeuter:()=>ext,filterDeficiencyProt:()=>Q2t,filterDeficiencyTrit:()=>txt,filterGrayscale:()=>$2t,filterHueRotate:()=>Y2t,filterInvert:()=>W2t,filterSaturate:()=>j2t,filterSepia:()=>H2t,fixupAlpha:()=>Cu,fixupHueDecreasing:()=>rmt,fixupHueIncreasing:()=>tmt,fixupHueLonger:()=>emt,fixupHueShorter:()=>Kv,formatCss:()=>o2t,formatHex:()=>s2t,formatHex8:()=>l2t,formatHsl:()=>c2t,formatRgb:()=>u2t,getMode:()=>yf,hsi:()=>dxt,hsl:()=>pxt,hsv:()=>vxt,hwb:()=>gxt,inGamut:()=>IC,interpolate:()=>w2t,interpolateWith:()=>uce,interpolateWithPremultipliedAlpha:()=>T2t,interpolatorLinear:()=>Ni,interpolatorPiecewise:()=>Zle,interpolatorSplineBasis:()=>fce,interpolatorSplineBasisClosed:()=>hce,interpolatorSplineMonotone:()=>S2t,interpolatorSplineMonotone2:()=>E2t,interpolatorSplineMonotoneClosed:()=>k2t,interpolatorSplineNatural:()=>A2t,interpolatorSplineNaturalClosed:()=>M2t,itp:()=>mxt,jab:()=>yxt,jch:()=>xxt,lab:()=>_xt,lab65:()=>bxt,lch:()=>wxt,lch65:()=>Txt,lchuv:()=>Axt,lerp:()=>kx,lrgb:()=>Mxt,luv:()=>Sxt,mapAlphaDivide:()=>oce,mapAlphaMultiply:()=>ace,mapTransferGamma:()=>y2t,mapTransferLinear:()=>BU,mapper:()=>W6,modeA98:()=>Kle,modeCubehelix:()=>rue,modeDlab:()=>sue,modeDlch:()=>lue,modeHsi:()=>fue,modeHsl:()=>xU,modeHsv:()=>wU,modeHwb:()=>xue,modeItp:()=>wue,modeJab:()=>Tue,modeJch:()=>Aue,modeLab:()=>LC,modeLab65:()=>Sue,modeLch:()=>PC,modeLch65:()=>kue,modeLchuv:()=>Fue,modeLrgb:()=>Lue,modeLuv:()=>Pue,modeOkhsl:()=>Rue,modeOkhsv:()=>zue,modeOklab:()=>que,modeOklch:()=>Nue,modeP3:()=>Uue,modeProphoto:()=>Vue,modeRec2020:()=>Gue,modeRgb:()=>Fx,modeXyb:()=>Wue,modeXyz50:()=>Yue,modeXyz65:()=>Kue,modeYiq:()=>ece,nearest:()=>z2t,okhsl:()=>Ext,okhsv:()=>kxt,oklab:()=>Cxt,oklch:()=>Dxt,p3:()=>Fxt,parse:()=>Wle,parseHex:()=>Vle,parseHsl:()=>vue,parseHslLegacy:()=>pue,parseHwb:()=>yue,parseLab:()=>Mue,parseLch:()=>Eue,parseNamed:()=>Ule,parseOklab:()=>Bue,parseOklch:()=>Oue,parseRgb:()=>Yle,parseRgbLegacy:()=>Gle,parseTransparent:()=>Xle,prophoto:()=>Lxt,random:()=>m2t,rec2020:()=>Pxt,removeParser:()=>Lgt,rgb:()=>Ixt,round:()=>tce,samples:()=>F2t,serializeHex:()=>zU,serializeHex8:()=>rce,serializeHsl:()=>nce,serializeRgb:()=>ice,toGamut:()=>I2t,trilerp:()=>Ggt,unlerp:()=>Vgt,useMode:()=>jo,useParser:()=>jle,wcagContrast:()=>lxt,wcagLuminance:()=>dU,xyb:()=>Rxt,xyz50:()=>zxt,xyz65:()=>Bxt,yiq:()=>qxt});xce.exports=ygt(qle);var xgt=(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}}},Ole=xgt,_gt={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},Nle=_gt,bgt=e=>Ole(Nle[e.toLowerCase()],6),Ule=bgt,wgt=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Tgt=e=>{let t;return(t=e.match(wgt))?Ole(parseInt(t[1],16),t[1].length):void 0},Vle=Tgt,Lh="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",I7r=`(?:${Lh}|none)`,q6=`${Lh}%`,R7r=`(?:${Lh}%|none)`,vU=`(?:${Lh}%|${Lh})`,Agt=`(?:${Lh}%|${Lh}|none)`,Mgt=`(?:${Lh}(deg|grad|rad|turn)|${Lh})`,z7r=`(?:${Lh}(deg|grad|rad|turn)|${Lh}|none)`,G3="\\s*,\\s*",B7r=new RegExp("^"+Agt+"$"),Sgt=new RegExp(`^rgba?\\(\\s*${Lh}${G3}${Lh}${G3}${Lh}\\s*(?:,\\s*${vU}\\s*)?\\)$`),Egt=new RegExp(`^rgba?\\(\\s*${q6}${G3}${q6}${G3}${q6}\\s*(?:,\\s*${vU}\\s*)?\\)$`),kgt=e=>{let t={mode:"rgb"},r;if(r=e.match(Sgt))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(Egt))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},Gle=kgt,Cgt=(e,t)=>e===void 0?void 0:typeof e!="object"?Wle(e):e.mode!==void 0?e:t?ma(fn({},e),{mode:t}):void 0,Pp=Cgt,Dgt=(e="rgb")=>t=>(t=Pp(t,e))!==void 0?t.mode===e?t:Zv[t.mode][e]?Zv[t.mode][e](t):e==="rgb"?Zv[t.mode].rgb(t):Zv.rgb[e](Zv[t.mode].rgb(t)):void 0,ys=Dgt,Zv={},Hle={},H3=[],gU={},Fgt=e=>e,jo=e=>(Zv[e.mode]=fn(fn({},Zv[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{Zv[t]||(Zv[t]={}),Zv[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=Fgt)}),Hle[e.mode]=e,(e.parse||[]).forEach(t=>{jle(t,e.mode)}),ys(e.mode)),yf=e=>Hle[e],jle=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");gU[e]=t}else typeof e=="function"&&H3.indexOf(e)<0&&H3.push(e)},Lgt=e=>{if(typeof e=="string")delete gU[e];else if(typeof e=="function"){let t=H3.indexOf(e);t>0&&H3.splice(t,1)}},$N=/[^\x00-\x7F]|[a-zA-Z_]/,Pgt=/[^\x00-\x7F]|[-\w]/,bi={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},ia=0;function fC(e){let t=e[ia],r=e[ia+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[ia+2]):t==="."?/\d/.test(r):/\d/.test(t)}function WN(e){if(ia>=e.length)return!1;let t=e[ia];if($N.test(t))return!0;if(t==="-"){if(e.length-ia<2)return!1;let r=e[ia+1];return!!(r==="-"||$N.test(r))}return!1}var Igt={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function z6(e){let t="";if((e[ia]==="-"||e[ia]==="+")&&(t+=e[ia++]),t+=hC(e),e[ia]==="."&&/\d/.test(e[ia+1])&&(t+=e[ia++]+hC(e)),(e[ia]==="e"||e[ia]==="E")&&((e[ia+1]==="-"||e[ia+1]==="+")&&/\d/.test(e[ia+2])?t+=e[ia++]+e[ia++]+hC(e):/\d/.test(e[ia+1])&&(t+=e[ia++]+hC(e))),WN(e)){let r=vC(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:bi.Hue,value:t*Igt[r]}:void 0}return e[ia]==="%"?(ia++,{type:bi.Percentage,value:+t}):{type:bi.Number,value:+t}}function hC(e){let t="";for(;/\d/.test(e[ia]);)t+=e[ia++];return t}function vC(e){let t="";for(;ia4)){if(r.length===4){if(r[3].type!==bi.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:bi.None,value:void 0}),r.every(n=>n.type!==bi.Alpha)?r:void 0}}function qgt(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==bi.Function)return;let i=$le(e,t);if(i)return i.unshift(r.value),i}var Ogt=e=>{if(typeof e!="string")return;let t=zgt(e),r=t?qgt(t,!0):void 0,i,n=0,a=H3.length;for(;ne==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Xle=Ugt,kx=(e,t,r)=>e+r*(t-e),Vgt=(e,t,r)=>(r-e)/(t-e),YN=(e,t,r,i,n,a)=>kx(kx(e,t,n),kx(r,i,n),a),Ggt=(e,t,r,i,n,a,o,s,l,u,c)=>kx(YN(e,t,r,i,l,u),YN(n,a,o,s,l,u),c),Hgt=e=>{let t=[];for(let r=0;rt=>{let r=Hgt(t);return i=>{let n=i*r.length,a=i>=1?r.length-1:Math.max(Math.floor(n),0),o=r[a];return o===void 0?void 0:e(o[0],o[1],n-a)}},Ni=Zle(kx),Cu=e=>{let t=!1,r=e.map(i=>i!==void 0?(t=!0,i):1);return t?r:e},jgt={mode:"rgb",channels:["r","g","b","alpha"],parse:[Yle,Vle,Gle,Ule,Xle,"srgb"],serialize:"srgb",interpolate:{r:Ni,g:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Fx=jgt,TN=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),$gt=e=>{let t=TN(e.r),r=TN(e.g),i=TN(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 e.alpha!==void 0&&(n.alpha=e.alpha),n},XN=$gt,AN=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Wgt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"a98",r:AN(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:AN(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:AN(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return i!==void 0&&(n.alpha=i),n},ZN=Wgt,MN=(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)},Ygt=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:MN(e),g:MN(t),b:MN(r)};return i!==void 0&&(n.alpha=i),n},Lx=Ygt,Xgt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(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 n!==void 0&&(a.alpha=n),a},ly=Xgt,SN=(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},Zgt=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:SN(e),g:SN(t),b:SN(r)};return i!==void 0&&(a.alpha=i),a},Px=Zgt,Kgt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({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 i!==void 0&&(n.alpha=i),n},uy=Kgt,Jgt=ma(fn({},Fx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>ZN(ly(e)),xyz65:ZN},toMode:{rgb:e=>uy(XN(e)),xyz65:XN}}),Kle=Jgt,Qgt=e=>(e=e%360)<0?e+360:e,Yc=Qgt,AC=(e,t)=>e.map((r,i,n)=>{if(r===void 0)return r;let a=Yc(r);return i===0||e[i-1]===void 0?a:t(a-Yc(n[i-1]))}).reduce((r,i)=>!r.length||i===void 0||r[r.length-1]===void 0?(r.push(i),r):(r.push(i+r[r.length-1]),r),[]),Kv=e=>AC(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),emt=e=>AC(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),tmt=e=>AC(e,t=>t>=0?t:t+360),rmt=e=>AC(e,t=>t<=0?t:t-360),xc=[-.14861,1.78277,-.29227,-.90649,1.97294,0],imt=Math.PI/180,nmt=180/Math.PI,Cle=xc[3]*xc[4],Dle=xc[1]*xc[4],Fle=xc[1]*xc[2]-xc[0]*xc[3],amt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(Fle*r+e*Cle-t*Dle)/(Fle+Cle-Dle),a=r-n,o=(xc[4]*(t-n)-xc[2]*a)/xc[3],s={mode:"cubehelix",l:n,s:n===0||n===1?void 0:Math.sqrt(a*a+o*o)/(xc[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*nmt-120),i!==void 0&&(s.alpha=i),s},Jle=amt,omt=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(e===void 0?0:e+120)*imt,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(xc[0]*o+xc[1]*s),n.g=r+a*(xc[2]*o+xc[3]*s),n.b=r+a*(xc[4]*o+xc[5]*s),i!==void 0&&(n.alpha=i),n},Qle=omt,U6=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Yc(e.h),i=Yc(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},eue=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Yc(e.h),i=Yc(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},V6=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Yc(e.h),i=Yc(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},j3=(e="rgb",t=[1,1,1,0])=>{let r=yf(e),i=r.channels,n=r.difference,a=ys(e);return(o,s)=>{let l=a(o),u=a(s);return Math.sqrt(i.reduce((c,f,h)=>{let d=n[f]?n[f](l,u):l[f]-u[f];return c+(t[h]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},smt=()=>j3("lab65"),lmt=(e=1,t=.045,r=.015)=>{let i=ys("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,d=s.a,p=s.b,v=Math.sqrt(d*d+p*p),m=Math.pow(l-h,2),g=Math.pow(f-v,2),w=Math.pow(u-d,2)+Math.pow(c-p,2)-g;return Math.sqrt(m/Math.pow(e,2)+g/Math.pow(1+t*f,2)+w/Math.pow(1+r*f,2))}},umt=(e=1,t=1,r=1)=>{let i=ys("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,d=s.a,p=s.b,v=Math.sqrt(d*d+p*p),m=(f+v)/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+Math.pow(25,7)))),w=u*(1+g),b=d*(1+g),_=Math.sqrt(w*w+c*c),M=Math.sqrt(b*b+p*p),x=Math.abs(w)+Math.abs(c)===0?0:Math.atan2(c,w);x+=(x<0)*2*Math.PI;let T=Math.abs(b)+Math.abs(p)===0?0:Math.atan2(p,b);T+=(T<0)*2*Math.PI;let A=h-l,y=M-_,E=_*M===0?0:T-x;E-=(E>Math.PI)*2*Math.PI,E+=(E<-Math.PI)*2*Math.PI;let S=2*Math.sqrt(_*M)*Math.sin(E/2),C=(l+h)/2,k=(_+M)/2,D;_*M===0?D=x+T:(D=(x+T)/2,D-=(Math.abs(x-T)>Math.PI)*Math.PI,D+=(D<0)*2*Math.PI);let F=Math.pow(C-50,2),P=1-.17*Math.cos(D-Math.PI/6)+.24*Math.cos(2*D)+.32*Math.cos(3*D+Math.PI/30)-.2*Math.cos(4*D-63*Math.PI/180),R=1+.015*F/Math.sqrt(20+F),L=1+.045*k,I=1+.015*k*P,B=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*D-275)/25,2)),O=2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))),$=-1*Math.sin(2*B)*O;return Math.sqrt(Math.pow(A/(e*R),2)+Math.pow(y/(t*L),2)+Math.pow(S/(r*I),2)+$*y/(t*L)*S/(r*I))}},cmt=(e=1,t=1)=>{let r=ys("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(n),h=f.l,d=f.a,p=f.b,v=Math.sqrt(d*d+p*p),m=Math.pow(o-h,2),g=Math.pow(u-v,2),w=Math.pow(s-d,2)+Math.pow(l-p,2)-g,b=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),_=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)),M=o<16?.511:.040975*o/(1+.01765*o),x=.0638*u/(1+.0131*u)+.638,T=x*(b*_+1-b);return Math.sqrt(m/Math.pow(e*M,2)+g/Math.pow(t*x,2)+w/Math.pow(T,2))}},fmt=()=>{let e=ys("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)}},hmt=()=>j3("yiq",[.5053,.299,.1957]),dmt=()=>j3("itp",[518400,129600,518400]),Jv=e=>{let t=e.reduce((i,n)=>{if(n!==void 0){let a=n*Math.PI/180;i.sin+=Math.sin(a),i.cos+=Math.cos(a)}return i},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},tue=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,i)=>r+i,0)/t.length:void 0},EN=e=>typeof e=="function";function pmt(e,t="rgb",r){let i=yf(t),n=e.map(ys(t));return i.channels.reduce((a,o)=>{let s=n.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;EN(r)?l=r:r&&EN(r[o])?l=r[o]:i.average&&EN(i.average[o])?l=i.average[o]:l=tue,a[o]=l(s,o)}return a},{mode:t})}var vmt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Jle},toMode:{rgb:Qle},interpolate:{h:{use:Ni,fixup:Kv},s:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},rue=vmt,gmt=({l:e,a:t,b:r,alpha:i},n="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},Mg=gmt,mmt=({l:e,c:t,h:r,alpha:i},n="lab")=>{r===void 0&&(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 i!==void 0&&(a.alpha=i),a},Sg=mmt,iue=Math.pow(29,3)/Math.pow(3,3),nue=Math.pow(6,3)/Math.pow(29,3),ku={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},V3={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},q7r=Math.pow(29,3)/Math.pow(3,3),O7r=Math.pow(6,3)/Math.pow(29,3),kN=e=>Math.pow(e,3)>nue?Math.pow(e,3):(116*e-16)/iue,ymt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:kN(a)*V3.X,y:kN(n)*V3.Y,z:kN(o)*V3.Z};return i!==void 0&&(s.alpha=i),s},mU=ymt,xmt=e=>uy(mU(e)),G6=xmt,CN=e=>e>nue?Math.cbrt(e):(iue*e+16)/116,_mt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=CN(e/V3.X),a=CN(t/V3.Y),o=CN(r/V3.Z),s={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},yU=_mt,bmt=e=>{let t=yU(ly(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},H6=bmt,gC=1,aue=1,N6=26/180*Math.PI,mC=Math.cos(N6),yC=Math.sin(N6),oue=100/Math.log(139/100),wmt=({l:e,c:t,h:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"lab65",l:(Math.exp(e*gC/oue)-1)/.0039},a=(Math.exp(.0435*t*aue*gC)-1)/.075,o=a*Math.cos(r/180*Math.PI-N6),s=a*Math.sin(r/180*Math.PI-N6);return n.a=o*mC-s/.83*yC,n.b=o*yC+s/.83*mC,i!==void 0&&(n.alpha=i),n},xC=wmt,Tmt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=t*mC+r*yC,a=.83*(r*mC-t*yC),o=Math.sqrt(n*n+a*a),s={mode:"dlch",l:oue/gC*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*aue*gC)};return s.c&&(s.h=Yc((Math.atan2(a,n)+N6)/Math.PI*180)),i!==void 0&&(s.alpha=i),s},_C=Tmt,Lle=e=>xC(Mg(e,"dlch")),Ple=e=>Sg(_C(e),"dlab"),Amt={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Lle,rgb:e=>G6(Lle(e))},fromMode:{lab65:Ple,rgb:e=>Ple(H6(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},sue=Amt,Mmt={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:xC,dlab:e=>Sg(e,"dlab"),rgb:e=>G6(xC(e))},fromMode:{lab65:_C,dlab:e=>Mg(e,"dlch"),rgb:e=>_C(H6(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ni,c:Ni,h:{use:Ni,fixup:Kv},alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},lue=Mmt;function uue({h:e,s:t,i:r,alpha:i}){e=Yc(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(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",i!==void 0&&(a.alpha=i),a}function cue({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(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{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},kmt=Emt,Cmt=new RegExp(`^hsla?\\(\\s*${Mgt}${G3}${q6}${G3}${q6}\\s*(?:,\\s*${vU}\\s*)?\\)$`),Dmt=e=>{let t=e.match(Cmt);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=kmt(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},pue=Dmt;function Fmt(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Percentage)return;r.h=i.value}if(n.type!==bi.None){if(n.type===bi.Hue)return;r.s=n.value/100}if(a.type!==bi.None){if(a.type===bi.Hue)return;r.l=a.value/100}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var vue=Fmt,Lmt={mode:"hsl",toMode:{rgb:hue},fromMode:{rgb:due},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[vue,pue],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:Ni,fixup:Kv},s:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},xU=Lmt;function _U({h:e,s:t,v:r,alpha:i}){e=Yc(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={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,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",i!==void 0&&(a.alpha=i),a}function bU({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:n===0?0:1-a/n,v:n};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t1){let n=t+r;t/=n,r/=n}return _U({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:i})}function mue(e){let t=bU(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function Imt(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Percentage)return;r.h=i.value}if(n.type!==bi.None){if(n.type===bi.Hue)return;r.w=n.value/100}if(a.type!==bi.None){if(a.type===bi.Hue)return;r.b=a.value/100}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var yue=Imt,Rmt={mode:"hwb",toMode:{rgb:gue},fromMode:{rgb:mue},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[yue],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:Ni,fixup:Kv},w:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:eue},average:{h:Jv}},xue=Rmt,_ue=203,MC=.1593017578125,bue=78.84375,SC=.8359375,EC=18.8515625,kC=18.6875;function DN(e){if(e<0)return 0;let t=Math.pow(e,1/bue);return 1e4*Math.pow(Math.max(0,t-SC)/(EC-kC*t),1/MC)}function FN(e){if(e<0)return 0;let t=Math.pow(e/1e4,MC);return Math.pow((SC+EC*t)/(1+kC*t),bue)}var LN=e=>Math.max(e/_ue,0),zmt=({i:e,t,p:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=DN(e+.008609037037932761*t+.11102962500302593*r),a=DN(e-.00860903703793275*t-.11102962500302599*r),o=DN(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:LN(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:LN(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:LN(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return i!==void 0&&(s.alpha=i),s},KN=zmt,PN=(e=0)=>Math.max(e*_ue,0),Bmt=({x:e,y:t,z:r,alpha:i})=>{let n=PN(e),a=PN(t),o=PN(r),s=FN(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=FN(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),u=FN(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,h=4.378173828125*s-4.24560546875*l-.132568359375*u,d={mode:"itp",i:c,t:f,p:h};return i!==void 0&&(d.alpha=i),d},JN=Bmt,qmt={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:KN,rgb:e=>uy(KN(e))},fromMode:{xyz65:JN,rgb:e=>JN(ly(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ni,t:Ni,p:Ni,alpha:{use:Ni,fixup:Cu}}},wue=qmt,Omt=134.03437499999998,Nmt=16295499532821565e-27,IN=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,MC);return Math.pow((SC+EC*t)/(1+kC*t),Omt)},RN=(e=0)=>Math.max(e*203,0),Umt=({x:e,y:t,z:r,alpha:i})=>{e=RN(e),t=RN(t),r=RN(r);let n=1.15*e-.15*r,a=.66*t+.34*e,o=IN(.41478972*n+.579999*a+.014648*r),s=IN(-.20151*n+1.120649*a+.0531008*r),l=IN(-.0166008*n+.2648*a+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Nmt,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return i!==void 0&&(c.alpha=i),c},TU=Umt,Vmt=134.03437499999998,Ile=16295499532821565e-27,zN=e=>{if(e<0)return 0;let t=Math.pow(e,1/Vmt);return 1e4*Math.pow((SC-t)/(kC*t-EC),1/MC)},BN=e=>e/203,Gmt=({j:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+Ile)/(.44+.56*(e+Ile)),a=zN(n+.13860504*t+.058047316*r),o=zN(n-.13860504*t-.058047316*r),s=zN(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:BN(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:BN(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:BN(-.090982811*a-.31272829*o+1.5227666*s)};return i!==void 0&&(l.alpha=i),l},AU=Gmt,Hmt=e=>{let t=TU(ly(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},MU=Hmt,jmt=e=>uy(AU(e)),SU=jmt,$mt={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:MU,xyz65:TU},toMode:{rgb:SU,xyz65:AU},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},Tue=$mt,Wmt=({j:e,a:t,b:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},QN=Wmt,Ymt=({j:e,c:t,h:r,alpha:i})=>{r===void 0&&(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 i!==void 0&&(n.alpha=i),n},eU=Ymt,Xmt={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:eU,rgb:e=>SU(eU(e))},fromMode:{rgb:e=>QN(MU(e)),jab:QN},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ni,fixup:Kv},c:Ni,j:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},Aue=Xmt,CC=Math.pow(29,3)/Math.pow(3,3),EU=Math.pow(6,3)/Math.pow(29,3),qN=e=>Math.pow(e,3)>EU?Math.pow(e,3):(116*e-16)/CC,Zmt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:qN(a)*ku.X,y:qN(n)*ku.Y,z:qN(o)*ku.Z};return i!==void 0&&(s.alpha=i),s},DC=Zmt,Kmt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({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 i!==void 0&&(n.alpha=i),n},$3=Kmt,Jmt=e=>$3(DC(e)),kU=Jmt,Qmt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(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 n!==void 0&&(a.alpha=n),a},W3=Qmt,ON=e=>e>EU?Math.cbrt(e):(CC*e+16)/116,eyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=ON(e/ku.X),a=ON(t/ku.Y),o=ON(r/ku.Z),s={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},FC=eyt,tyt=e=>{let t=FC(W3(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},CU=tyt;function ryt(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,i,n,a,o]=t;if(!(i.type===bi.Hue||n.type===bi.Hue||a.type===bi.Hue))return i.type!==bi.None&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==bi.None&&(r.a=n.type===bi.Number?n.value:n.value*125/100),a.type!==bi.None&&(r.b=a.type===bi.Number?a.value:a.value*125/100),o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Mue=ryt,iyt={mode:"lab",toMode:{xyz50:DC,rgb:kU},fromMode:{xyz50:FC,rgb:CU},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Mue],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:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},LC=iyt,nyt=ma(fn({},LC),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:mU,rgb:G6},fromMode:{xyz65:yU,rgb:H6},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),Sue=nyt;function ayt(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Hue)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==bi.None&&(r.c=Math.max(0,n.type===bi.Number?n.value:n.value*150/100)),a.type!==bi.None){if(a.type===bi.Percentage)return;r.h=a.value}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Eue=ayt,oyt={mode:"lch",toMode:{lab:Sg,rgb:e=>kU(Sg(e))},fromMode:{rgb:e=>Mg(CU(e)),lab:Mg},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Eue],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:Ni,fixup:Kv},c:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},PC=oyt,syt=ma(fn({},PC),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Sg(e,"lab65"),rgb:e=>G6(Sg(e,"lab65"))},fromMode:{rgb:e=>Mg(H6(e),"lch65"),lab65:e=>Mg(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),kue=syt,lyt=({l:e,u:t,v:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},DU=lyt,uyt=({l:e,c:t,h:r,alpha:i})=>{r===void 0&&(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 i!==void 0&&(n.alpha=i),n},FU=uyt,Cue=(e,t,r)=>4*e/(e+15*t+3*r),Due=(e,t,r)=>9*t/(e+15*t+3*r),cyt=Cue(ku.X,ku.Y,ku.Z),fyt=Due(ku.X,ku.Y,ku.Z),hyt=e=>e<=EU?CC*e:116*Math.cbrt(e)-16,dyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=hyt(t/ku.Y),a=Cue(e,t,r),o=Due(e,t,r);!isFinite(a)||!isFinite(o)?n=a=o=0:(a=13*n*(a-cyt),o=13*n*(o-fyt));let s={mode:"luv",l:n,u:a,v:o};return i!==void 0&&(s.alpha=i),s},bC=dyt,pyt=(e,t,r)=>4*e/(e+15*t+3*r),vyt=(e,t,r)=>9*t/(e+15*t+3*r),gyt=pyt(ku.X,ku.Y,ku.Z),myt=vyt(ku.X,ku.Y,ku.Z),yyt=({l:e,u:t,v:r,alpha:i})=>{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 n=t/(13*e)+gyt,a=r/(13*e)+myt,o=ku.Y*(e<=8?e/CC:Math.pow((e+16)/116,3)),s=o*(9*n)/(4*a),l=o*(12-3*n-20*a)/(4*a),u={mode:"xyz50",x:s,y:o,z:l};return i!==void 0&&(u.alpha=i),u},wC=yyt,xyt=e=>DU(bC(W3(e))),_yt=e=>$3(wC(FU(e))),byt={mode:"lchuv",toMode:{luv:FU,rgb:_yt},fromMode:{rgb:xyt,luv:DU},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ni,fixup:Kv},c:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},Fue=byt,wyt=ma(fn({},Fx),{mode:"lrgb",toMode:{rgb:Px},fromMode:{rgb:Lx},parse:["srgb-linear"],serialize:"srgb-linear"}),Lue=wyt,Tyt={mode:"luv",toMode:{xyz50:wC,rgb:e=>$3(wC(e))},fromMode:{xyz50:bC,rgb:e=>bC(W3(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:Ni,u:Ni,v:Ni,alpha:{use:Ni,fixup:Cu}}},Pue=Tyt,Ayt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(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 i!==void 0&&(s.alpha=i),s},LU=Ayt,Myt=e=>{let t=LU(Lx(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},j6=Myt,Syt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(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 i!==void 0&&(s.alpha=i),s},Y3=Syt,Eyt=e=>Px(Y3(e)),$6=Eyt;function tU(e){let i=1.170873786407767;return .5*(i*e-.206+Math.sqrt((i*e-.206)*(i*e-.206)+4*.03*i*e))}function TC(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function kyt(e,t){let r,i,n,a,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+i*e+n*t+a*e*e+o*e*t,f=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let p=1+c*f,v=1+c*h,m=1+c*d,g=p*p*p,w=v*v*v,b=m*m*m,_=3*f*p*p,M=3*h*v*v,x=3*d*m*m,T=6*f*f*p,A=6*h*h*v,y=6*d*d*m,E=s*g+l*w+u*b,S=s*_+l*M+u*x,C=s*T+l*A+u*y;c=c-E*S/(S*S-.5*E*C)}return c}function PU(e,t){let r=kyt(e,t),i=Y3({l:1,a:r*e,b:r*t}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b)),a=n*r;return[n,a]}function Cyt(e,t,r,i,n,a=null){a||(a=PU(e,t));let o;if((r-n)*a[1]-(a[0]-n)*i<=0)o=a[1]*n/(i*a[0]+a[1]*(n-r));else{o=a[1]*(n-1)/(i*(a[0]-1)+a[1]*(n-r));{let s=r-n,l=i,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,h=s+l*u,d=s+l*c,p=s+l*f;{let v=n*(1-o)+o*r,m=o*i,g=v+m*u,w=v+m*c,b=v+m*f,_=g*g*g,M=w*w*w,x=b*b*b,T=3*h*g*g,A=3*d*w*w,y=3*p*b*b,E=6*h*h*g,S=6*d*d*w,C=6*p*p*b,k=4.0767416621*_-3.3077115913*M+.2309699292*x-1,D=4.0767416621*T-3.3077115913*A+.2309699292*y,F=4.0767416621*E-3.3077115913*S+.2309699292*C,P=D/(D*D-.5*k*F),R=-k*P,L=-1.2684380046*_+2.6097574011*M-.3413193965*x-1,I=-1.2684380046*T+2.6097574011*A-.3413193965*y,B=-1.2684380046*E+2.6097574011*S-.3413193965*C,O=I/(I*I-.5*L*B),$=-L*O,Y=-.0041960863*_-.7034186147*M+1.707614701*x-1,K=-.0041960863*T-.7034186147*A+1.707614701*y,j=-.0041960863*E-.7034186147*S+1.707614701*C,q=K/(K*K-.5*Y*j),J=-Y*q;R=P>=0?R:1e6,$=O>=0?$:1e6,J=q>=0?J:1e6,o+=Math.min(R,Math.min($,J))}}}return o}function IU(e,t,r=null){r||(r=PU(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function Iue(e,t,r){let i=PU(t,r),n=Cyt(t,r,e,1,e,i),a=IU(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]),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,n]}function rU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n={mode:"okhsl",l:tU(t)};e.alpha!==void 0&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=Iue(t,r/a,i/a),u;if(arU(j6(e))},toMode:{oklab:iU,rgb:e=>$6(iU(e))}}),Rue=Dyt;function nU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=IU(a,o),u=.5,c=1-u/s,f=l/(n+t*l),h=f*t,d=f*n,p=TC(h),v=d*p/h,m=Y3({l:p,a:a*v,b:o*v}),g=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/g,n=n/g*tU(t)/t,t=tU(t);let w={mode:"okhsv",s:n?(u+l)*d/(l*u+l*c*d):0,v:t?t/h:0};return w.s&&(w.h=Yc(Math.atan2(i,r)*180/Math.PI)),e.alpha!==void 0&&(w.alpha=e.alpha),w}function aU(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,i=e.s!==void 0?e.s:0,n=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=IU(a,o),u=.5,c=1-u/s,f=1-i*u/(u+l-l*c*i),h=i*l*u/(u+l-l*c*i),d=TC(f),p=h*d/f,v=Y3({l:d,a:a*p,b:o*p}),m=Math.cbrt(1/Math.max(v.r,v.g,v.b,0)),g=TC(n*f),w=h*g/f;return t.l=g*m,t.a=w*a*m,t.b=w*o*m,t}var Fyt=ma(fn({},wU),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:nU,rgb:e=>nU(j6(e))},toMode:{oklab:aU,rgb:e=>$6(aU(e))}}),zue=Fyt;function Lyt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,i,n,a,o]=t;if(!(i.type===bi.Hue||n.type===bi.Hue||a.type===bi.Hue))return i.type!==bi.None&&(r.l=Math.min(Math.max(0,i.type===bi.Number?i.value:i.value/100),1)),n.type!==bi.None&&(r.a=n.type===bi.Number?n.value:n.value*.4/100),a.type!==bi.None&&(r.b=a.type===bi.Number?a.value:a.value*.4/100),o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Bue=Lyt,Pyt=ma(fn({},LC),{mode:"oklab",toMode:{lrgb:Y3,rgb:$6},fromMode:{lrgb:LU,rgb:j6},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Bue],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}`:""})`}),que=Pyt;function Iyt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Hue)return;r.l=Math.min(Math.max(0,i.type===bi.Number?i.value:i.value/100),1)}if(n.type!==bi.None&&(r.c=Math.max(0,n.type===bi.Number?n.value:n.value*.4/100)),a.type!==bi.None){if(a.type===bi.Percentage)return;r.h=a.value}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Oue=Iyt,Ryt=ma(fn({},PC),{mode:"oklch",toMode:{oklab:e=>Sg(e,"oklab"),rgb:e=>$6(Sg(e,"oklab"))},fromMode:{rgb:e=>Mg(j6(e),"oklch"),oklab:e=>Mg(e,"oklch")},parse:[Oue],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]}}),Nue=Ryt,zyt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(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 n!==void 0&&(a.alpha=n),a},oU=zyt,Byt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({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 i!==void 0&&(n.alpha=i),n},sU=Byt,qyt=ma(fn({},Fx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>sU(ly(e)),xyz65:sU},toMode:{rgb:e=>uy(oU(e)),xyz65:oU}}),Uue=qyt,NN=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Oyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"prophoto",r:NN(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:NN(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:NN(e*0+t*0+1.2119675456389452*r)};return i!==void 0&&(n.alpha=i),n},lU=Oyt,UN=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Nyt=e=>{let t=UN(e.r),r=UN(e.g),i=UN(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 e.alpha!==void 0&&(n.alpha=e.alpha),n},uU=Nyt,Uyt=ma(fn({},Fx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:lU,rgb:e=>lU(W3(e))},toMode:{xyz50:uU,rgb:e=>$3(uU(e))}}),Vue=Uyt,Rle=1.09929682680944,Vyt=.018053968510807,VN=e=>{let t=Math.abs(e);return t>Vyt?(Math.sign(e)||1)*(Rle*Math.pow(t,.45)-(Rle-1)):4.5*e},Gyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rec2020",r:VN(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:VN(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:VN(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return i!==void 0&&(n.alpha=i),n},cU=Gyt,zle=1.09929682680944,Hyt=.018053968510807,GN=(e=0)=>{let t=Math.abs(e);return t{let t=GN(e.r),r=GN(e.g),i=GN(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 e.alpha!==void 0&&(n.alpha=e.alpha),n},fU=jyt,$yt=ma(fn({},Fx),{mode:"rec2020",fromMode:{xyz65:cU,rgb:e=>cU(ly(e))},toMode:{xyz65:fU,rgb:e=>uy(fU(e))},parse:["rec2020"],serialize:"rec2020"}),Gue=$yt,Cx=.0037930732552754493,Hue=Math.cbrt(Cx),HN=e=>Math.cbrt(e)-Hue,Wyt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(e),a=HN(.3*t+.622*r+.078*i+Cx),o=HN(.23*t+.692*r+.078*i+Cx),s=HN(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+Cx),l={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return n!==void 0&&(l.alpha=n),l},jue=Wyt,jN=e=>Math.pow(e+Hue,3),Yyt=({x:e,y:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=jN(e+t)-Cx,a=jN(t-e)-Cx,o=jN(r+t)-Cx,s=Px({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 i!==void 0&&(s.alpha=i),s},$ue=Yyt,Xyt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:$ue},fromMode:{rgb:jue},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ni,y:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},Wue=Xyt,Zyt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:$3,lab:FC},fromMode:{rgb:W3,lab:DC},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ni,y:Ni,z:Ni,alpha:{use:Ni,fixup:Cu}}},Yue=Zyt,Kyt=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(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 n!==void 0&&(a.alpha=n),a},Xue=Kyt,Jyt=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(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 n!==void 0&&(a.alpha=n),a},Zue=Jyt,Qyt={mode:"xyz65",toMode:{rgb:uy,xyz50:Xue},fromMode:{rgb:ly,xyz50:Zue},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:Ni,y:Ni,z:Ni,alpha:{use:Ni,fixup:Cu}}},Kue=Qyt,e2t=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(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 i!==void 0&&(n.alpha=i),n},Jue=e2t,t2t=({y:e,i:t,q:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(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 i!==void 0&&(n.alpha=i),n},Que=t2t,r2t={mode:"yiq",toMode:{rgb:Que},fromMode:{rgb:Jue},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ni,i:Ni,q:Ni,alpha:{use:Ni,fixup:Cu}}},ece=r2t,i2t=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,n2t=(e=4)=>t=>typeof t=="number"?i2t(t,e):t,tce=n2t,B6=tce(2),O6=e=>Math.max(0,Math.min(1,e||0)),Dx=e=>Math.round(O6(e)*255),RU=ys("rgb"),a2t=ys("hsl"),zU=e=>{if(e===void 0)return;let t=Dx(e.r),r=Dx(e.g),i=Dx(e.b);return"#"+(1<<24|t<<16|r<<8|i).toString(16).slice(1)},rce=e=>{if(e===void 0)return;let t=Dx(e.alpha!==void 0?e.alpha:1);return zU(e)+(256|t).toString(16).slice(1)},ice=e=>{if(e===void 0)return;let t=Dx(e.r),r=Dx(e.g),i=Dx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${B6(O6(e.alpha))})`},nce=e=>{if(e===void 0)return;let t=B6(e.h||0),r=B6(O6(e.s)*100)+"%",i=B6(O6(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${B6(O6(e.alpha))})`},o2t=e=>{let t=Pp(e);if(!t)return;let r=yf(t.mode);if(!r.serialize||typeof r.serialize=="string"){let i=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((n,a)=>{n!=="alpha"&&(i+=(a?" ":"")+(t[n]!==void 0?t[n]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(i+=` / ${t.alpha}`),i+")"}if(typeof r.serialize=="function")return r.serialize(t)},s2t=e=>zU(RU(e)),l2t=e=>rce(RU(e)),u2t=e=>ice(RU(e)),c2t=e=>nce(a2t(e)),f2t={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},h2t=(e,t="normal",r="rgb")=>{let i=typeof t=="function"?t:f2t[t],n=ys(r),a=yf(r).channels;return e.map(s=>{let l=n(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 a.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*i(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})})},d2t=h2t,p2t=([e,t])=>e+Math.random()*(t-e),v2t=e=>Object.keys(e).reduce((t,r)=>{let i=e[r];return t[r]=Array.isArray(i)?i:[i,i],t},{}),g2t=(e="rgb",t={})=>{let r=yf(e),i=v2t(t);return r.channels.reduce((n,a)=>((i.alpha||a!=="alpha")&&(n[a]=p2t(i[a]||r.ranges[a])),n),{mode:e})},m2t=g2t,W6=(e,t="rgb",r=!1)=>{let i=t?yf(t).channels:null,n=t?ys(t):Pp;return a=>{let o=n(a);if(!o)return;let s=(i||yf(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=Pp(a);return l&&l.mode!==s.mode?ys(l.mode)(s):s}},ace=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,oce=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,BU=(e=1,t=0)=>(r,i)=>i!=="alpha"?r*e+t:r,y2t=(e=1,t=1,r=0)=>(i,n)=>n!=="alpha"?e*Math.pow(i,t)+r:i,x2t=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),sce=b2t,dC=e=>typeof e=="function",Ex=e=>e&&typeof e=="object",Ble=e=>typeof e=="number",lce=(e,t="rgb",r,i)=>{let n=yf(t),a=ys(t),o=[],s=[],l={};e.forEach(h=>{Array.isArray(h)?(o.push(a(h[0])),s.push(h[1])):Ble(h)||dC(h)?l[s.length]=h:(o.push(a(h)),s.push(void 0))}),_2t(s);let u=n.channels.reduce((h,d)=>{let p;return Ex(r)&&Ex(r[d])&&r[d].fixup?p=r[d].fixup:Ex(n.interpolate[d])&&n.interpolate[d].fixup?p=n.interpolate[d].fixup:p=v=>v,h[d]=p(o.map(v=>v[d])),h},{});if(i){let h=o.map((d,p)=>n.channels.reduce((v,m)=>(v[m]=u[m][p],v),{mode:t}));u=n.channels.reduce((d,p)=>(d[p]=h.map(v=>{let m=i(v[p],p,v,t);return isNaN(m)?void 0:m}),d),{})}let c=n.channels.reduce((h,d)=>{let p;return dC(r)?p=r:Ex(r)&&dC(r[d])?p=r[d]:Ex(r)&&Ex(r[d])&&r[d].use?p=r[d].use:dC(n.interpolate[d])?p=n.interpolate[d]:Ex(n.interpolate[d])&&(p=n.interpolate[d].use),h[d]=p(u[d]),h},{}),f=o.length-1;return h=>{if(h=Math.min(Math.max(0,h),1),h<=s[0])return o[0];if(h>s[f])return o[f];let d=0;for(;s[d]{let M=c[_](w);return M!==void 0&&(b[_]=M),b},{mode:t})}},w2t=(e,t="rgb",r)=>lce(e,t,r),uce=(e,t)=>(r,i="rgb",n)=>{let a=t?W6(t,i):void 0,o=lce(r,i,n,e);return a?s=>a(o(s)):o},T2t=uce(ace,oce),pC=(e,t)=>(e+t)%t,cce=(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},fce=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return cce(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],it=>{let r=e.length-1,i=Math.floor(t*r);return cce(e[pC(i-1,e.length)],e[pC(i,e.length)],e[pC(i+1,e.length)],e[pC(i+2,e.length)],(t-i/r)*r)},dce=e=>{let t,r=e.length-1,i=new Array(r),n=new Array(r),a=new 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},A2t=e=>fce(dce(e)),M2t=e=>hce(dce(e)),U3=Math.sign,hU=Math.min,f0=Math.abs,qU=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?(U3(r[a-1])+U3(r[a]))*hU(f0(r[a-1]),f0(r[a]),.5*f0(i[a])):void 0);return[r,i,n]},OU=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;a>=1?o=i-1:o=Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*n*u+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},S2t=e=>{if(e.length<3)return Ni(e);let t=e.length-1,[r,,i]=qU(e);return i[0]=r[0],i[t]=r[t-1],OU(e,i,r)},E2t=e=>{if(e.length<3)return Ni(e);let t=e.length-1,[r,i,n]=qU(e);return i[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,i[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,n[0]=i[0]*r[0]<=0?0:f0(i[0])>2*f0(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:f0(i[t])>2*f0(r[t-1])?2*r[t-1]:i[t],OU(e,n,r)},k2t=e=>{let t=e.length-1,[r,i,n]=qU(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,o=a;return n[0]=(U3(a)+U3(r[0]))*hU(f0(a),f0(r[0]),.5*f0(i[0])),n[t]=(U3(r[t-1])+U3(o))*hU(f0(r[t-1]),f0(o),.5*f0(i[t])),OU(e,n,r)},C2t=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),pce=C2t,D2t=(e=2,t=1)=>{let r=pce(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let n=0;n{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},mce=e=>gce(vce(e)),yce=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 NU(e){return yce(vce(e))}function IC(e="rgb"){let{gamut:t}=yf(e);if(!t)return i=>!0;let r=ys(typeof t=="string"?t:e);return i=>yce(r(i))}function L2t(e){return e=Pp(e),e===void 0||NU(e)?e:ys(e.mode)(mce(e))}function UU(e="rgb"){let{gamut:t}=yf(e);if(!t)return a=>Pp(a);let r=typeof t=="string"?t:e,i=ys(r),n=IC(r);return a=>{let o=Pp(a);if(!o)return;let s=i(o);if(n(s))return o;let l=gce(s);return o.mode===l.mode?l:ys(o.mode)(l)}}function P2t(e,t="lch",r="rgb"){e=Pp(e);let i=r==="rgb"?NU:IC(r),n=r==="rgb"?mce:UU(r);if(e===void 0||i(e))return e;let a=ys(e.mode);e=ys(t)(e);let o=ma(fn({},e),{c:0});if(!i(o))return a(n(o));let s=0,l=e.c!==void 0?e.c:0,u=yf(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,i(o)?(f=o.c,s=o.c):l=o.c;return a(i(o)?o:ma(fn({},o),{c:f}))}function I2t(e="rgb",t="oklch",r=j3("oklch"),i=.02){let n=ys(e),a=yf(e);if(!a.gamut)return c=>n(c);let o=IC(e),s=UU(e),l=ys(t),{ranges:u}=yf(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=Pp(c),c===void 0)return;let f=fn({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let m=ma(fn({},a.white),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(f.l<=u.l[0]){let m=ma(fn({},a.black),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(o(f))return n(f);let h=0,d=f.c,p=(u.c[1]-u.c[0])/4e3,v=s(f);for(;d-h>p;)f.c=(h+d)*.5,v=s(f),o(f)||r&&i>0&&r(f,v)<=i?h=f.c:d=f.c;return n(o(f)?f:v)}}var R2t=(e,t=j3(),r=i=>i)=>{let i=e.map((n,a)=>({color:r(n),i:a}));return(n,a=1,o=1/0)=>(isFinite(a)&&(a=Math.max(1,Math.min(a,i.length-1))),i.forEach(s=>{s.d=t(n,s.color)}),i.sort((s,l)=>s.d-l.d).slice(0,a).filter(s=>s.de[s.i]))},z2t=R2t,VU=e=>Math.max(e,0),GU=e=>Math.max(Math.min(e,1),0),B2t=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),q2t=e=>{let t=1-GU(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]},O2t=e=>{let t=VU(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]},N2t=e=>{let t=1-GU(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]},U2t=e=>{let t=Math.PI*e/180,r=Math.cos(t),i=Math.sin(t);return[.213+r*.787-i*.213,.715-r*.715-i*.715,.072-r*.072+i*.928,0,.213-r*.213+i*.143,.715+r*.285+i*.14,.072-r*.072-i*.283,0,.213-r*.213-i*.787,.715-r*.715+i*.715,.072+r*.928+i*.072,0,0,0,0,1]},RC=(e,t,r=!1)=>{let i=ys(t),n=yf(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,u=n.length;for(let f=0;f{let r=VU(e);return W6(BU(r),t,!0)},G2t=(e=1,t="rgb")=>{let r=VU(e);return W6(BU(r,(1-r)/2),t,!0)},H2t=(e=1,t="rgb")=>RC(q2t(e),t,!0),j2t=(e=1,t="rgb")=>RC(O2t(e),t,!0),$2t=(e=1,t="rgb")=>RC(N2t(e),t,!0),W2t=(e=1,t="rgb")=>{let r=GU(e);return W6((i,n)=>n==="alpha"?i:B2t(r,1-r,i),t,!0)},Y2t=(e=0,t="rgb")=>RC(U2t(e),t,!0),X2t=ys("rgb"),Z2t=[[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]],K2t=[[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]],J2t=[[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]],HU=(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&&ikx(a[l],o[l],n))}return o=>{let s=Pp(o);if(s===void 0)return;let{r:l,g:u,b:c}=X2t(s),f={mode:"rgb",r:a[0]*l+a[1]*u+a[2]*c,g:a[3]*l+a[4]*u+a[5]*c,b:a[6]*l+a[7]*u+a[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),ys(s.mode)(f)}},Q2t=(e=1)=>HU(Z2t,e),ext=(e=1)=>HU(K2t,e),txt=(e=1)=>HU(J2t,e),rxt=e=>e*e*(3-2*e),ixt=e=>.5-Math.sin(Math.asin(1-2*e)/3),nxt=e=>e*e*e*(e*(e*6-15)+10),axt=nxt,oxt=e=>(1-Math.cos(e*Math.PI))/2,sxt=oxt;function dU(e){let t=ys("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function lxt(e,t){let r=dU(e),i=dU(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var uxt=jo(Kle),cxt=jo(rue),fxt=jo(sue),hxt=jo(lue),dxt=jo(fue),pxt=jo(xU),vxt=jo(wU),gxt=jo(xue),mxt=jo(wue),yxt=jo(Tue),xxt=jo(Aue),_xt=jo(LC),bxt=jo(Sue),wxt=jo(PC),Txt=jo(kue),Axt=jo(Fue),Mxt=jo(Lue),Sxt=jo(Pue),Ext=jo(Rue),kxt=jo(zue),Cxt=jo(que),Dxt=jo(Nue),Fxt=jo(Uue),Lxt=jo(Vue),Pxt=jo(Gue),Ixt=jo(Fx),Rxt=jo(Wue),zxt=jo(Yue),Bxt=jo(Kue),qxt=jo(ece)});var cy=W((V7r,Ace)=>{"use strict";var bce={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:{}}},wce={};function Tce(e,t){for(var r in e){var i=e[r];i.valType?t[r]=i.dflt:(t[r]||(t[r]={}),Tce(i,t[r]))}}Tce(bce,wce);Ace.exports={configAttributes:bce,dfltConfig:wce}});var $U=W((G7r,Mce)=>{"use strict";var jU=vi(),Oxt=sn(),Y6=[];Mce.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||Y6.indexOf(e)!==-1)return;Y6.push(e);var i=1e3;Oxt(t)?i=t:t==="long"&&(i=3e3);var n=jU.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(Y6);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=Y6.indexOf(u);c!==-1&&Y6.splice(c,1),jU.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=jU.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),h=0;h{"use strict";var X3=cy().dfltConfig,WU=$U(),YU=Sce.exports={};YU.log=function(){var e;if(X3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};YU.warn=function(){var e;if(X3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};YU.error=function(){var e;if(X3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var Vl=W(Ix=>{"use strict";Ix.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ix.defaultLine="#444";Ix.lightLine="#eee";Ix.background="#fff";Ix.borderLine="#BEC8D9";Ix.lightFraction=1e3/11});var ni=W(($7r,Rce)=>{"use strict";var{converter:Ece,formatHex:Nxt,formatRgb:Uxt,wcagContrast:Vxt,wcagLuminance:Gxt}=_ce(),{isArrayOrTypedArray:kce}=yc(),{warn:Hxt}=Eg(),{background:Z6,defaultLine:KU,defaults:jxt,lightLine:$xt}=Vl(),Cce=Ece("rgb"),Wxt=Ece("hsl"),Dce=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return Cce(t)}catch(r){return}},xf=e=>e>0?e>1?1:e:0,Yxt={mode:"rgb",r:0,g:0,b:0,alpha:1},XU=e=>Math.round(e*255e6)/255e6,Fce=e=>ma(fn({},e),{r:XU(e.r),g:XU(e.g),b:XU(e.b)}),h0=e=>Uxt(Fce(e)),Xxt=e=>Nxt(Fce(e)),Zxt=e=>{var t,r,i,n;return typeof e=="string"?`"${e}"`:kce(e)?`${(r=(t=e.constructor)==null?void 0:t.name)!=null?r:"Array"}(${e.length})`:typeof e=="object"?(n=(i=e.constructor)==null?void 0:i.name)!=null?n:"Object":`${typeof e} ${e}`},el=(e,t)=>{var i;let r=Dce(e);return r?((i=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Hxt(`Invalid color specifier: ${Zxt(e)}. Defaulting to "#000"`),Yxt)},X6=e=>h0(ma(fn({},el(e)),{alpha:1})),Kxt=e=>e?el(e).alpha:0,Lce=e=>kce(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),Jxt=e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n!=null?n:1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}},Qxt=(e,t)=>{let r=Lce(e)?Jxt(e):el(e,!0),i=[xf(r.r),xf(r.g),xf(r.b),xf(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(i,n=>Math.round(n*255)):t==="float32"?Float32Array.from(i):t==="float64"?Float64Array.from(i):i},e_t=(e,t)=>h0(ma(fn({},el(e)),{alpha:xf(t)})),Pce=(e,t)=>{let r=el(e),i=r.alpha;if(i===1)return h0(r);let n=el(t||Z6),a=n.alpha,o=(s,l)=>(a===1?l:1-a+l*a)*(1-i)+s*i;return h0({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},t_t=(e,t,r)=>{let i=el(e),n=el(t),a=(o,s)=>r*o+(1-r)*s;return h0({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},ZU=(e,t)=>{let r=el(e),i=Wxt(r)||{mode:"hsl",h:0,s:0,l:0};return h0(Cce(ma(fn({},i),{l:xf((i.l*100+t)/100),alpha:r.alpha})))},zC=(e,t)=>Vxt(el(e),el(t)),Ice=e=>zC(e,Z6)>zC(e,KU),r_t=h0(el(Z6)),i_t=h0(el(KU)),n_t=(e,t,r)=>(el(e).alpha!==1&&(e=Pce(e,Z6)),Ice(e)?t?ZU(e,t):r_t:r?ZU(e,-r):i_t),a_t=(e,t)=>{e.style({stroke:X6(t),"stroke-opacity":el(t).alpha})},o_t=(e,t)=>{e.style({fill:X6(t),"fill-opacity":el(t).alpha})},s_t=(e,t)=>!!(e&&t&&X6(e)===X6(t)),l_t=e=>Dce(e)!==void 0,u_t=(e,t)=>{t=t===0?0:t||10;let r=el(e),i=t/100;return h0(ma(fn({},r),{r:xf(r.r+i),g:xf(r.g+i),b:xf(r.b+i)}))},c_t=(e,t,r)=>{let i=el(e),n=el(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,u=1-l,c=(f,h)=>u*f+l*h;return h0({mode:"rgb",r:c(i.r,n.r),g:c(i.g,n.g),b:c(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},f_t=(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let a=zC(e,n);a>i&&(i=a,r=h0(el(n)))}return r},h_t=e=>h0(el(e)),d_t=e=>Xxt(el(e)).toUpperCase(),p_t=e=>{let t=el(e);return[xf(t.r)*255,xf(t.g)*255,xf(t.b)*255,xf(t.alpha)]},v_t=([e,t,r,i])=>h0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),g_t=e=>{let t=el(e);return Gxt({mode:"rgb",r:xf(t.r),g:xf(t.g),b:xf(t.b)})};Rce.exports={addOpacity:e_t,adjustLightness:ZU,background:Z6,brighten:u_t,combine:Pce,contrast:n_t,defaultLine:KU,defaults:jxt,equals:s_t,fill:o_t,hexString:d_t,interpolate:t_t,isChannelArray:Lce,isDark:Ice,isValid:l_t,lightLine:$xt,luminosity:g_t,mix:c_t,mostReadable:f_t,normalize:Qxt,opacity:Kxt,parse:el,rgb:X6,rgbaArray:p_t,rgbaArrayToString:v_t,rgbaString:h_t,stroke:a_t,wcagContrast:zC}});var Rx=W((Y7r,qce)=>{"use strict";var m_t=ni(),BC={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)"]]},zce=BC.RdBu;function y_t(e,t){if(t||(t=zce),!e)return t;function r(){try{e=BC[e]||JSON.parse(e)}catch(i){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Bce(e)?e:t}function Bce(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";Oce.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Z3={};Fp(Z3,{counter:()=>__t});function __t(e,t="",r,i){let n=t+(r?"":"$"),a=i===!1?"":"^";return e==="xy"?new RegExp(a+"x"+JU+"y"+JU+n):new RegExp(a+e+JU+n)}var JU,K3=Ea(()=>{"use strict";JU="([2-9]|[1-9][0-9]+)?"});var Vce=W(Ph=>{"use strict";var QU=sn(),Nce=tn().extendFlat,b_t=Wa(),w_t=Rx(),eV=ni(),T_t=kg().DESELECTDIM,J3=k6(),Uce=(K3(),Go(Z3)).counter,A_t=(O3(),Go(q3)).modHalf,Ip=yc().isArrayOrTypedArray,fy=yc().isTypedArraySpec,hy=yc().decodeTypedArraySpec;Ph.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Ip(e)?e:fy(e)?hy(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e=+e),i.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,i=0;ia===!0||a===!1;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,i){fy(e)&&(e=hy(e)),!QU(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}fy(e)&&(e=hy(e)),e%1||!QU(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,i){if(typeof e!="string"){var n=typeof e=="number";i.strict===!0||!n?t.set(r):t.set(String(e))}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){fy(e)&&(e=hy(e)),eV.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(i=>eV.isValid(i))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(w_t.get(e,r))}},angle:{coerceFunction:function(e,t,r){fy(e)&&(e=hy(e)),e==="auto"?t.set("auto"):QU(e)?t.set(A_t(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||Uce(r);let a=o=>typeof o=="string"&&n.test(o);a(e)||i.arrayOk&&Ip(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Uce(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var n=e.split("+"),a=0;a{"use strict";Gce.exports=function(){}});var tV=W((J7r,Hce)=>{"use strict";Hce.exports=function(t,r){if(r instanceof RegExp){for(var i=r.toString(),n=0;n{jce.exports=M_t;function M_t(){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 Yce=W((eFr,Wce)=>{Wce.exports=S_t;function S_t(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 Zce=W((tFr,Xce)=>{Xce.exports=E_t;function E_t(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 rV=W((rFr,Kce)=>{Kce.exports=k_t;function k_t(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 Qce=W((iFr,Jce)=>{Jce.exports=C_t;function C_t(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}});var tfe=W((nFr,efe)=>{efe.exports=D_t;function D_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,b=r*l-n*o,_=r*u-a*o,M=i*l-n*s,x=i*u-a*s,T=n*u-a*l,A=c*v-f*p,y=c*m-h*p,E=c*g-d*p,S=f*m-h*v,C=f*g-d*v,k=h*g-d*m,D=w*k-b*C+_*S+M*E-x*y+T*A;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*T-m*x+g*M)*D,e[3]=(h*x-f*T-d*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*_-p*T-g*b)*D,e[7]=(c*T-h*_+d*b)*D,e[8]=(o*C-s*E+u*A)*D,e[9]=(i*E-r*C-a*A)*D,e[10]=(p*x-v*_+g*w)*D,e[11]=(f*_-c*x-d*w)*D,e[12]=(s*y-o*S-l*A)*D,e[13]=(r*S-i*y+n*A)*D,e[14]=(v*b-p*M-m*w)*D,e[15]=(c*M-f*b+h*w)*D,e):null}});var ife=W((aFr,rfe)=>{rfe.exports=F_t;function F_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15];return e[0]=s*(h*g-d*m)-f*(l*g-u*m)+v*(l*d-u*h),e[1]=-(i*(h*g-d*m)-f*(n*g-a*m)+v*(n*d-a*h)),e[2]=i*(l*g-u*m)-s*(n*g-a*m)+v*(n*u-a*l),e[3]=-(i*(l*d-u*h)-s*(n*d-a*h)+f*(n*u-a*l)),e[4]=-(o*(h*g-d*m)-c*(l*g-u*m)+p*(l*d-u*h)),e[5]=r*(h*g-d*m)-c*(n*g-a*m)+p*(n*d-a*h),e[6]=-(r*(l*g-u*m)-o*(n*g-a*m)+p*(n*u-a*l)),e[7]=r*(l*d-u*h)-o*(n*d-a*h)+c*(n*u-a*l),e[8]=o*(f*g-d*v)-c*(s*g-u*v)+p*(s*d-u*f),e[9]=-(r*(f*g-d*v)-c*(i*g-a*v)+p*(i*d-a*f)),e[10]=r*(s*g-u*v)-o*(i*g-a*v)+p*(i*u-a*s),e[11]=-(r*(s*d-u*f)-o*(i*d-a*f)+c*(i*u-a*s)),e[12]=-(o*(f*m-h*v)-c*(s*m-l*v)+p*(s*h-l*f)),e[13]=r*(f*m-h*v)-c*(i*m-n*v)+p*(i*h-n*f),e[14]=-(r*(s*m-l*v)-o*(i*m-n*v)+p*(i*l-n*s)),e[15]=r*(s*h-l*f)-o*(i*h-n*f)+c*(i*l-n*s),e}});var afe=W((oFr,nfe)=>{nfe.exports=L_t;function L_t(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],p=e[13],v=e[14],m=e[15],g=t*o-r*a,w=t*s-i*a,b=t*l-n*a,_=r*s-i*o,M=r*l-n*o,x=i*l-n*s,T=u*p-c*d,A=u*v-f*d,y=u*m-h*d,E=c*v-f*p,S=c*m-h*p,C=f*m-h*v;return g*C-w*S+b*E+_*y-M*A+x*T}});var sfe=W((sFr,ofe)=>{ofe.exports=P_t;function P_t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],v=t[12],m=t[13],g=t[14],w=t[15],b=r[0],_=r[1],M=r[2],x=r[3];return e[0]=b*i+_*s+M*f+x*v,e[1]=b*n+_*l+M*h+x*m,e[2]=b*a+_*u+M*d+x*g,e[3]=b*o+_*c+M*p+x*w,b=r[4],_=r[5],M=r[6],x=r[7],e[4]=b*i+_*s+M*f+x*v,e[5]=b*n+_*l+M*h+x*m,e[6]=b*a+_*u+M*d+x*g,e[7]=b*o+_*c+M*p+x*w,b=r[8],_=r[9],M=r[10],x=r[11],e[8]=b*i+_*s+M*f+x*v,e[9]=b*n+_*l+M*h+x*m,e[10]=b*a+_*u+M*d+x*g,e[11]=b*o+_*c+M*p+x*w,b=r[12],_=r[13],M=r[14],x=r[15],e[12]=b*i+_*s+M*f+x*v,e[13]=b*n+_*l+M*h+x*m,e[14]=b*a+_*u+M*d+x*g,e[15]=b*o+_*c+M*p+x*w,e}});var ufe=W((lFr,lfe)=>{lfe.exports=I_t;function I_t(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,d,p,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],p=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+p*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+d*n+g*a+t[15]),e}});var ffe=W((uFr,cfe)=>{cfe.exports=R_t;function R_t(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}});var dfe=W((cFr,hfe)=>{hfe.exports=z_t;function z_t(e,t,r,i){var n=i[0],a=i[1],o=i[2],s=Math.sqrt(n*n+a*a+o*o),l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k,D,F;return Math.abs(s)<1e-6?null:(s=1/s,n*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],p=t[3],v=t[4],m=t[5],g=t[6],w=t[7],b=t[8],_=t[9],M=t[10],x=t[11],T=n*n*c+u,A=a*n*c+o*l,y=o*n*c-a*l,E=n*a*c-o*l,S=a*a*c+u,C=o*a*c+n*l,k=n*o*c+a*l,D=a*o*c-n*l,F=o*o*c+u,e[0]=f*T+v*A+b*y,e[1]=h*T+m*A+_*y,e[2]=d*T+g*A+M*y,e[3]=p*T+w*A+x*y,e[4]=f*E+v*S+b*C,e[5]=h*E+m*S+_*C,e[6]=d*E+g*S+M*C,e[7]=p*E+w*S+x*C,e[8]=f*k+v*D+b*F,e[9]=h*k+m*D+_*F,e[10]=d*k+g*D+M*F,e[11]=p*k+w*D+x*F,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var vfe=W((fFr,pfe)=>{pfe.exports=B_t;function B_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=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+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}});var mfe=W((hFr,gfe)=>{gfe.exports=q_t;function q_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=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-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}});var xfe=W((dFr,yfe)=>{yfe.exports=O_t;function O_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=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+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}});var bfe=W((pFr,_fe)=>{_fe.exports=N_t;function N_t(e,t,r){var i,n,a,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,i=Math.sin(t),n=Math.cos(t),a=1-n,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)}});var Tfe=W((vFr,wfe)=>{wfe.exports=U_t;function U_t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,u=a+a,c=i*s,f=i*l,h=i*u,d=n*l,p=n*u,v=a*u,m=o*s,g=o*l,w=o*u;return e[0]=1-(d+v),e[1]=f+w,e[2]=h-g,e[3]=0,e[4]=f-w,e[5]=1-(c+v),e[6]=p+m,e[7]=0,e[8]=h+g,e[9]=p-m,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Mfe=W((gFr,Afe)=>{Afe.exports=V_t;function V_t(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 Efe=W((mFr,Sfe)=>{Sfe.exports=G_t;function G_t(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 Cfe=W((yFr,kfe)=>{kfe.exports=H_t;function H_t(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}});var Ffe=W((xFr,Dfe)=>{Dfe.exports=j_t;function j_t(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}});var Pfe=W((_Fr,Lfe)=>{Lfe.exports=$_t;function $_t(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}});var Rfe=W((bFr,Ife)=>{Ife.exports=W_t;function W_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,d=n*s,p=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[1]=c+g,e[2]=h-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=d+v,e[7]=0,e[8]=h+m,e[9]=d-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Bfe=W((wFr,zfe)=>{zfe.exports=Y_t;function Y_t(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var Ofe=W((TFr,qfe)=>{qfe.exports=X_t;function X_t(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}});var Ufe=W((AFr,Nfe)=>{Nfe.exports=Z_t;function Z_t(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),u=2/(n+a);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]=(n-a)*u*.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}});var Gfe=W((MFr,Vfe)=>{Vfe.exports=K_t;function K_t(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=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*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}});var jfe=W((SFr,Hfe)=>{var J_t=rV();Hfe.exports=Q_t;function Q_t(e,t,r,i){var n,a,o,s,l,u,c,f,h,d,p=t[0],v=t[1],m=t[2],g=i[0],w=i[1],b=i[2],_=r[0],M=r[1],x=r[2];return Math.abs(p-_)<1e-6&&Math.abs(v-M)<1e-6&&Math.abs(m-x)<1e-6?J_t(e):(c=p-_,f=v-M,h=m-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,n=w*h-b*f,a=b*c-g*h,o=g*f-w*c,d=Math.sqrt(n*n+a*a+o*o),d?(d=1/d,n*=d,a*=d,o*=d):(n=0,a=0,o=0),s=f*o-h*a,l=h*n-c*o,u=c*a-f*n,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=n,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+a*v+o*m),e[13]=-(s*p+l*v+u*m),e[14]=-(c*p+f*v+h*m),e[15]=1,e)}});var Wfe=W((EFr,$fe)=>{$fe.exports=ebt;function ebt(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 iV=W((kFr,Yfe)=>{Yfe.exports={create:$ce(),clone:Yce(),copy:Zce(),identity:rV(),transpose:Qce(),invert:tfe(),adjoint:ife(),determinant:afe(),multiply:sfe(),translate:ufe(),scale:ffe(),rotate:dfe(),rotateX:vfe(),rotateY:mfe(),rotateZ:xfe(),fromRotation:bfe(),fromRotationTranslation:Tfe(),fromScaling:Mfe(),fromTranslation:Efe(),fromXRotation:Cfe(),fromYRotation:Ffe(),fromZRotation:Pfe(),fromQuat:Rfe(),frustum:Bfe(),perspective:Ofe(),perspectiveFromFieldOfView:Ufe(),ortho:Gfe(),lookAt:jfe(),str:Wfe()}});var NC=W(Ml=>{"use strict";var tbt=iV();Ml.init2dArray=function(e,t){for(var r=new Array(e),i=0;i{"use strict";var rbt=vi(),Xfe=Eg(),ibt=NC(),nbt=iV();function abt(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 obt(e){var t=rbt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Zfe(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function sbt(e,t){Kfe("global",e,t)}function Kfe(e,t,r){var i="plotly.js-style-"+e,n=document.getElementById(i);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",i),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var a=n.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Xfe.warn("addStyleRule failed"):Xfe.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function lbt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Zfe(r)}function ubt(e,t,r,i,n,a){var o=i.split(":"),s=n.split(":"),l="data-btn-style-event-added";a||(a=document),a.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 cbt(e){var t=Qfe(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(i){var n=Jfe(i);if(n){var a=ibt.convertCssMatrix(n);r=nbt.multiply(r,r,a)}}),r}function Jfe(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(i){return+i})}function Qfe(e){for(var t=[];fbt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function fbt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function hbt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}ehe.exports={getGraphDiv:abt,isPlotDiv:obt,removeElement:Zfe,addStyleRule:sbt,addRelatedStyleRule:Kfe,deleteRelatedStyleRule:lbt,setStyleOnHover:ubt,getFullTransformMatrix:cbt,getElementTransformMatrix:Jfe,getElementAndAncestors:Qfe,equalDomRects:hbt}});var J6=W((FFr,the)=>{"use strict";the.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 ls=W((LFr,lhe)=>{"use strict";var ihe=tn().extendFlat,dbt=oy(),nhe={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},ahe={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},pbt=nhe.flags.slice().concat(["fullReplot"]),vbt=ahe.flags.slice().concat("layoutReplot");lhe.exports={traces:nhe,layout:ahe,traceFlags:function(){return rhe(pbt)},layoutFlags:function(){return rhe(vbt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var i=r.split("+"),n=0;n{"use strict";nV.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};nV.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 aV=W((IFr,uhe)=>{"use strict";uhe.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 Ga=W(Q3=>{"use strict";var{DATE_FORMAT_LINK:gbt,FORMAT_LINK:mbt}=aV(),ybt=["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 xbt({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}".`,mbt,"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}".`,gbt,"for details on the date formatting syntax.",ybt].join(" ")}Q3.templateFormatStringDescription=xbt;Q3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Q3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Q3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Q3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var GC=W((BFr,vhe)=>{"use strict";function dy(e,t){return t?t.d2l(e):e}function che(e,t){return t?t.l2d(e):e}function _bt(e){return e.x0}function bbt(e){return e.x1}function wbt(e){return e.y0}function Tbt(e){return e.y1}function fhe(e){return e.x0shift||0}function hhe(e){return e.x1shift||0}function dhe(e){return e.y0shift||0}function phe(e){return e.y1shift||0}function UC(e,t){return dy(e.x1,t)+hhe(e)-dy(e.x0,t)-fhe(e)}function VC(e,t,r){return dy(e.y1,r)+phe(e)-dy(e.y0,r)-dhe(e)}function Abt(e,t){return Math.abs(UC(e,t))}function Mbt(e,t,r){return Math.abs(VC(e,t,r))}function Sbt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(UC(e,t),2)+Math.pow(VC(e,t,r),2))}function Ebt(e,t){return che((dy(e.x1,t)+hhe(e)+dy(e.x0,t)+fhe(e))/2,t)}function kbt(e,t,r){return che((dy(e.y1,r)+phe(e)+dy(e.y0,r)+dhe(e))/2,r)}function Cbt(e,t,r){return e.type!=="line"?void 0:VC(e,t,r)/UC(e,t)}var Dbt=["x0","x1","y0","y1","dy","height","ycenter"],Fbt=["x0","x1","y0","y1","dx","width","xcenter"];vhe.exports={x0:_bt,x1:bbt,y0:wbt,y1:Tbt,slope:Cbt,dx:UC,dy:VC,width:Abt,height:Mbt,length:Sbt,xcenter:Ebt,ycenter:kbt,simpleXVariables:Dbt,simpleYVariables:Fbt}});var yhe=W((qFr,mhe)=>{"use strict";var Lbt=ls().overrideAll,zx=Wa(),ghe=Ho(),Pbt=Du().dash,py=tn().extendFlat,{shapeTexttemplateAttrs:Ibt,templatefallbackAttrs:Rbt}=Ga(),zbt=GC();mhe.exports=Lbt({newshape:{visible:py({},zx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:py({},zx.legend,{}),legendgroup:py({},zx.legendgroup,{}),legendgrouptitle:{text:py({},zx.legendgrouptitle.text,{}),font:ghe({})},legendrank:py({},zx.legendrank,{}),legendwidth:py({},zx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:py({},Pbt,{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:py({},zx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Ibt({newshape:!0},{keys:Object.keys(zbt)}),texttemplatefallback:Rbt({editType:"arraydraw"}),font:ghe({}),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 _he=W((OFr,xhe)=>{"use strict";var Bbt=Du().dash,qbt=tn().extendFlat;xhe.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:qbt({},Bbt,{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 HC=W((NFr,bhe)=>{"use strict";bhe.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 ew=W((UFr,Mhe)=>{"use strict";var oV=Ho(),Obt=J6(),jC=Vl(),whe=yhe(),The=_he(),Nbt=HC(),Ahe=tn().extendFlat,$C=oV({editType:"calc"});$C.family.dflt='"Open Sans", verdana, arial, sans-serif';$C.size.dflt=12;$C.color.dflt=jC.defaultLine;Mhe.exports={font:$C,title:{text:{valType:"string",editType:"layoutstyle"},font:oV({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:oV({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:Ahe(Nbt({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:jC.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:jC.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:jC.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:whe.newshape,activeshape:whe.activeshape,newselection:The.newselection,activeselection:The.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Ahe({},Obt.transition,{editType:"none"})}});var She=W(()=>{(function(){if(!document.getElementById("9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53")){var e=document.createElement("style");e.id="9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53",e.textContent='.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:rgba(0,0,0,.4);position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}',document.head.appendChild(e)}})()});var yi=W(ya=>{"use strict";var sV=Eg(),Ehe=OC(),khe=tV(),HFr=K6().addStyleRule,Che=tn(),Ubt=Wa(),Vbt=ew(),Gbt=Che.extendFlat,lV=Che.extendDeepAll;ya.modules={};ya.allCategories={};ya.allTypes=[];ya.subplotsRegistry={};ya.componentsRegistry={};ya.layoutArrayContainers=[];ya.layoutArrayRegexes=[];ya.traceLayoutAttributes={};ya.localeRegistry={};ya.apiMethodRegistry={};ya.collectableSubplotTypes=null;ya.register=function(t){if(ya.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 Ybt=z3().timeFormat,Nhe=sn(),uV=Eg(),gy=(O3(),Go(q3)).mod,iw=Kn(),ad=iw.BADNUM,Ih=iw.ONEDAY,Q6=iw.ONEHOUR,vy=iw.ONEMIN,rw=iw.ONESEC,eA=iw.EPOCHJD,Cg=yi(),Ihe=z3().utcFormat,Xbt=/^\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,Zbt=/^\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,Rhe=new Date().getFullYear()-70;function Dg(e){return e&&Cg.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Sl.dateTick0=function(e,t){var r=Kbt(e,!!t);if(t<2)return r;var i=Sl.dateTime2ms(r,e);return i+=Ih*(t-1),Sl.ms2DateTime(i,0,e)};function Kbt(e,t){return Dg(e)?t?Cg.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Cg.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Sl.dfltRange=function(e){return Dg(e)?Cg.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Sl.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var YC,XC;Sl.dateTime2ms=function(e,t){if(Sl.isJSDate(e)){var r=e.getTimezoneOffset()*vy,i=(e.getUTCMinutes()-e.getMinutes())*vy+(e.getUTCSeconds()-e.getSeconds())*rw+(e.getUTCMilliseconds()-e.getMilliseconds());if(i){var n=3*vy;r=r-n/2+gy(i-r+n/2,n)}return e=Number(e)-r,e>=YC&&e<=XC?e:ad}if(typeof e!="string"&&typeof e!="number")return ad;e=String(e);var a=Dg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?Zbt:Xbt);if(!l)return ad;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),p=Number(l[11]||0);if(a){if(u.length===2)return ad;u=Number(u);var v;try{var m=Cg.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),v=m.newDate(u,m.toMonthIndex(u,c,g),f)}else v=m.newDate(u,Number(c),f)}catch(b){return ad}return v?(v.toJD()-eA)*Ih+h*Q6+d*vy+p*rw:ad}u.length===2?u=(Number(u)+2e3-Rhe)%100+Rhe:u=Number(u),c-=1;var w=new Date(Date.UTC(2e3,c,f,h,d));return w.setUTCFullYear(u),w.getUTCMonth()!==c||w.getUTCDate()!==f?ad:w.getTime()+p*rw};YC=Sl.MIN_MS=Sl.dateTime2ms("-9999");XC=Sl.MAX_MS=Sl.dateTime2ms("9999-12-31 23:59:59.9999");Sl.isDateTime=function(e,t){return Sl.dateTime2ms(e,t)!==ad};function tw(e,t){return String(e+Math.pow(10,t)).slice(1)}var WC=90*Ih,zhe=3*Q6,Bhe=5*vy;Sl.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=YC&&e<=XC))return ad;t||(t=0);var i=Math.floor(gy(e+.05,1)*10),n=Math.round(e-i/10),a,o,s,l,u,c;if(Dg(r)){var f=Math.floor(n/Ih)+eA,h=Math.floor(gy(e,Ih));try{a=Cg.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=Ihe("G%Y-%m-%d")(new Date(n))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=YC+Ih&&e<=XC-Ih))return ad;var t=Math.floor(gy(e+.05,1)*10),r=new Date(Math.round(e-t/10)),i=Ybt("%Y-%m-%d")(r),n=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Uhe(i,n,a,o,s)};function Uhe(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+tw(t,2)+":"+tw(r,2),(i||n)&&(e+=":"+tw(i,2),n))){for(var a=4;n%10===0;)a-=1,n/=10;e+="."+tw(n,a)}return e}Sl.cleanDate=function(e,t,r){if(e===ad)return t;if(Sl.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Dg(r))return uV.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Sl.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Sl.isDateTime(e,r))return uV.error("unrecognized date",e),t;return e};var Jbt=/%\d?f/g,Qbt=/%h/g,e3t={1:"1",2:"1",3:"2",4:"2"};function qhe(e,t,r,i){e=e.replace(Jbt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var n=new Date(Math.floor(t+.05));if(e=e.replace(Qbt,function(){return e3t[r("%q")(n)]}),Dg(i))try{e=Cg.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch(a){return"Invalid"}return r(e)(n)}var t3t=[59,59.9,59.99,59.999,59.9999];function r3t(e,t){var r=gy(e+.05,Ih),i=tw(Math.floor(r/Q6),2)+":"+tw(gy(Math.floor(r/vy),60),2);if(t!=="M"){Nhe(t)||(t=0);var n=Math.min(gy(e/rw,60),t3t[t]),a=(100+n).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}Sl.formatDate=function(e,t,r,i,n,a){if(n=Dg(n)&&n,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` `+a.year;else return r3t(e,r)+` `+qhe(a.dayMonthYear,e,i,n);return qhe(t,e,i,n)};var Ohe=3*Ih;Sl.incrementMonth=function(e,t,r){r=Dg(r)&&r;var i=gy(e,Ih);if(e=Math.round(e-i),r)try{var n=Math.round(e/Ih)+eA,a=Cg.getComponentMethod("calendars","getCal")(r),o=a.fromJD(n);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-eA)*Ih+i}catch(l){uV.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+Ohe);return s.setUTCMonth(s.getUTCMonth()+t)+i-Ohe};Sl.findExactDates=function(e,t){for(var r=0,i=0,n=0,a=0,o,s,l=Dg(t)&&Cg.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";Ghe.exports=function(t){return t}});var ZC=W(Fg=>{"use strict";var i3t=sn(),n3t=Eg(),a3t=tA(),o3t=Kn().BADNUM,cV=1e-9;Fg.findBin=function(e,t,r){if(i3t(t.start))return r?Math.ceil((e-t.start)/t.size-cV)-1:Math.floor((e-t.start)/t.size+cV);var i=0,n=t.length,a=0,o=n>1?(t[n-1]-t[0])/(n-1):1,s,l;for(o>=0?l=r?s3t:l3t:l=r?c3t:u3t,e+=o*cV*(r?-1:1)*(o>=0?1:-1);i90&&n3t.log("Long binary search..."),i-1};function s3t(e,t){return et}function c3t(e,t){return e>=t}Fg.sorterAsc=function(e,t){return e-t};Fg.sorterDes=function(e,t){return t-e};Fg.distinctVals=function(e){var t=e.slice();t.sort(Fg.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===o3t;r--);for(var i=t[r]-t[0]||1,n=i/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>n&&(i=Math.min(i,u),a.push(l),o=l)}return{vals:a,minDiff:i}};Fg.roundUp=function(e,t,r){for(var i=0,n=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()};Fg.findIndexOfMin=function(e,t){t=t||a3t;for(var r=1/0,i,n=0;nh3t});function f3t(e){return Object.keys(e).sort()}var h3t,qx=Ea(()=>{"use strict";h3t=f3t});var Hhe=W(El=>{"use strict";var rA=sn(),d3t=yc().isArrayOrTypedArray;El.aggNums=function(e,t,r,i){var n,a;if((!i||i>r.length)&&(i=r.length),rA(t)||(t=!1),d3t(r[0])){for(a=new Array(i),n=0;ne.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Xhe=W((ZFr,Yhe)=>{"use strict";var jhe=(O3(),Go(q3)),fV=jhe.mod,p3t=jhe.modHalf,iA=Math.PI,my=2*iA;function v3t(e){return e/180*iA}function g3t(e){return e/iA*180}function hV(e){return Math.abs(e[1]-e[0])>my-1e-14}function $he(e,t){return p3t(t-e,my)}function m3t(e,t){return Math.abs($he(e,t))}function Whe(e,t){if(hV(t))return!0;var r,i;t[0]i&&(i+=my);var n=fV(e,my),a=n+my;return n>=r&&n<=i||a>=r&&a<=i}function y3t(e,t,r,i){if(!Whe(t,i))return!1;var n,a;return r[0]=n&&e<=a}function dV(e,t,r,i,n,a,o){n=n||0,a=a||0;var s=hV([r,i]),l,u,c,f,h;s?(l=0,u=iA,c=my):r{"use strict";Ox.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};Ox.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};Ox.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};Ox.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};Ox.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};Ox.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Qhe=W(Nx=>{"use strict";var pV=(O3(),Go(q3)).mod;Nx.segmentsIntersect=Jhe;function Jhe(e,t,r,i,n,a,o,s){var l=r-e,u=n-e,c=o-n,f=i-t,h=a-t,d=s-a,p=l*d-c*f;if(p===0)return null;var v=(u*d-c*h)/p,m=(u*f-l*h)/p;return m<0||m>1||v<0||v>1?null:{x:e+l*v,y:t+f*v}}Nx.segmentDistance=function(t,r,i,n,a,o,s,l){if(Jhe(t,r,i,n,a,o,s,l))return 0;var u=i-t,c=n-r,f=s-a,h=l-o,d=u*u+c*c,p=f*f+h*h,v=Math.min(KC(u,c,d,a-t,o-r),KC(u,c,d,s-t,l-r),KC(f,h,p,t-a,r-o),KC(f,h,p,i-a,n-o));return Math.sqrt(v)};function KC(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}else{var l=i*t-n*e;return l*l/r}}var JC,vV,Khe;Nx.getTextLocation=function(t,r,i,n){if((t!==vV||n!==Khe)&&(JC={},vV=t,Khe=n),JC[i])return JC[i];var a=t.getPointAtLength(pV(i-n/2,r)),o=t.getPointAtLength(pV(i+n/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(pV(i,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return JC[i]=f,f};Nx.clearLocationCache=function(){vV=null};Nx.getVisibleSegment=function(t,r,i){var n=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(v){var m=t.getPointAtLength(v);v===0?f=m:v===u&&(h=m);var g=m.xa?m.x-a:0,w=m.ys?m.y-s:0;return Math.sqrt(g*g+w*w)}for(var p=d(l);p;){if(l+=p+i,l>c)return;p=d(l)}for(p=d(c);p;){if(c-=p+i,l>c)return;p=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};Nx.findPointOnPath=function(t,r,i,n){n=n||{};for(var a=n.pathLength||t.getTotalLength(),o=n.tolerance||.001,s=n.iterationLimit||30,l=t.getPointAtLength(0)[i]>t.getPointAtLength(a)[i]?-1:1,u=0,c=0,f=a,h,d,p;u0?f=h:c=h,u++}return d}});var QC=W(nA=>{"use strict";var Lg={};nA.throttle=function(t,r,i){var n=Lg[t],a=Date.now();if(!n){for(var o in Lg)Lg[o].tsn.ts+r){s();return}n.timer=setTimeout(function(){s(),n.timer=null},r)};nA.done=function(e){var t=Lg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var i=t.onDone;t.onDone=function(){i&&i(),r(),t.onDone=null}})};nA.clear=function(e){if(e)e0e(Lg[e]),delete Lg[e];else for(var t in Lg)nA.clear(t)};function e0e(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var r0e=W((eLr,t0e)=>{"use strict";t0e.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var i0e=W((tLr,eD)=>{"use strict";eD.exports=gV;eD.exports.isMobile=gV;eD.exports.default=gV;var w3t=/(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,T3t=/CrOS/,A3t=/android|ipad|playbook|silk/i;function gV(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=w3t.test(t)&&!T3t.test(t)||!!e.tablet&&A3t.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var a0e=W((rLr,n0e)=>{"use strict";var M3t=sn(),S3t=i0e();n0e.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=E3t(),typeof r!="string")return!0;var i=S3t({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!i)for(var n=r.split(" "),a=1;a-1;s--){var l=n[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(M3t(u)&&(u=+u),u>=13)return!0}}}return i};function E3t(){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 s0e=W((iLr,o0e)=>{"use strict";var k3t=vi();o0e.exports=function(t,r,i){var n=t.selectAll("g."+i.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][a]=k3t.select(this)}),n}});var u0e=W((nLr,l0e)=>{"use strict";var C3t=yi();l0e.exports=function(t,r){for(var i=t._context.locale,n=0;n<2;n++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=C3t.localeRegistry}var u=i.split("-")[0];if(u===i)break;i=u}return r}});var mV=W((aLr,c0e)=>{"use strict";c0e.exports=function(t){for(var r={},i=[],n=0,a=0;a{"use strict";f0e.exports=function(t){for(var r=L3t(t)?F3t:D3t,i=[],n=0;n{"use strict";d0e.exports=function(t,r){if(!r)return t;var i=1/Math.abs(r),n=i>1?(i*t+i*r)/i:t+r,a=String(n).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(n).toPrecision(12);l.indexOf("e+")===-1&&(n=+l)}}return n}});var m0e={};Fp(m0e,{default:()=>R3t});function I3t(e){return typeof e=="string"&&(e=e.replace(P3t,"")),(0,v0e.default)(e)?Number(e):g0e.BADNUM}var v0e,g0e,P3t,R3t,y0e=Ea(()=>{"use strict";v0e=nd(sn()),g0e=nd(Kn()),P3t=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;R3t=I3t});var b0e=W((lLr,_0e)=>{"use strict";var z3t=/<[^>]*>/g,B3t=/[\p{S}\p{P}]/gu,q3t=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,O3t=/�/g,N3t=/\s+/g,tD="-",x0e=tD.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),U3t=new RegExp(x0e+"{3,}","g"),V3t=new RegExp(x0e+"$","g"),G3t=60;function H3t(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}_0e.exports=function(t,r=G3t){var i=H3t(t!=null?t:"").replace(O3t,"").replace(z3t," ").replace(B3t,n=>n===tD?n:"").toLowerCase().trim().replace(N3t,tD).replace(q3t,"").replace(U3t,tD);return i.length<=r?i:Array.from(i).slice(0,r).join("").replace(V3t,"")}});var it=W((uLr,P0e)=>{"use strict";var aA=vi(),j3t=z3().utcFormat,$3t=gN().format,E0e=sn(),k0e=Kn(),C0e=k0e.FP_SAFE,W3t=-C0e,w0e=k0e.BADNUM,qt=P0e.exports={};qt.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],i=t.slice(r.length);return!/^[~,.0$#]/.test(i)&&/[&fps]/.test(i)?r+"~"+i:t};var T0e={};qt.warnBadFormat=function(e){var t=String(e);T0e[t]||(T0e[t]=1,qt.warn('encountered bad format: "'+t+'"'))};qt.noFormat=function(e){return String(e)};qt.numberFormat=function(e){var t;try{t=$3t(qt.adjustFormat(e))}catch(r){return qt.warnBadFormat(e),qt.noFormat}return t};qt.nestedProperty=k6();qt.keyedContainer=ple();qt.relativeAttr=gle();qt.isPlainObject=oy();qt.toLogRange=cC();qt.relinkPrivateKeys=_le();var yy=yc();qt.isArrayBuffer=yy.isArrayBuffer;qt.isTypedArray=yy.isTypedArray;qt.isArrayOrTypedArray=yy.isArrayOrTypedArray;qt.isArray1D=yy.isArray1D;qt.ensureArray=yy.ensureArray;qt.concat=yy.concat;qt.maxRowLength=yy.maxRowLength;qt.minRowLength=yy.minRowLength;var D0e=(O3(),Go(q3));qt.mod=D0e.mod;qt.modHalf=D0e.modHalf;var xy=Vce();qt.valObjectMeta=xy.valObjectMeta;qt.coerce=xy.coerce;qt.coerce2=xy.coerce2;qt.coerceFont=xy.coerceFont;qt.coercePattern=xy.coercePattern;qt.coerceHoverinfo=xy.coerceHoverinfo;qt.coerceSelectionMarkerOpacity=xy.coerceSelectionMarkerOpacity;qt.validate=xy.validate;var d0=Vhe();qt.dateTime2ms=d0.dateTime2ms;qt.isDateTime=d0.isDateTime;qt.ms2DateTime=d0.ms2DateTime;qt.ms2DateTimeLocal=d0.ms2DateTimeLocal;qt.cleanDate=d0.cleanDate;qt.isJSDate=d0.isJSDate;qt.formatDate=d0.formatDate;qt.incrementMonth=d0.incrementMonth;qt.dateTick0=d0.dateTick0;qt.dfltRange=d0.dfltRange;qt.findExactDates=d0.findExactDates;qt.MIN_MS=d0.MIN_MS;qt.MAX_MS=d0.MAX_MS;var Ux=ZC();qt.findBin=Ux.findBin;qt.sorterAsc=Ux.sorterAsc;qt.sorterDes=Ux.sorterDes;qt.distinctVals=Ux.distinctVals;qt.roundUp=Ux.roundUp;qt.sort=Ux.sort;qt.findIndexOfMin=Ux.findIndexOfMin;qt.sortObjectKeys=(qx(),Go(Bx)).default;var Pg=Hhe();qt.aggNums=Pg.aggNums;qt.len=Pg.len;qt.mean=Pg.mean;qt.geometricMean=Pg.geometricMean;qt.median=Pg.median;qt.midRange=Pg.midRange;qt.variance=Pg.variance;qt.stdev=Pg.stdev;qt.interp=Pg.interp;var Rp=NC();qt.init2dArray=Rp.init2dArray;qt.transposeRagged=Rp.transposeRagged;qt.dot=Rp.dot;qt.translationMatrix=Rp.translationMatrix;qt.rotationMatrix=Rp.rotationMatrix;qt.rotationXYMatrix=Rp.rotationXYMatrix;qt.apply3DTransform=Rp.apply3DTransform;qt.apply2DTransform=Rp.apply2DTransform;qt.apply2DTransform2=Rp.apply2DTransform2;qt.convertCssMatrix=Rp.convertCssMatrix;qt.inverseTransformMatrix=Rp.inverseTransformMatrix;var Qv=Xhe();qt.deg2rad=Qv.deg2rad;qt.rad2deg=Qv.rad2deg;qt.angleDelta=Qv.angleDelta;qt.angleDist=Qv.angleDist;qt.isFullCircle=Qv.isFullCircle;qt.isAngleInsideSector=Qv.isAngleInsideSector;qt.isPtInsideSector=Qv.isPtInsideSector;qt.pathArc=Qv.pathArc;qt.pathSector=Qv.pathSector;qt.pathAnnulus=Qv.pathAnnulus;var aw=Zhe();qt.isLeftAnchor=aw.isLeftAnchor;qt.isCenterAnchor=aw.isCenterAnchor;qt.isRightAnchor=aw.isRightAnchor;qt.isTopAnchor=aw.isTopAnchor;qt.isMiddleAnchor=aw.isMiddleAnchor;qt.isBottomAnchor=aw.isBottomAnchor;var ow=Qhe();qt.segmentsIntersect=ow.segmentsIntersect;qt.segmentDistance=ow.segmentDistance;qt.getTextLocation=ow.getTextLocation;qt.clearLocationCache=ow.clearLocationCache;qt.getVisibleSegment=ow.getVisibleSegment;qt.findPointOnPath=ow.findPointOnPath;var nD=tn();qt.extendFlat=nD.extendFlat;qt.extendDeep=nD.extendDeep;qt.extendDeepAll=nD.extendDeepAll;qt.extendDeepNoArrays=nD.extendDeepNoArrays;var yV=Eg();qt.log=yV.log;qt.warn=yV.warn;qt.error=yV.error;var Y3t=(K3(),Go(Z3));qt.counterRegex=Y3t.counter;var xV=QC();qt.throttle=xV.throttle;qt.throttleDone=xV.done;qt.clearThrottle=xV.clear;var zp=K6();qt.getGraphDiv=zp.getGraphDiv;qt.isPlotDiv=zp.isPlotDiv;qt.removeElement=zp.removeElement;qt.addStyleRule=zp.addStyleRule;qt.addRelatedStyleRule=zp.addRelatedStyleRule;qt.deleteRelatedStyleRule=zp.deleteRelatedStyleRule;qt.setStyleOnHover=zp.setStyleOnHover;qt.getFullTransformMatrix=zp.getFullTransformMatrix;qt.getElementTransformMatrix=zp.getElementTransformMatrix;qt.getElementAndAncestors=zp.getElementAndAncestors;qt.equalDomRects=zp.equalDomRects;qt.clearResponsive=r0e();qt.preserveDrawingBuffer=a0e();qt.makeTraceGroups=s0e();qt._=u0e();qt.notifier=$U();qt.filterUnique=mV();qt.filterVisible=h0e();qt.pushUnique=tV();qt.increment=p0e();qt.cleanNumber=(y0e(),Go(m0e)).default;qt.slugify=b0e();qt.ensureNumber=function(t){return E0e(t)?(t=Number(t),t>C0e||t=t?!1:E0e(e)&&e>=0&&e%1===0};qt.noop=OC();qt.identity=tA();qt.repeat=function(e,t){for(var r=new Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};qt.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};qt.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?n>10?(qt.warn("randstr failed uniqueness"),o):e(t,r,i,(n||0)+1):o};qt.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};qt.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,i=2*r,n=2*t-1,a=new Array(n),o=new Array(r),s,l,u,c;for(s=0;s=i&&(u-=i*Math.floor(u/i)),u<0?u=-1-u:u>=r&&(u=i-1-u),c+=e[u]*a[l];o[s]=c}return o};qt.syncOrAsync=function(e,t,r){var i,n;function a(){return qt.syncOrAsync(e,t,r)}for(;e.length;)if(n=e.splice(0,1)[0],i=n(t),i&&i.then)return i.then(a);return r&&r(t)};qt.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};qt.noneOrAll=function(e,t,r){if(e){var i=!1,n=!0,a,o;for(a=0;a0?n:0})};qt.fillArray=function(e,t,r,i){if(i=i||qt.identity,qt.isArrayOrTypedArray(e))for(var n=0;nK3t.test(window.navigator.userAgent);var J3t=/Firefox\/(\d+)\.\d+/;qt.getFirefoxVersion=function(){var e=J3t.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};qt.isD3Selection=function(e){return e instanceof aA.selection};qt.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};qt.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};qt.objectFromPath=function(e,t){for(var r=e.split("."),i,n=i={},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};qt.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L0e=/^\w*$/;qt.templateString=function(e,t){var r={};return e.replace(qt.TEMPLATE_STRING_REGEX,function(i,n){var a;return L0e.test(n)?a=t[n]:(r[n]=r[n]||qt.nestedProperty(t,n).get,a=r[n](!0)),a!==void 0?a:""})};var twt={max:10,count:0,name:"hovertemplate"};qt.hovertemplateString=e=>_V(ma(fn({},e),{opts:twt}));var rwt={max:10,count:0,name:"texttemplate"};qt.texttemplateString=e=>_V(ma(fn({},e),{opts:rwt}));var iwt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function nwt(e){var t=e.match(iwt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var awt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};qt.texttemplateStringForShapes=e=>_V(ma(fn({},e),{opts:awt}));var A0e=/^[:|\|]/;function _V({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:a}){return a.replace(qt.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let p=null,v=null;if(n.parseMultDiv){var m=nwt(s);s=m.key,p=m.op,v=m.number}let g;if(d){if(i[s]===void 0)return"";g=i[s]}else for(let M of e)if(M){if(M.hasOwnProperty(s)){g=M[s];break}if(L0e.test(s)||(g=qt.nestedProperty(M,s).get(!0)),g!==void 0)break}if(g===void 0){let{count:M,max:x,name:T}=n,A=r===!1?o:r;return M=iD&&o<=M0e,u=s>=iD&&s<=M0e;if(l&&(i=10*i+o-iD),u&&(n=10*n+s-iD),!l||!u){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var nw=2e9;qt.seedPseudoRandom=function(){nw=2e9};qt.pseudoRandom=function(){var e=nw;return nw=(69069*nw+1)%4294967296,Math.abs(nw-e)<429496729?qt.pseudoRandom():nw/4294967296};qt.fillText=function(e,t,r){var i=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},n=qt.extractOption(e,t,"htx","hovertext");if(qt.isValidTextValue(n))return i(n);var a=qt.extractOption(e,t,"tx","text");if(qt.isValidTextValue(a))return i(a)};qt.isValidTextValue=function(e){return e||e===0};qt.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&&(u=1):u=0,qt.strTranslate(n-u*(r+o),a-u*(i+s))+qt.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")};qt.setTransormAndDisplay=function(e,t){e.attr("transform",qt.getTextTransform(t)),e.style("display",t.scale?null:"none")};qt.ensureUniformFontSize=function(e,t){var r=qt.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};qt.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)};qt.bigFont=function(e){return Math.round(1.2*e)};var S0e=qt.getFirefoxVersion(),owt=S0e!==null&&S0e<86;qt.getPositionFromD3Event=function(){return owt?[aA.event.layerX,aA.event.layerY]:[aA.event.offsetX,aA.event.offsetY]}});var z0e=W(()=>{"use strict";var swt=it(),I0e={"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(bV in I0e)R0e=bV.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),swt.addStyleRule(R0e,I0e[bV]);var R0e,bV});var wV=W((dLr,B0e)=>{B0e.exports=!0});var AV=W((pLr,q0e)=>{"use strict";var lwt=wV(),TV;typeof window.matchMedia=="function"?TV=!window.matchMedia("(hover: none)").matches:TV=lwt;q0e.exports=TV});var Vx=W((vLr,MV)=>{"use strict";var sw=typeof Reflect=="object"?Reflect:null,O0e=sw&&typeof sw.apply=="function"?sw.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},aD;sw&&typeof sw.ownKeys=="function"?aD=sw.ownKeys:Object.getOwnPropertySymbols?aD=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:aD=function(t){return Object.getOwnPropertyNames(t)};function uwt(e){console&&console.warn&&console.warn(e)}var U0e=Number.isNaN||function(t){return t!==t};function xs(){xs.init.call(this)}MV.exports=xs;MV.exports.once=dwt;xs.EventEmitter=xs;xs.prototype._events=void 0;xs.prototype._eventsCount=0;xs.prototype._maxListeners=void 0;var N0e=10;function oD(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(xs,"defaultMaxListeners",{enumerable:!0,get:function(){return N0e},set:function(e){if(typeof e!="number"||e<0||U0e(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");N0e=e}});xs.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};xs.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||U0e(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 V0e(e){return e._maxListeners===void 0?xs.defaultMaxListeners:e._maxListeners}xs.prototype.getMaxListeners=function(){return V0e(this)};xs.prototype.emit=function(t){for(var r=[],i=1;i0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")O0e(l,this,r);else for(var u=l.length,c=W0e(l,u),i=0;i0&&o.length>n&&!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,uwt(s)}return e}xs.prototype.addListener=function(t,r){return G0e(this,t,r,!1)};xs.prototype.on=xs.prototype.addListener;xs.prototype.prependListener=function(t,r){return G0e(this,t,r,!0)};function cwt(){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 H0e(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=cwt.bind(i);return n.listener=r,i.wrapFn=n,n}xs.prototype.once=function(t,r){return oD(r),this.on(t,H0e(this,t,r)),this};xs.prototype.prependOnceListener=function(t,r){return oD(r),this.prependListener(t,H0e(this,t,r)),this};xs.prototype.removeListener=function(t,r){var i,n,a,o,s;if(oD(r),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(a=-1,o=i.length-1;o>=0;o--)if(i[o]===r||i[o].listener===r){s=i[o].listener,a=o;break}if(a<0)return this;a===0?i.shift():fwt(i,a),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};xs.prototype.off=xs.prototype.removeListener;xs.prototype.removeAllListeners=function(t){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var a=Object.keys(i),o;for(n=0;n=0;n--)this.removeListener(t,r[n]);return this};function j0e(e,t,r){var i=e._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?hwt(n):W0e(n,n.length)}xs.prototype.listeners=function(t){return j0e(this,t,!0)};xs.prototype.rawListeners=function(t){return j0e(this,t,!1)};xs.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$0e.call(e,t)};xs.prototype.listenerCount=$0e;function $0e(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}xs.prototype.eventNames=function(){return this._eventsCount>0?aD(this._events):[]};function W0e(e,t){for(var r=new Array(t),i=0;i{"use strict";var SV=Vx().EventEmitter,vwt={init:function(e){if(e._ev instanceof SV)return e;var t=new SV,r=new SV;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(i,n){t.emit(i,n),r.emit(i,n)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(!n)return;var a=n._events[t];if(!a)return;function o(l){if(l.listener){if(n.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(n,[r])}else return l.apply(n,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var Z0e=it(),gwt=cy().dfltConfig;function mwt(e,t){for(var r=[],i,n=0;ngwt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ig.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ig.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ig.undo=function(t){var r,i;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,i=0;i=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i{"use strict";Q0e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var fw=W(su=>{"use strict";var od=yi(),oA=it(),lD=Wa(),kV=ew(),ywt=EV(),xwt=J6(),_wt=cy().configAttributes,ede=ls(),Bp=oA.extendDeepAll,uw=oA.isPlainObject,bwt=oA.isArrayOrTypedArray,uD=oA.nestedProperty,wwt=oA.valObjectMeta,CV="_isSubplotObj",cD="_isLinkedToArray",Twt="_arrayAttrRegexps",rde="_deprecated",DV=[CV,cD,Twt,rde];su.IS_SUBPLOT_OBJ=CV;su.IS_LINKED_TO_ARRAY=cD;su.DEPRECATED=rde;su.UNDERSCORE_ATTRS=DV;su.get=function(){var e={};return od.allTypes.forEach(function(t){e[t]=Mwt(t)}),{defs:{valObjects:wwt,metaKeys:DV.concat(["description","role","editType","impliedEdits"]),editType:{traces:ede.traces,layout:ede.layout},impliedEdits:{}},traces:e,layout:Swt(),frames:Ewt(),animation:cw(xwt),config:cw(_wt)}};su.crawl=function(e,t,r,i){var n=r||0;i=i||"",Object.keys(e).forEach(function(a){var o=e[a];if(DV.indexOf(a)===-1){var s=(i?i+".":"")+a;t(o,a,e,n,s),!su.isValObject(o)&&uw(o)&&a!=="impliedEdits"&&su.crawl(o,t,n+1,s)}})};su.isValObject=function(e){return e&&e.valType!==void 0};su.findArrayAttributes=function(e){var t=[],r=[],i=[],n,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),i=i.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(n,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)bwt(f)&&t.push(a+h);else if(i[u]){if(Array.isArray(f))for(var d=0;d=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!sD(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function sD(e){return e===Math.round(e)&&e>=0}function Mwt(e){var t,r;t=od.modules[e]._module,r=t.basePlotModule;var i={};i.type=null;var n=Bp({},lD),a=Bp({},t.attributes);su.crawl(a,function(l,u,c,f,h){uD(n,h).set(void 0),l===void 0&&uD(a,h).set(void 0)}),Bp(i,n),od.traceIs(e,"noOpacity")&&delete i.opacity,od.traceIs(e,"showLegend")||(delete i.showlegend,delete i.legendgroup),od.traceIs(e,"noHover")&&(delete i.hoverinfo,delete i.hoverlabel),t.selectPoints||delete i.selectedpoints,Bp(i,a),r.attributes&&Bp(i,r.attributes),i.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:cw(i)};if(t.layoutAttributes){var s={};Bp(s,t.layoutAttributes),o.layoutAttributes=cw(s)}return t.animatable||su.crawl(o,function(l){su.isValObject(l)&&"anim"in l&&delete l.anim}),o}function Swt(){var e={},t,r;Bp(e,kV);for(t in od.subplotsRegistry)if(r=od.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i{"use strict";var hw=it(),Lwt=Wa(),_y="templateitemname",FV={name:{valType:"string",editType:"none"}};FV[_y]={valType:"string",editType:"calc"};Gx.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=FV.name,t[_y]=FV[_y],t};Gx.traceTemplater=function(e){var t={},r,i;for(r in e)i=e[r],Array.isArray(i)&&i.length&&(t[r]=0);function n(a){r=hw.coerce(a,{},Lwt,"type");var o={type:r,_template:null};if(r in t){i=e[r];var s=t[r]%i.length;t[r]++,o._template=i[s]}return o}return{newTrace:n}};Gx.newContainer=function(e,t,r){var i=e._template,n=i&&(i[t]||r&&i[r]);hw.isPlainObject(n)||(n=null);var a=e[t]={_template:n};return a};Gx.arrayTemplater=function(e,t,r){var i=e._template,n=i&&i[ade(t)],a=i&&i[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[_y]=u[_y];if(!nde(f))return c._template=n,c;for(var h=0;h=i&&(r._input||{})._templateitemname;a&&(n=i);var o=t+"["+n+"]",s;function l(){s={},a&&(s[o]={},s[o][_y]=a)}l();function u(d,p){s[d]=p}function c(d,p){a?hw.nestedProperty(s[o],d).set(p):s[o+"."+d]=p}function f(){var d=s;return l(),d}function h(d,p){d&&c(d,p);var v=f();for(var m in v)hw.nestedProperty(e,m).set(v[m])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Gl=W((bLr,ode)=>{"use strict";var sA=(K3(),Go(Z3)).counter;ode.exports={idRegex:{x:sA("x","( domain)?"),y:sA("y","( domain)?")},attrRegex:sA("[xy]axis"),xAxisMatch:sA("xaxis"),yAxisMatch:sA("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 Cs=W(Rh=>{"use strict";var Pwt=yi(),LV=Gl();Rh.id2name=function(t){if(!(typeof t!="string"||!t.match(LV.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Rh.name2id=function(t){if(t.match(LV.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Rh.cleanId=function(t,r,i){var n=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(LV.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(n&&!i)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(n&&i?" domain":"")}};Rh.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var n=Rh.listIds(e,t),a=new Array(n.length),o;for(o=0;oi?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Rh.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function sde(e,t){if(t&&t.length){for(var r=0;r{"use strict";function Iwt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function Rwt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}lde.exports={clearOutlineControllers:Iwt,clearOutline:Rwt}});var fD=W((ALr,ude)=>{"use strict";ude.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var _c=W(dD=>{"use strict";var hD=yi(),MLr=Gl().SUBPLOT_PATTERN;dD.getSubplotCalcData=function(e,t,r){var i=hD.subplotsRegistry[t];if(!i)return[];for(var n=i.attr,a=[],o=0;o{"use strict";var zwt=yi(),dw=it();Hx.manageCommandObserver=function(e,t,r,i){var n={},a=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=Hx.hasSimpleAPICommandBindings(e,r,n.lookupTable);if(t&&t._commandObserver){if(o)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(o){cde(e,o,n.cache),n.check=function(){if(a){var c=cde(e,o,n.cache);return c.changed&&i&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(i({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+n;dw.isPlainObject(a)?PV(a,t,o,i+1):t(o,n,a)}})}});var Ko=W((CLr,Tde)=>{"use strict";var kLr=vi(),qwt=z3().timeFormatLocale,Owt=gN().formatLocale,lA=sn(),Nwt=mN(),Uwt=E6().version,Ha=yi(),Vwt=fw(),Gwt=Da(),Si=it(),Hwt=ni(),pde=Kn().BADNUM,zh=Cs(),jwt=by().clearOutline,$wt=fD(),IV=J6(),Wwt=EV(),Ywt=_c().getModuleCalcData,vde=Si.relinkPrivateKeys,jx=Si._,ui=Tde.exports={};Si.extendFlat(ui,Ha);ui.attributes=Wa();ui.attributes.type.values=ui.allTypes;ui.fontAttrs=Ho();ui.layoutAttributes=ew();var vD=dde();ui.executeAPICommand=vD.executeAPICommand;ui.computeAPICommandBindings=vD.computeAPICommandBindings;ui.manageCommandObserver=vD.manageCommandObserver;ui.hasSimpleAPICommandBindings=vD.hasSimpleAPICommandBindings;ui.redrawText=function(e){return e=Si.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Ha.getComponentMethod("annotations","draw")(e),Ha.getComponentMethod("legend","draw")(e),Ha.getComponentMethod("colorbar","draw")(e),t(ui.previousPromises(e)))},300)})};ui.resize=function(e){e=Si.getGraphDiv(e);var t,r=new Promise(function(i,n){(!e||Si.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=i,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Si.isHidden(e)){i(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Ha.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===i&&(delete e._resolveResize,i(e))})},100)});return t&&t(r),r};ui.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};ui.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var i=ui.graphJson(e,!1,"object");i.version=Uwt;var n=new URL(t);n.searchParams.set("origin",window.location.origin);var a=window.open(n.href,"_blank");if(!a){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"&&(a.postMessage({type:"chart",chart:i},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var Xwt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Zwt=["year","month","dayMonth","dayMonthYear"];ui.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,i=e._fullLayout||{};if(i._skipDefaults){delete i._skipDefaults;return}var n=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||ui.createTransitionData(e),n._dfltTitle={plot:jx(e,"Click to enter Plot title"),subtitle:jx(e,"Click to enter Plot subtitle"),x:jx(e,"Click to enter X axis title"),y:jx(e,"Click to enter Y axis title"),colorbar:jx(e,"Click to enter Colorscale title"),annotation:jx(e,"new text")},n._traceWord=jx(e,"trace");var h=gde(e,Xwt);if(i._initialAutoSizeIsDone){var d=i.width,p=i.height;ui.supplyLayoutGlobalDefaults(a,n,h),a.width||(n.width=d),a.height||(n.height=p),ui.sanitizeMargins(n)}else{ui.supplyLayoutGlobalDefaults(a,n,h);var v=!a.width||!a.height,m=n.autosize,g=c.autosizable,w=v&&(m||g);w?ui.plotAutoSize(e,a,n):v&&ui.sanitizeMargins(n),!m&&v&&(a.width=n.width,a.height=n.height)}n._d3locale=Qwt(h,n.separators),n._extraFormat=gde(e,Zwt),n._initialAutoSizeIsDone=!0,n._dataLength=l.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var b=n._subplots=Jwt(),_=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Kwt(o,l),ui.supplyDataDefaults(l,s,a,n);var x=Object.keys(_.x),T=Object.keys(_.y);if(x.length>1&&T.length>1){for(Ha.getComponentMethod("grid","sizeDefaults")(a,n),f=0;f15&&T.length>15&&n.shapes.length===0&&n.images.length===0,ui.linkSubplots(s,n,o,i),ui.cleanPlot(s,n,o,i);var C=!!(i._has&&i._has("cartesian")),k=!!(n._has&&n._has("cartesian")),D=C,F=k;D&&!F?i._bgLayer.remove():F&&!D&&(n._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&jwt({_fullLayout:i}),e5t(s,n),vde(n,i),Ha.getComponentMethod("colorscale","crossTraceDefaults")(s,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var P=n._tracePreGUI,R={},L;for(L in P)R[L]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=ui.layoutAttributes.width.min,h=ui.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(i.height-s)>1;(p||d)&&(d&&(i.width=o),p&&(i.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),ui.sanitizeMargins(i)};ui.supplyLayoutModuleDefaults=function(e,t,r,i){var n=Ha.componentsRegistry,a=t._basePlotModules,o,s,l,u=Ha.subplotsRegistry.cartesian;for(o in n)l=n[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Ha.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Si.subplotSort);for(s=0;s1&&(r.l/=m,r.r/=m)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var w=r.xl!==void 0?r.xl:r.x,b=r.xr!==void 0?r.xr:r.x,_=r.yt!==void 0?r.yt:r.y,M=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:w,size:r.l+v},r:{val:b,size:r.r+v},b:{val:M,size:r.b+v},t:{val:_,size:r.t+v}},p[t]=1}if(!i._replotting)return ui.doAutoMargin(e)}};function r5t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=zh.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}ui.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,i=t.height;t._size||(t._size={}),xde(t);var n=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Si.extendFlat({},n),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,p=t.minreducedwidth,v=t.minreducedheight;if(a.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var g=e._fullLayout._reservedMargin;for(var w in g)for(var b in g[w]){var _=g[w][b];o[b]=Math.max(o[b],_)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var M in o){var x=0;for(var T in h)T!=="base"&&lA(h[T][M].size)&&(x=h[T][M].size>x?h[T][M].size:x);var A=Math.max(0,a[M]-x);o[M]=Math.max(0,o[M]-A)}for(var y in h){var E=h[y].l||{},S=h[y].b||{},C=E.val,k=E.size,D=S.val,F=S.size,P=r-o.r-o.l,R=i-o.t-o.b;for(var L in h){if(lA(k)&&h[L].r){var I=h[L].r.val,B=h[L].r.size;if(I>C){var O=(k*I+(B-P)*C)/(I-C),$=(B*(1-C)+(k-P)*(1-I))/(I-C);O+$>l+u&&(l=O,u=$)}}if(lA(F)&&h[L].t){var Y=h[L].t.val,K=h[L].t.size;if(Y>D){var j=(F*Y+(K-R)*D)/(Y-D),q=(K*(1-D)+(F-R)*(1-Y))/(Y-D);j+q>f+c&&(f=j,c=q)}}}}}var J=Si.constrain(r-a.l-a.r,_de,p),U=Si.constrain(i-a.t-a.b,bde,v),V=Math.max(0,r-J),X=Math.max(0,i-U);if(V){var H=(l+u)/V;H>1&&(l/=H,u/=H)}if(X){var G=(f+c)/X;G>1&&(f/=G,c/=G)}if(n.l=Math.round(l)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(c)+o.t,n.b=Math.round(f)+o.b,n.p=Math.round(a.pad),n.w=Math.round(r)-n.l-n.r,n.h=Math.round(i)-n.t-n.b,!t._replotting&&(ui.didMarginChange(s,n)||r5t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};ui.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&ui.supplyDefaults(e);var a=i?e._fullData:e.data,o=i?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,h){if(typeof f=="function")return h?"_function_":null;if(Si.isPlainObject(f)){var d={};return Object.keys(f).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof f[g]=="function"){h&&(d[g]="_function");return}d[g]=l(f[g],h)}}),d}var p=Array.isArray(f),v=Si.isTypedArray(f);if((p||v)&&f.dtype&&f.shape){var m=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Si.isArrayBuffer(m)?Nwt.encode(m):m},h)}return p?f.map(function(g){return l(g,h)}):v?Si.simpleMap(f,Si.identity):Si.isJSDate(f)?Si.ms2DateTimeLocal(+f):f}var u={data:(a||[]).map(function(f){var h=l(f);return t&&delete h.fit,h})};if(!t&&(u.layout=l(o),i)){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)),n&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};ui.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Ha.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!i&&d===h&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Ha.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,n(e._transitionData._interruptCallbacks)}var u=[ui.previousPromises,l,r.prepareFn,ui.rehover,ui.reselect,o],c=Si.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}ui.doCalcdata=function(e,t){var r=zh.list(e),i=e._fullData,n=e._fullLayout,a,o,s,l=new Array(i.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},s=0;s{"use strict";$x.xmlns="http://www.w3.org/2000/xmlns/";$x.svg="http://www.w3.org/2000/svg";$x.xlink="http://www.w3.org/1999/xlink";$x.svgAttrs={xmlns:$x.svg,"xmlns:xlink":$x.xlink}});var Hl=W((FLr,Ade)=>{"use strict";Ade.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 uo=W(p0=>{"use strict";var lu=vi(),ld=it(),s5t=ld.strTranslate,RV=sd(),l5t=Hl().LINE_SPACING,u5t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,Dde=e=>e?e.match(u5t):null;p0.matchTex=Dde;p0.convertToTspans=function(e,t,r){var i=e.text(),n=!e.attr("data-notex")&&t&&t._context.typesetMath&&Dde(i);n&&!d5t()&&(n=null);var a=lu.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":i,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=T5t(e.node(),i);l&&e.style("pointer-events","all"),p0.positionText(e),r&&r.call(e)}return n?(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");p5t(n[2],c,function(h,d,p){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=h&&h.select("svg");if(!v||!v.node()){s(),l();return}e.style("display","none");var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":i,"data-math":"Y"});m.node().appendChild(v.node()),d&&d.node()&&v.node().insertBefore(d.node().cloneNode(!0),v.node().firstChild);var g=p.width,w=p.height;v.attr({class:o,height:w,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var b=e.node().style.fill||"black",_=v.select("g");_.attr({fill:b,stroke:b});var M=_.node().getBoundingClientRect(),x=M.width,T=M.height;(x>g||T>w)&&(v.style("overflow","hidden"),M=v.node().getBoundingClientRect(),x=M.width,T=M.height);var A=+e.attr("x"),y=+e.attr("y"),E=u||e.node().getBoundingClientRect().height,S=-E/4;o[0]==="y"?m.attr({transform:"rotate("+[-90,A,y]+")"+s5t(-x/2,S-T/2)}):o[0]==="l"?y=S-T/2:o[0]==="a"&&o.indexOf("atitle")!==0?(A=0,y=S):(A=A-x*(f==="middle"?.5:f==="end"?1:0),y=y+S-T/2),v.attr({x:A,y}),r&&r.call(e,m),l(m)})})):s(),e};var c5t=/(<|<|<)/g,f5t=/(>|>|>)/g;function h5t(e){return e.replace(c5t,"\\lt ").replace(f5t,"\\gt ")}var zV=null,Fde=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,Mde=!1,Sde=!1;function d5t(){let e=Fde();return e===3||e===4?!0:(e===null?Mde||(Mde=!0,ld.warn("MathJax is not loaded. Math equations will not be rendered.")):Sde||(Sde=!0,ld.warn("Unsupported MathJax version:",MathJax.version)),!1)}function p5t(e,t,r){let i=Fde();var n;let a=function(){if(!zV){let u=MathJax._.output.svg_ts.SVG,c=ld.extendFlat({},MathJax.config.svg,{fontCache:"local"});i===4&&(c.linebreaks=ld.extendFlat({},c.linebreaks,{inline:!1})),zV=MathJax._.mathjax.mathjax.document(document,ld.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+ld.randstr({},64);n=lu.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=h5t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return zV.convert(l,{display:!1})}).then(function(u){n.node().appendChild(u)})},o=function(){let s=n.select(".MathJax"),l=!s.empty()&&n.select("svg").node();if(!l)ld.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}n.remove()};Promise.resolve().then(a).then(o).catch(s=>{ld.log("MathJax typesetting failed.",e,s),n&&n.remove(),r()})}var Lde={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"},v5t={sub:"0.3em",sup:"-0.6em"},g5t={sub:"-0.21em",sup:"0.42em"},Ede="\u200B",kde=["http:","https:","mailto:","",void 0,":"],Pde=p0.NEWLINES=/(\r\n?|\n)/g,qV=/(<[^<>]*>)/,OV=/<(\/?)([^ >]*)(\s+(.*))?>/i,m5t=//i;p0.BR_TAG_ALL=//gi;var Ide=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Rde=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,zde=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y5t=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Wx(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&gD(i)}var x5t=/(^|;)\s*color:/;p0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,i=t.allowedTags!==void 0?t.allowedTags:["br"],n="...",a=n.length,o=e.split(qV),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,v-a))+n):s.push(f.slice(0,v));break}l=""}}return s.join("")};var _5t={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},b5t=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function gD(e){return e.replace(b5t,function(t,r){var i;return r.charAt(0)==="#"?i=w5t(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):i=_5t[r],i||t})}p0.convertEntities=gD;function w5t(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 T5t(e,t){t=t.replace(Pde," ");var r=!1,i=[],n,a=-1;function o(){a++;var x=document.createElementNS(RV.svg,"tspan");lu.select(x).attr({class:"line",dy:a*l5t+"em"}),e.appendChild(x),n=x;var T=i;if(i=[{node:x}],T.length>1)for(var A=1;A.",t);return}var T=i.pop();x!==T.type&&ld.log("Start tag <"+T.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),n=i[i.length-1].node}var c=m5t.test(t);c?o():(n=e,i=[{node:e}]);for(var f=t.split(qV),h=0;h{"use strict";var A5t=vi(),cA=sn(),mD=it(),Yx=ni(),M5t=Rx().isValid;function S5t(e,t,r){var i=t?mD.nestedProperty(e,t).get()||{}:e,n=i[r||"color"];n&&n._inputArray&&(n=n._inputArray);var a=!1;if(mD.isArrayOrTypedArray(n)){for(var o=0;o=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function Vde(e,t){t=t||{};for(var r=e.domain,i=e.range,n=i.length,a=new Array(n),o=0;o{"use strict";var Hde=aV(),k5t=Hde.FORMAT_LINK,C5t=Hde.DATE_FORMAT_LINK;function D5t(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?NV:jde)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function NV(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: "+k5t+"."].join(" ")}function jde(e,t){return NV(e,t)+[" And for dates see: "+C5t+".","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(" ")}$de.exports={axisHoverFormat:D5t,descriptionOnlyNumbers:NV,descriptionWithDates:jde}});var ec=W((zLr,upe)=>{"use strict";var Wde=Ho(),pw=Vl(),lpe=Du().dash,VV=tn().extendFlat,Yde=Da().templatedArray,RLr=Ga().templateFormatStringDescription,Xde=_s().descriptionWithDates,F5t=Kn().ONEDAY,e1=Gl(),L5t=e1.HOUR_PATTERN,P5t=e1.WEEKDAY_PATTERN,UV={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},I5t=VV({},UV,{values:UV.values.slice().concat(["sync"])});function Zde(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Kde={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Jde={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Qde={valType:"data_array",editType:"ticks"},epe={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function tpe(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function rpe(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var ipe={valType:"color",dflt:pw.defaultLine,editType:"ticks"},npe={valType:"color",dflt:pw.lightLine,editType:"ticks"};function ape(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var ope=VV({},lpe,{editType:"ticks"}),spe={valType:"boolean",editType:"ticks"};upe.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:pw.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Wde({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:[e1.idRegex.x.toString(),e1.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:[e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"calc"},rangebreaks:Yde("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:[P5t,L5t,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:F5t},editType:"calc"}),tickmode:I5t,nticks:Zde(),tick0:Kde,dtick:Jde,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Qde,ticktext:{valType:"data_array",editType:"ticks"},ticks:epe,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:tpe(),tickwidth:rpe(),tickcolor:ipe,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:VV({},lpe,{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:Wde({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:Xde("tick label")},tickformatstops:Yde("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:Xde("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:pw.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:spe,gridcolor:npe,gridwidth:ape(),griddash:ope,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:pw.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:pw.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"plot"},minor:{tickmode:UV,nticks:Zde("minor"),tick0:Kde,dtick:Jde,tickvals:Qde,ticks:epe,ticklen:tpe("minor"),tickwidth:rpe("minor"),tickcolor:ipe,gridcolor:npe,gridwidth:ape("minor"),griddash:ope,showgrid:spe,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 yD=W((BLr,hpe)=>{"use strict";var bs=ec(),cpe=Ho(),fpe=tn().extendFlat,R5t=ls().overrideAll;hpe.exports=R5t({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:bs.linecolor,outlinewidth:bs.linewidth,bordercolor:bs.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:bs.minor.tickmode,nticks:bs.nticks,tick0:bs.tick0,dtick:bs.dtick,tickvals:bs.tickvals,ticktext:bs.ticktext,ticks:fpe({},bs.ticks,{dflt:""}),ticklabeloverflow:fpe({},bs.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:bs.ticklen,tickwidth:bs.tickwidth,tickcolor:bs.tickcolor,ticklabelstep:bs.ticklabelstep,showticklabels:bs.showticklabels,labelalias:bs.labelalias,tickfont:cpe({description:"Sets the color bar's tick label font"}),tickangle:bs.tickangle,tickformat:bs.tickformat,tickformatstops:bs.tickformatstops,tickprefix:bs.tickprefix,showtickprefix:bs.showtickprefix,ticksuffix:bs.ticksuffix,showticksuffix:bs.showticksuffix,separatethousands:bs.separatethousands,exponentformat:bs.exponentformat,minexponent:bs.minexponent,showexponent:bs.showexponent,title:{text:{valType:"string"},font:cpe({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Eo=W((OLr,ppe)=>{"use strict";var z5t=yD(),B5t=(K3(),Go(Z3)).counter,q5t=(qx(),Go(Bx)).default,dpe=Rx().scales,qLr=q5t(dpe);function xD(e){return"`"+e+"`"}ppe.exports=function(t,r){t=t||"",r=r||{};var i=r.cLetter||"c",n="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:i==="z",s=typeof r.colorscaleDflt=="string"?dpe[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"}[i],f="in "+xD(u+c));var h=n?" Has an effect only if "+f+" is set to a numerical array.":"",d=i+"auto",p=i+"min",v=i+"max",m=i+"mid",g=xD(u+d),w=xD(u+p),b=xD(u+v),_=w+" and "+b,M={};M[p]=M[v]=void 0;var x={};x[d]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(T.color.anim=!0)),T[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},T[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},T[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},T[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},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"},a||(T.showscale={valType:"boolean",dflt:o,editType:"calc"},T.colorbar=z5t),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:B5t("coloraxis"),dflt:null,editType:"calc"}),T}});var HV=W((NLr,vpe)=>{"use strict";var O5t=tn().extendFlat,N5t=Eo(),GV=Rx().scales;vpe.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:GV.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:GV.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:GV.RdBu,editType:"calc"}},coloraxis:O5t({_isSubplotObj:!0,editType:"calc"},N5t("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var jV=W((ULr,gpe)=>{"use strict";var U5t=it();gpe.exports=function(t){return U5t.isPlainObject(t.colorbar)}});var YV=W(WV=>{"use strict";var $V=sn(),mpe=it(),ype=Kn(),V5t=ype.ONEDAY,G5t=ype.ONEWEEK;WV.dtick=function(e,t){var r=t==="log",i=t==="date",n=t==="category",a=i?V5t:1;if(!e)return a;if($V(e))return e=Number(e),e<=0?a:n?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if(typeof e!="string"||!(i||r))return a;var o=e.charAt(0),s=e.slice(1);return s=$V(s)?Number(s):0,s<=0||!(i&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};WV.tick0=function(e,t,r,i){if(t==="date")return mpe.cleanDate(e,mpe.dateTick0(r,i%G5t===0?1:0));if(!(i==="D1"||i==="D2"))return $V(e)?Number(e):0}});var Xx=W((GLr,_pe)=>{"use strict";var xpe=YV(),H5t=it().isArrayOrTypedArray,j5t=yc().isTypedArraySpec,$5t=yc().decodeTypedArraySpec;_pe.exports=function(t,r,i,n,a={}){var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(_){var M=s[_];return j5t(M)&&(M=$5t(M)),M!==void 0?M:(l._template||{})[_]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),p=c("overlaying"),v=n==="category"||n==="multicategory",m;H5t(d)?m="array":h?m="linear":p&&!v?m="sync":m="auto";var g=i(u+"tickmode",m);if(g==="auto"||g==="sync")i(u+"nticks");else if(g==="linear"){var w=l.dtick=xpe.dtick(h,n);l.tick0=xpe.tick0(f,n,r.calendar,w)}else if(n!=="multicategory"){var b=i(u+"tickvals");b===void 0?l.tickmode="auto":o||i("ticktext")}}});var vw=W((HLr,wpe)=>{"use strict";var XV=it(),bpe=ec();wpe.exports=function(t,r,i,n){var a=n.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?bpe.minor:bpe,u=a?"minor.":"",c=XV.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=XV.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=XV.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=i(u+"ticks",!a&&n.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var ZV=W((jLr,Tpe)=>{"use strict";Tpe.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],i=r.filter(function(a){return t[a]!==void 0}),n=function(a){return t[a]===t[i[0]]};if(i.every(n)||i.length===1)return t[i[0]]}});var Xc=W(($Lr,Ape)=>{"use strict";var _D=it(),W5t=Da();Ape.exports=function(t,r,i){var n=i.name,a=i.inclusionAttr||"visible",o=r[n],s=_D.isArrayOrTypedArray(t[n])?t[n]:[],l=r[n]=[],u=W5t.arrayTemplater(r,n,a),c,f;for(c=0;c{"use strict";var KV=it(),Y5t=ni().contrast,Mpe=ec(),X5t=ZV(),Z5t=Xc();Spe.exports=function(t,r,i,n,a){a||(a={});var o=i("labelalias");KV.isPlainObject(o)||delete r.labelalias;var s=X5t(t),l=i("showticklabels");if(l){a.noTicklabelshift||i("ticklabelshift"),a.noTicklabelstandoff||i("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?Y5t(a.bgColor):c&&c!==Mpe.color.dflt?c:u.color;if(KV.coerceFont(i,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&i("ticklabelstep"),!a.noAng){var d=i("tickangle");!a.noAutotickangles&&d==="auto"&&i("autotickangles")}if(n!=="category"){var p=i("tickformat");Z5t(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:K5t}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!p&&n!=="date"&&(i("showexponent",s),i("exponentformat"),i("minexponent"),i("separatethousands"))}!a.noMinorloglabels&&n==="log"&&i("minorloglabels")}};function K5t(e,t){function r(n,a){return KV.coerce(e,t,Mpe.tickformatstops,n,a)}var i=r("enabled");i&&(r("dtickrange"),r("value"))}});var Ty=W((YLr,Epe)=>{"use strict";var J5t=ZV();Epe.exports=function(t,r,i,n,a){a||(a={});var o=a.tickSuffixDflt,s=J5t(t),l=i("tickprefix");l&&i("showtickprefix",s);var u=i("ticksuffix",o);u&&i("showticksuffix",s)}});var JV=W((XLr,kpe)=>{"use strict";var Ay=it(),Q5t=Da(),e4t=Xx(),t4t=vw(),r4t=wy(),i4t=Ty(),n4t=yD();kpe.exports=function(t,r,i){var n=Q5t.newContainer(r,"colorbar"),a=t.colorbar||{};function o(S,C){return Ay.coerce(a,n,n4t,S,C)}var s=i.margin||{t:0,b:0,l:0,r:0},l=i.width-s.l-s.r,u=i.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var p=o("yref"),v=o("xref"),m=p==="paper",g=v==="paper",w,b,_,M="left";f?(_="middle",M=g?"left":"right",w=g?1.02:1,b=.5):(_=m?"bottom":"top",M="center",w=.5,b=m?1.02:1),Ay.coerce(a,n,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:w}},"x"),Ay.coerce(a,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:b}},"y"),o("xanchor",M),o("xpad"),o("yanchor",_),o("ypad"),Ay.noneOrAll(a,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=Ay.coerce(a,n,{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",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),e4t(a,n,o,"linear");var T=i.font,A={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:T};x.indexOf("inside")!==-1&&(A.bgColor="black"),i4t(a,n,o,"linear",A),r4t(a,n,o,"linear",A),t4t(a,n,o,"linear",A),o("title.text",i._dfltTitle.colorbar);var y=n.showticklabels?n.tickfont:T,E=Ay.extendFlat({},T,{family:y.family,size:Ay.bigFont(y.size)});Ay.coerceFont(o,"title.font",E),o("title.side",f?"top":"right")}});var Fu=W((ZLr,Fpe)=>{"use strict";var Cpe=sn(),eG=it(),a4t=jV(),o4t=JV(),Dpe=Rx().isValid,s4t=yi().traceIs;function QV(e,t){var r=t.slice(0,t.length-1);return t?eG.nestedProperty(e,r).get()||{}:e}Fpe.exports=function e(t,r,i,n,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=QV(t,o),c=QV(r,o),f=QV(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,i,n,a)};if(l){var d=i._colorAxes||{},p=n(o+"coloraxis");if(p){var v=s4t(r,"contour")&&eG.nestedProperty(r,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==v&&(m[0]=!1,eG.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[v,r,[h]];return}}var g=u[s+"min"],w=u[s+"max"],b=Cpe(g)&&Cpe(w)&&g{"use strict";var Lpe=it(),l4t=Da(),Ppe=HV(),u4t=Fu();Ipe.exports=function(t,r){function i(f,h){return Lpe.coerce(t,r,Ppe,f,h)}i("colorscale.sequential"),i("colorscale.sequentialminus"),i("colorscale.diverging");var n=r._colorAxes,a,o;function s(f,h){return Lpe.coerce(a,o,Ppe.coloraxis,f,h)}for(var l in n){var u=n[l];if(u[0])a=t[l]||{},o=l4t.newContainer(r,l,"coloraxis"),o._name=l,u4t(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var c4t=it(),f4t=bc().hasColorscale,h4t=bc().extractOpts;zpe.exports=function(t,r){function i(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function n(c,f){var h=f.container?c4t.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=h4t(h),p=d.auto;(p||d.min===void 0)&&i(h,f.min),(p||d.max===void 0)&&i(h,f.max),d.autocolorscale&&i(h,"colorscale")}}for(var a=0;a{"use strict";var qpe=sn(),tG=it(),d4t=bc().extractOpts;Ope.exports=function(t,r,i){var n=t._fullLayout,a=i.vals,o=i.containerStr,s=o?tG.nestedProperty(r,o).get():r,l=d4t(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return tG.aggNums(Math.min,null,a)},p=function(){return tG.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&qpe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=p():u&&(s._colorAx&&qpe(f)?f=Math.max(f,p()):f=p()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?v=n.colorscale.sequential:v=n.colorscale.sequentialminus,l._sync("colorscale",v)}}});var Jo=W((e9r,Npe)=>{"use strict";var bD=Rx(),gw=bc();Npe.exports={moduleType:"component",name:"colorscale",attributes:Eo(),layoutAttributes:HV(),supplyLayoutDefaults:Rpe(),handleDefaults:Fu(),crossTraceDefaults:Bpe(),calc:Zc(),scales:bD.scales,defaultScale:bD.defaultScale,getScale:bD.get,isValidScale:bD.isValid,hasColorscale:gw.hasColorscale,extractOpts:gw.extractOpts,extractScale:gw.extractScale,flipScale:gw.flipScale,makeColorScaleFunc:gw.makeColorScaleFunc,makeColorScaleFuncFromTrace:gw.makeColorScaleFuncFromTrace}});var $o=W((t9r,Vpe)=>{"use strict";var Upe=it(),p4t=yc().isTypedArraySpec;Vpe.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 Upe.isPlainObject(t)&&(Upe.isArrayOrTypedArray(t.size)||p4t(t.size))}}});var fA=W((r9r,Gpe)=>{"use strict";var v4t=sn();Gpe.exports=function(t,r){r||(r=2);var i=t.marker,n=i.sizeref||1,a=i.sizemin||0,o=i.sizemode==="area"?function(s){return Math.sqrt(s/n)}:function(s){return s/n};return function(s){var l=o(s/r);return v4t(l)&&l>0?Math.max(l,a):0}}});var Kf=W(wc=>{"use strict";var hA=it();wc.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};wc.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],i=e.yaxes||[],n=0;n=0&&r.index{var rG={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},x4t=/([astvzqmhlc])([^astvzqmhlc]*)/gi,_4t=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function b4t(e){let t=[];return e.replace(x4t,(r,i,n)=>{let a=i.toLowerCase(),o=i,s=w4t(n);for(a==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),a="l",o=o==="m"?"l":"L");;){if(s.length===rG[a])return t.push([o,...s]),"";if(s.length{"use strict";var T4t=iG(),$r=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},On="M0,0Z",Wpe=Math.sqrt(2),My=Math.sqrt(3),nG=Math.PI,aG=Math.cos,oG=Math.sin;Jpe.exports={circle:{n:0,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n="M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z";return r?Un(t,r,n):n}},square:{n:1,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")}},diamond:{n:2,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"Z")}},cross:{n:3,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.4,2),n=$r(e*1.2,2);return Un(t,r,"M"+n+","+i+"H"+i+"V"+n+"H-"+i+"V"+i+"H-"+n+"V-"+i+"H-"+i+"V-"+n+"H"+i+"V-"+i+"H"+n+"Z")}},x:{n:4,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.8/Wpe,2),n="l"+i+","+i,a="l"+i+",-"+i,o="l-"+i+",-"+i,s="l-"+i+","+i;return Un(t,r,"M0,"+i+n+a+o+a+o+s+o+s+n+s+n+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+i+","+n+"H"+i+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+i+",-"+n+"H"+i+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M"+n+",-"+i+"V"+i+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+n+",-"+i+"V"+i+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M-"+n+",-"+i+"H"+i+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M"+i+",-"+n+"V"+i+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M"+n+","+i+"H-"+i+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M-"+i+","+n+"V-"+i+"H"+n+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.951,2),n=$r(e*.588,2),a=$r(-e,2),o=$r(e*-.309,2),s=$r(e*.809,2);return Un(t,r,"M"+i+","+o+"L"+n+","+s+"H-"+n+"L-"+i+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/2,2),a=$r(e*My/2,2);return Un(t,r,"M"+a+",-"+n+"V"+n+"L0,"+i+"L-"+a+","+n+"V-"+n+"L0,-"+i+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/2,2),a=$r(e*My/2,2);return Un(t,r,"M-"+n+","+a+"H"+n+"L"+i+",0L"+n+",-"+a+"H-"+n+"L-"+i+",0Z")}},octagon:{n:16,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.924,2),n=$r(e*.383,2);return Un(t,r,"M-"+n+",-"+i+"H"+n+"L"+i+",-"+n+"V"+n+"L"+n+","+i+"H-"+n+"L-"+i+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,t,r){if(Nn(t))return On;var i=e*1.4,n=$r(i*.225,2),a=$r(i*.951,2),o=$r(i*.363,2),s=$r(i*.588,2),l=$r(-i,2),u=$r(i*-.309,2),c=$r(i*.118,2),f=$r(i*.809,2),h=$r(i*.382,2);return Un(t,r,"M"+n+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+n+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.66,2),n=$r(e*.38,2),a=$r(e*.76,2);return Un(t,r,"M-"+a+",0l-"+n+",-"+i+"h"+a+"l"+n+",-"+i+"l"+n+","+i+"h"+a+"l-"+n+","+i+"l"+n+","+i+"h-"+a+"l-"+n+","+i+"l-"+n+",-"+i+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*My*.8,2),n=$r(e*.8,2),a=$r(e*1.6,2),o=$r(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Un(t,r,"M-"+i+","+n+s+i+","+n+s+"0,-"+a+s+"-"+i+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*My*.8,2),n=$r(e*.8,2),a=$r(e*1.6,2),o=$r(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Un(t,r,"M"+i+",-"+n+s+"-"+i+",-"+n+s+"0,"+a+s+i+",-"+n+"Z")}},"star-square":{n:21,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.1,2),n=$r(e*2,2),a="A "+n+","+n+" 0 0 1 ";return Un(t,r,"M-"+i+",-"+i+a+"-"+i+","+i+a+i+","+i+a+i+",-"+i+a+"-"+i+",-"+i+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2),n=$r(e*1.9,2),a="A "+n+","+n+" 0 0 1 ";return Un(t,r,"M-"+i+",0"+a+"0,"+i+a+i+",0"+a+"0,-"+i+a+"-"+i+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.7,2),n=$r(e*1.4,2);return Un(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2),n=$r(e*.7,2);return Un(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"H-"+i+"L"+i+",-"+i+"H-"+i+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"V-"+i+"L-"+i+","+i+"V-"+i+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/Wpe,2);return Un(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM0,-"+i+"V"+i+"M-"+i+",0H"+i)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2),n=$r(e*.65,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*.85,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(Nn(t))return On;var i=$r(e/2,2),n=$r(e,2);return Un(t,r,"M"+i+","+n+"V-"+n+"M"+(i-n)+",-"+n+"V"+n+"M"+n+","+i+"H-"+n+"M-"+n+","+(i-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+i+","+a+"L0,0M"+i+","+a+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+i+",-"+a+"L0,0M"+i+",-"+a+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M"+a+","+i+"L0,0M"+a+",-"+i+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+a+","+i+"L0,0M-"+a+",-"+i+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M0,"+i+"V-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M0,0L-"+i+",-"+n+"H"+i+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,0L"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,0L-"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+",-"+n+"H"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,-"+n+"V"+n+"M0,0L"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,-"+n+"V"+n+"M0,0L-"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(Nn(t))return On;var i=nG/2.5,n=2*e*aG(i),a=2*e*oG(i);return Un(t,r,"M0,0L"+-n+","+a+"L"+n+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Nn(t))return On;var i=nG/4,n=2*e*aG(i),a=2*e*oG(i);return Un(t,r,"M0,0L"+-n+","+a+"A "+2*e+","+2*e+" 0 0 1 "+n+","+a+"Z")},backoff:.4,noDot:!0}};function Nn(e){return e===null}var Ype,Xpe,Zpe,Kpe;function Un(e,t,r){if((!e||e%360===0)&&!t)return r;if(Zpe===e&&Kpe===t&&Ype===r)return Xpe;Zpe=e,Kpe=t,Ype=r;function i(m,g){var w=aG(m),b=oG(m),_=g[0],M=g[1]+(t||0);return[_*w-M*b,_*b+M*w]}for(var n=e/180*nG,a=0,o=0,s=T4t(r),l="",u=0;u{"use strict";var Lu=vi(),_o=it(),A4t=_o.numberFormat,Sy=sn(),TD=yi(),uu=ni(),M4t=Jo(),pA=_o.strTranslate,AD=uo(),S4t=sd(),E4t=Hl(),k4t=E4t.LINE_SPACING,uve=kg().DESELECTDIM,C4t=$o(),D4t=fA(),F4t=Kf().appendArrayPointValue,ci=xve.exports={};ci.font=function(e,t){var r=t.variant,i=t.style,n=t.weight,a=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"),a&&e.call(uu.fill,a),n&&e.style("font-weight",n),i&&e.style("font-style",i),r&&e.style("font-variant",r),c&&e.style("text-transform",sG(P4t(c))),l&&e.style("text-shadow",l==="auto"?AD.makeTextShadow(uu.contrast(a)):sG(l)),u&&e.style("text-decoration-line",sG(I4t(u)))};function sG(e){return e==="none"?void 0:e}var L4t={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P4t(e){return L4t[e]}function I4t(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ci.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ci.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ci.setRect=function(e,t,r,i,n){e.call(ci.setPosition,t,r).call(ci.setSize,i,n)};ci.translatePoint=function(e,t,r,i){var n=r.c2p(e.x),a=i.c2p(e.y);if(Sy(n)&&Sy(a)&&t.node())t.node().nodeName==="text"?t.attr("x",n).attr("y",a):t.attr("transform",pA(n,a));else return!1;return!0};ci.translatePoints=function(e,t,r){e.each(function(i){var n=Lu.select(this);ci.translatePoint(i,n,t,r)})};ci.hideOutsideRangePoint=function(e,t,r,i,n,a){t.attr("display",r.isPtWithinRange(e,n)&&i.isPtWithinRange(e,a)?null:"none")};ci.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(n){var a=n[0].trace,o=a.xcalendar,s=a.ycalendar,l=TD.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){ci.hideOutsideRangePoint(u,Lu.select(this),r,i,o,s)})})}};ci.crispRound=function(e,t,r){return!t||!Sy(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ci.singleLineStyle=function(e,t,r,i,n){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=n||a.dash||"";uu.stroke(t,i||a.color),ci.dashLine(t,s,o)};ci.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each(function(n){var a=(((n||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";Lu.select(this).call(uu.stroke,r||a.color).call(ci.dashLine,s,o)})};ci.dashLine=function(e,t,r){r=+r||0,t=ci.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ci.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 cve(e,t,r,i){var n=t.fillpattern,a=t.fillgradient,o=ci.getPatternAttr,s=n&&(o(n.shape,0,"")||o(n.path,0,""));if(s){var l=o(n.bgcolor,0,null),u=o(n.fgcolor,0,null),c=n.fgopacity,f=o(n.size,0,8),h=o(n.solidity,0,.3),d=t.uid;ci.pattern(e,"point",r,d,s,f,h,void 0,n.fillmode,l,u,c)}else if(a&&a.type!=="none"){var p=a.type,v="scatterfill-"+t.uid;if(i&&(v="legendfill-"+t.uid),!i&&(a.start!==void 0||a.stop!==void 0)){var m,g;p==="horizontal"?(m={x:a.start,y:0},g={x:a.stop,y:0}):p==="vertical"&&(m={x:0,y:a.start},g={x:0,y:a.stop}),m.x=t._xA.c2p(m.x===void 0?t._extremes.x.min[0].val:m.x,!0),m.y=t._yA.c2p(m.y===void 0?t._extremes.y.min[0].val:m.y,!0),g.x=t._xA.c2p(g.x===void 0?t._extremes.x.max[0].val:g.x,!0),g.y=t._yA.c2p(g.y===void 0?t._extremes.y.max[0].val:g.y,!0),e.call(dve,r,v,"linear",a.colorscale,"fill",m,g,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(ci.gradient,r,v,p,a.colorscale,"fill")}else t.fillcolor&&e.call(uu.fill,t.fillcolor)}ci.singleFillStyle=function(e,t){var r=Lu.select(e.node()),i=r.data(),n=((i[0]||[])[0]||{}).trace||{};cve(e,n,t,!1)};ci.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(i){var n=Lu.select(this);i[0].trace&&cve(n,i[0].trace,t,r)})};var eve=Qpe();ci.symbolNames=[];ci.symbolFuncs=[];ci.symbolBackOffs=[];ci.symbolNeedLines={};ci.symbolNoDot={};ci.symbolNoFill={};ci.symbolList=[];Object.keys(eve).forEach(function(e){var t=eve[e],r=t.n;ci.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ci.symbolNames[r]=e,ci.symbolFuncs[r]=t.f,ci.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ci.symbolNeedLines[r]=!0),t.noDot?ci.symbolNoDot[r]=!0:ci.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ci.symbolNoFill[r]=!0)});var R4t=ci.symbolNames.length,z4t="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ci.symbolNumber=function(e){if(Sy(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=ci.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=R4t||e>=400?0:Math.floor(Math.max(e,0))};function fve(e,t,r,i){var n=e%100;return ci.symbolFuncs[n](t,r,i)+(e>=200?z4t:"")}var tve=A4t("~f"),hve={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}};ci.gradient=function(e,t,r,i,n,a){var o=hve[i];return dve(e,t,r,o.type,n,a,o.start,o.stop,!1,o.reversed)};function dve(e,t,r,i,n,a,o,s,l,u){var c=n.length,f;i==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:i==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),i.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var u=ci.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=pG(e,r),f=dG(e,r);t.attr("d",fve(u,l,c,f))}var h=!1,d,p,v;if(e.so)v=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var m=(s||{}).width;v=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=i.lineScale(e.mlc):_o.isArrayOrTypedArray(s.color)?p=uu.defaultLine:p=s.color,_o.isArrayOrTypedArray(o.color)&&(d=uu.defaultLine,h=!0),"mc"in e?d=e.mcc=i.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(d=i.selectedColorFn(e))}let g=e.mld||(s||{}).dash;if(g&&ci.dashLine(t,g,v),e.om)t.call(uu.stroke,d).style({"stroke-width":(v||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:v)+"px");var w=o.gradient,b=e.mgt;b?h=!0:b=w&&w.type,_o.isArrayOrTypedArray(b)&&(b=b[0],hve[b]||(b=0));var _=o.pattern,M=ci.getPatternAttr,x=_&&(M(_.shape,e.i,"")||M(_.path,e.i,""));if(b&&b!=="none"){var T=e.mgc;T?h=!0:T=w.color;var A=r.uid;h&&(A+="-"+e.i),ci.gradient(t,n,A,b,[[0,T],[1,d]],"fill")}else if(x){var y=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,y=!0);var S=M(E,e.i,a&&a.color||null),C=M(_.bgcolor,e.i,null),k=_.fgopacity,D=M(_.size,e.i,8),F=M(_.solidity,e.i,.3);y=y||e.mcc||_o.isArrayOrTypedArray(_.shape)||_o.isArrayOrTypedArray(_.path)||_o.isArrayOrTypedArray(_.bgcolor)||_o.isArrayOrTypedArray(_.fgcolor)||_o.isArrayOrTypedArray(_.size)||_o.isArrayOrTypedArray(_.solidity);var P=r.uid;y&&(P+="-"+e.i),ci.pattern(t,"point",n,P,x,D,F,e.mcc,_.fillmode,C,S,k)}else _o.isArrayOrTypedArray(d)?uu.fill(t,d[e.i]):uu.fill(t,d);v&&uu.stroke(t,p)}};ci.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ci.tryColorscale(r,""),t.lineScale=ci.tryColorscale(r,"line"),TD.traceIs(e,"symbols")&&(t.ms2mrc=C4t.isBubble(e)?D4t(e):function(){return(r.size||6)/2}),e.selectedpoints&&_o.extendFlat(t,ci.makeSelectedPointStyleFns(e)),t};ci.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,u=o.opacity,c=l!==void 0,f=u!==void 0;(_o.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(_){var M=_.mo===void 0?n.opacity:_.mo;return _.selected?c?l:M:f?u:uve*M});var h=n.color,d=a.color,p=o.color;(d||p)&&(t.selectedColorFn=function(_){var M=_.mcc||h;return _.selected?d||M:p||M});var v=n.size,m=a.size,g=o.size,w=m!==void 0,b=g!==void 0;return TD.traceIs(e,"symbols")&&(w||b)&&(t.selectedSizeFn=function(_){var M=_.mrc||v/2;return _.selected?w?m/2:M:b?g/2:M}),t};ci.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,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:uu.addOpacity(f,uve))},t};ci.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ci.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&n.push(function(a,o){uu.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&n.push(function(a,o){var s=o.mx||i.symbol||0,l=r.selectedSizeFn(o);a.attr("d",fve(ci.symbolNumber(s),l,pG(o,t),dG(o,t))),o.mrc2=l}),n.length&&e.each(function(a){for(var o=Lu.select(this),s=0;s0?r:0}ci.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var n=ci.makeSelectedTextStyleFns(t);i=n.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Lu.select(this),u=a?_o.extractOption(s,t,"txt","texttemplate"):_o.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};F4t(h,t,s.i),u=_o.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,p=vve(s,t),v=i?i(s):s.tc||t.textfont.color;l.call(ci.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:v}).text(u).call(AD.convertToTspans,r).call(pve,d,p,s.mrc)})}};ci.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ci.makeSelectedTextStyleFns(t);e.each(function(i){var n=Lu.select(this),a=r.selectedTextColorFn(i),o=i.tp||t.textposition,s=vve(i,t);uu.fill(n,a);var l=TD.traceIs(t,"bar-like");pve(n,o,s,i.mrc2||i.mrc,l)})}};var rve=.5;ci.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],i=[],n;for(n=1;n=l||_>=c&&_<=l)&&(M<=f&&M>=u||M>=f&&M<=u)&&(e=[_,M])}return e}ci.applyBackoff=yve;ci.makeTester=function(){var e=_o.ensureSingleById(Lu.select("body"),"svg","js-plotly-tester",function(r){r.attr(S4t.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=_o.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ci.tester=e,ci.testref=t};ci.savedBBoxes={};var uG=0,O4t=1e4;ci.bBox=function(e,t,r){r||(r=ive(e));var i;if(r){if(i=ci.savedBBoxes[r],i)return _o.extendFlat({},i)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(r=ive(n),r){var a=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,s=n.getAttribute("transform");if(!s){var l=ci.bBox(n,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,i=ci.savedBBoxes[r],i)return _o.extendFlat({},i)}}var u,c;t?u=e:(c=ci.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Lu.select(u).attr("transform",null).call(AD.positionText,0,0);var f=u.getBoundingClientRect(),h=ci.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return uG>=O4t&&(ci.savedBBoxes={},uG=0),r&&(ci.savedBBoxes[r]=d),uG++,_o.extendFlat({},d)};function ive(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ci.setClipUrl=function(e,t,r){e.attr("clip-path",hG(t,r))};function hG(e,t){if(!e)return null;var r=t._context,i=r._exportedPlot?"":r._baseUrl||"";return i?"url('"+i+"#"+e+"')":"url(#"+e+")"}ci.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};ci.setTranslate=function(e,t,r){var i=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||0,r=r||0,o=o.replace(i,"").trim(),o+=pA(t,r),o=o.trim(),e[a]("transform",o),o};ci.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};ci.setScale=function(e,t,r){var i=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||1,r=r||1,o=o.replace(i,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var N4t=/\s*sc.*/;ci.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var i=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(N4t,"");n+=i,n=n.trim(),this.setAttribute("transform",n)})}};var U4t=/translate\([^)]*\)\s*$/;ci.setTextPointsScale=function(e,t,r){e&&e.each(function(){var i,n=Lu.select(this),a=n.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(n.attr("transform")||"").match(U4t);t===1&&r===1?i=[]:i=[pA(o,s),"scale("+t+","+r+")",pA(-o,-s)],l&&i.push(l),n.attr("transform",i.join(""))}})};function dG(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}ci.getMarkerStandoff=dG;var dA=Math.atan2,Zx=Math.cos,yw=Math.sin;function nve(e,t){var r=t[0],i=t[1];return[r*Zx(e)-i*yw(e),r*yw(e)+i*Zx(e)]}var ave,ove,sve,lve,cG,fG;function pG(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!Sy(r)||_o.isArrayOrTypedArray(r))&&(r=0));var i,n,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);i=o[0],n=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)i=s.c2p(e.x),n=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]),h=t._geo.project([u+1e-5,c]),d=dA(h[1]-n,h[0]-i),p=dA(f[1]-n,f[0]-i),v;if(a==="north")v=r/180*Math.PI;else if(a==="previous"){var m=u/180*Math.PI,g=c/180*Math.PI,w=ave/180*Math.PI,b=ove/180*Math.PI,_=w-m,M=Zx(b)*yw(_),x=yw(b)*Zx(g)-Zx(b)*yw(g)*Zx(_);v=-dA(M,x)-Math.PI,ave=u,ove=c}var T=nve(d,[Zx(v),0]),A=nve(p,[yw(v),0]);r=dA(T[1]+A[1],T[0]+A[0])/Math.PI*180,a==="previous"&&!(fG===t.uid&&e.i===cG+1)&&(r=null)}if(a==="previous"&&!t._geo)if(fG===t.uid&&e.i===cG+1&&Sy(i)&&Sy(n)){var y=i-sve,E=n-lve,S=t.line&&t.line.shape||"",C=S.slice(S.length-1);C==="h"&&(E=0),C==="v"&&(y=0),r+=dA(E,y)/Math.PI*180+90}else r=null}return sve=i,lve=n,cG=e.i,fG=t.uid,r}ci.getMarkerAngle=pG});var e_=W((s9r,Tve)=>{"use strict";var xw=vi(),V4t=sn(),G4t=Ko(),vG=yi(),Qx=it(),_ve=Qx.strTranslate,MD=Ji(),SD=ni(),_w=uo(),bve=kg(),H4t=Hl().OPPOSITE_SIDE,wve=/ [XY][0-9]* /,gG=1.6,mG=1.6;function j4t(e,t,r){var i=e._fullLayout,n=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),v=!1,m=d&&d.font?d.font:{},g=m.family,w=m.size,b=m.color,_=m.weight,M=m.style,x=m.variant,T=m.textcase,A=m.lineposition,y=m.shadow,E=r.subtitlePropName,S=!!E,C=r.subtitlePlaceholder,k=(n.title||{}).subtitle||{text:"",font:{}},D=(k.text||"").trim(),F=!1,P=1,R=k.font,L=R.family,I=R.size,B=R.color,O=R.weight,$=R.style,Y=R.variant,K=R.textcase,j=R.lineposition,q=R.shadow,J;a==="title.text"?J="titleText":a.indexOf("axis")!==-1?J="axisTitleText":a.indexOf("colorbar")!==-1&&(J="colorbarTitleText");var U=e._context.edits[J];function V(ye,ue){return ye===void 0||ue===void 0?!1:ye.replace(wve," % ")===ue.replace(wve," % ")}p===""?h=0:V(p,o)&&(U||(p=""),h=.2,v=!0),S&&(D===""?P=0:V(D,C)&&(U||(D=""),P=.2,F=!0)),r._meta?p=Qx.templateString(p,r._meta):i._meta&&(p=Qx.templateString(p,i._meta));var X=p||D||U,H;f||(f=Qx.ensureSingle(i._infolayer,"g","g-"+t),H=i._hColorbarMoveTitle);var G=f.selectAll("text."+t).data(X?[0]:[]);G.enter().append("text"),G.text(p).attr("class",t),G.exit().remove();var Q=null,te=t+"-subtitle",ce=D||U;if(S&&(Q=f.selectAll("text."+te).data(ce?[0]:[]),Q.enter().append("text"),Q.text(D).attr("class",te),Q.exit().remove()),!X)return f;function ge(ye,ue){Qx.syncOrAsync([Ce,be],{title:ye,subtitle:ue})}function Ce(ye){var ue=ye.title,ee=ye.subtitle,ae;!c&&H&&(c={}),c?(ae="",c.rotate&&(ae+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||H)&&(ae+=_ve(0,(c.offset||0)-(H||0)))):ae=null,ue.attr("transform",ae);function xe(ke){if(ke){var _e=xw.select(ke.node().parentNode).select("."+te);if(!_e.empty()){var Ie=ke.node().getBBox();if(Ie.height){var Oe=Ie.y+Ie.height+gG*I;_e.attr("y",Oe)}}}}if(ue.style("opacity",h*SD.opacity(b)).call(MD.font,{color:SD.rgb(b),size:xw.round(w,2),family:g,weight:_,style:M,variant:x,textcase:T,shadow:y,lineposition:A}).attr(u).call(_w.convertToTspans,e,xe),ee&&!ee.empty()){var re=f.select("."+t+"-math-group"),pe=ue.node().getBBox(),we=re.node()?re.node().getBBox():void 0,Fe=we?we.y+we.height+gG*I:pe.y+pe.height+mG*I,Se=Qx.extendFlat({},u,{y:Fe});ee.attr("transform",ae),ee.style("opacity",P*SD.opacity(B)).call(MD.font,{color:SD.rgb(B),size:xw.round(I,2),family:L,weight:O,style:$,variant:Y,textcase:K,shadow:q,lineposition:j}).attr(Se).call(_w.convertToTspans,e)}return G4t.previousPromises(e)}function be(ye){var ue=ye.title,ee=xw.select(ue.node().parentNode);if(l&&l.selection&&l.side&&p){ee.attr("transform",null);var ae=H4t[l.side],xe=l.side==="left"||l.side==="top"?-1:1,re=V4t(l.pad)?l.pad:2,pe=MD.bBox(ee.node()),we={t:0,b:0,l:0,r:0},Fe=e._fullLayout._reservedMargin;for(var Se in Fe)for(var ke in Fe[Se]){var _e=Fe[Se][ke];we[ke]=Math.max(we[ke],_e)}var Ie={left:we.l,top:we.t,right:i.width-we.r,bottom:i.height-we.b},Oe=l.maxShift||xe*(Ie[l.side]-pe[l.side]),Qe=0;if(Oe<0)Qe=Oe;else{var et=l.offsetLeft||0,_t=l.offsetTop||0;pe.left-=et,pe.right-=et,pe.top-=_t,pe.bottom-=_t,l.selection.each(function(){var vt=MD.bBox(this);Qx.bBoxIntersect(pe,vt,re)&&(Qe=Math.max(Qe,xe*(vt[l.side]-pe[ae])+re))}),Qe=Math.min(Oe,Qe),n._titleScoot=Math.abs(Qe)}if(Qe>0||Oe<0){var ut={left:[-Qe,0],right:[Qe,0],top:[0,-Qe],bottom:[0,Qe]}[l.side];ee.attr("transform",_ve(ut[0],ut[1]))}}}G.call(ge,Q);function he(ye,ue){ye.text(ue).on("mouseover.opacity",function(){xw.select(this).transition().duration(bve.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){xw.select(this).transition().duration(bve.HIDE_PLACEHOLDER).style("opacity",0)})}if(U&&(p?G.on(".opacity",null):(he(G,o),v=!0),G.call(_w.makeEditable,{gd:e}).on("edit",function(ye){s!==void 0?vG.call("_guiRestyle",e,a,ye,s):vG.call("_guiRelayout",e,a,ye)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(ye){this.text(ye||" ").call(_w.positionText,u.x,u.y)}),S)){if(S&&!p){var oe=G.node().getBBox(),Ee=oe.y+oe.height+mG*I;Q.attr("y",Ee)}D?Q.on(".opacity",null):(he(Q,C),F=!0),Q.call(_w.makeEditable,{gd:e}).on("edit",function(ye){vG.call("_guiRelayout",e,"title.subtitle.text",ye)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(ye){this.text(ye||" ").call(_w.positionText,Q.attr("x"),Q.attr("y"))})}return G.classed("js-placeholder",v),Q&&!Q.empty()&&Q.classed("js-placeholder",F),f}Tve.exports={draw:j4t,SUBTITLE_PADDING_EM:mG,SUBTITLE_PADDING_MATHJAX_EM:gG}});var i1=W((l9r,kve)=>{"use strict";var $4t=vi(),W4t=z3().utcFormat,Wo=it(),Y4t=Wo.numberFormat,t1=sn(),Ey=Wo.cleanNumber,X4t=Wo.ms2DateTime,Ave=Wo.dateTime2ms,r1=Wo.ensureNumber,Mve=Wo.isArrayOrTypedArray,ky=Kn(),ED=ky.FP_SAFE,qp=ky.BADNUM,Z4t=ky.LOG_CLIP,K4t=ky.ONEWEEK,kD=ky.ONEDAY,CD=ky.ONEHOUR,Sve=ky.ONEMIN,Eve=ky.ONESEC,DD=Cs(),PD=Gl(),FD=PD.HOUR_PATTERN,LD=PD.WEEKDAY_PATTERN;function vA(e){return Math.pow(10,e)}function yG(e){return e!=null}kve.exports=function(t,r){r=r||{};var i=t._id||"x",n=i.charAt(0);function a(_,M){if(_>0)return Math.log(_)/Math.LN10;if(_<=0&&M&&t.range&&t.range.length===2){var x=t.range[0],T=t.range[1];return .5*(x+T-2*Z4t*Math.abs(x-T))}else return qp}function o(_,M,x,T){if((T||{}).msUTC&&t1(_))return+_;var A=Ave(_,x||t.calendar);if(A===qp)if(t1(_)){_=+_;var y=Math.floor(Wo.mod(_+.05,1)*10),E=Math.round(_-y/10);A=Ave(new Date(E))+y/10}else return qp;return A}function s(_,M,x){return X4t(_,M,x||t.calendar)}function l(_){return t._categories[Math.round(_)]}function u(_){if(yG(_)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[_]!==void 0)return t._categoriesMap[_];t._categories.push(typeof _=="number"?String(_):_);var M=t._categories.length-1;return t._categoriesMap[_]=M,M}return qp}function c(_,M){for(var x=new Array(M),T=0;Tt.range[1]&&(x=!x);for(var T=x?-1:1,A=T*_,y=0,E=0;EC)y=E+1;else{y=A<(S+C)/2?E:E+1;break}}var k=t._B[y]||0;return isFinite(k)?p(_,t._m2,k):0},g=function(_){var M=t._rangebreaks.length;if(!M)return v(_,t._m,t._b);for(var x=0,T=0;Tt._rangebreaks[T].pmax&&(x=T+1);return v(_,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:r1,t.l2c=t.type==="log"?vA:r1,t.l2p=m,t.p2l=g,t.c2p=t.type==="log"?function(_,M){return m(a(_,M))}:m,t.p2c=t.type==="log"?function(_){return vA(g(_))}:g,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=Ey,t.c2d=t.c2r=t.l2d=t.l2r=r1,t.d2p=t.r2p=function(_){return t.l2p(Ey(_))},t.p2d=t.p2r=g,t.cleanPos=r1):t.type==="log"?(t.d2r=t.d2l=function(_,M){return a(Ey(_),M)},t.r2d=t.r2c=function(_){return vA(Ey(_))},t.d2c=t.r2l=Ey,t.c2d=t.l2r=r1,t.c2r=a,t.l2d=vA,t.d2p=function(_,M){return t.l2p(t.d2r(_,M))},t.p2d=function(_){return vA(g(_))},t.r2p=function(_){return t.l2p(Ey(_))},t.p2r=g,t.cleanPos=r1):t.type==="date"?(t.d2r=t.r2d=Wo.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(_,M,x){return t.l2p(o(_,0,x))},t.p2d=t.p2r=function(_,M,x){return s(g(_),M,x)},t.cleanPos=function(_){return Wo.cleanDate(_,qp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(_){var M=d(_);return M!==void 0?M:t.fraction2r(.5)},t.l2r=t.c2r=r1,t.r2l=d,t.d2p=function(_){return t.l2p(t.r2c(_))},t.p2d=function(_){return l(g(_))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(_){return typeof _=="string"&&_!==""?_:r1(_)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(_){var M=h(_);return M!==void 0?M:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=r1,t.r2l=h,t.d2p=function(_){return t.l2p(t.r2c(_))},t.p2d=function(_){return l(g(_))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(_){return Array.isArray(_)||typeof _=="string"&&_!==""?_:r1(_)},t.setupMultiCategory=function(_){var M=t._traceIndices,x,T,A=t._matchGroup;if(A&&t._categories.length===0){for(var y in A)if(y!==i){var E=r[DD.id2name(y)];M=M.concat(E._traceIndices)}}var S=[[0,{}],[0,{}]],C=[];for(x=0;xE[1]&&(T[y?0:1]=x,A[1]=E[1]),A[0]>=A[1])if(M!==void 0){var S=E[0]+1;x!==void 0&&(S=Math.min(S,E[1])),T[y?0:1]=t.l2r(S)}else x!==void 0&&(T[y?1:0]=t.l2r(E[1]-1))}},t.cleanRange=function(_,M){t._cleanRange(_,M),t.limitRange(_)},t._cleanRange=function(_,M){M||(M={}),_||(_="range");var x=Wo.nestedProperty(t,_).get(),T,A;if(t.type==="date"?A=Wo.dfltRange(t.calendar):n==="y"?A=PD.DFLTRANGEY:t._name==="realaxis"?A=[0,1]:A=M.dfltRange||PD.DFLTRANGEX,A=A.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(A[0]=0),!x||x.length!==2){Wo.nestedProperty(t,_).set(A);return}var y=x[0]===null,E=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=Wo.cleanDate(x[0],qp,t.calendar),x[1]=Wo.cleanDate(x[1],qp,t.calendar)),T=0;T<2;T++)if(t.type==="date"){if(!Wo.isDateTime(x[T],t.calendar)){t[_]=A;break}if(t.r2l(x[0])===t.r2l(x[1])){var S=Wo.constrain(t.r2l(x[0]),Wo.MIN_MS+1e3,Wo.MAX_MS-1e3);x[0]=t.l2r(S-1e3),x[1]=t.l2r(S+1e3);break}}else{if(!t1(x[T]))if(!(y||E)&&t1(x[1-T]))x[T]=x[1-T]*(T?10:.1);else{t[_]=A;break}if(x[T]<-ED?x[T]=-ED:x[T]>ED&&(x[T]=ED),x[0]===x[1]){var C=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=C,x[1]+=C}}},t.setScale=function(_){var M=r._size;if(t.overlaying){var x=DD.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var T=_&&t._r?"_r":"range",A=t.calendar;t.cleanRange(T);var y=t.r2l(t[T][0],A),E=t.r2l(t[T][1],A),S=n==="y";if(S?(t._offset=M.t+(1-t.domain[1])*M.h,t._length=M.h*(t.domain[1]-t.domain[0]),t._m=t._length/(y-E),t._b=-t._m*E):(t._offset=M.l+t.domain[0]*M.w,t._length=M.w*(t.domain[1]-t.domain[0]),t._m=t._length/(E-y),t._b=-t._m*y),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var C,k;if(t._rangebreaks=t.locateBreaks(Math.min(y,E),Math.max(y,E)),t._rangebreaks.length){for(C=0;CE&&(D=!D),D&&t._rangebreaks.reverse();var F=D?-1:1;for(t._m2=F*t._length/(Math.abs(E-y)-t._lBreaks),t._B.push(-t._m2*(S?E:y)),C=0;CA&&(A+=7,yA&&(A+=24,y=T&&y=T&&_=q.min&&($q.max&&(q.max=Y),K=!1)}K&&E.push({min:$,max:Y})}};for(x=0;x{"use strict";var Cve=sn(),xG=it(),J4t=Kn().BADNUM,ID=xG.isArrayOrTypedArray,Q4t=xG.isDateTime,eTt=xG.cleanNumber,Dve=Math.round;Lve.exports=function(t,r,i){var n=t,a=i.noMultiCategory;if(ID(n)&&!n.length)return"-";if(!a&&aTt(n))return"multicategory";if(a&&Array.isArray(n[0])){for(var o=[],s=0;sa*2}function Fve(e){return Math.max(1,(e-1)/1e3)}function nTt(e,t){for(var r=e.length,i=Fve(r),n=0,a=0,o={},s=0;sn*2}function aTt(e){return ID(e[0])&&ID(e[1])}});var Op=W((c9r,Nve)=>{"use strict";var oTt=vi(),zve=sn(),Cy=it(),RD=Kn().FP_SAFE,sTt=yi(),lTt=Ji(),Bve=Cs(),uTt=Bve.getFromId,cTt=Bve.isLinked;Nve.exports={applyAutorangeOptions:Ove,getAutoRange:_G,makePadFn:bG,doAutoRange:hTt,findExtremes:dTt,concatExtremes:AG};function _G(e,t){var r,i,n=[],a=e._fullLayout,o=bG(a,t,0),s=bG(a,t,1),l=AG(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Cy.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(E=b-o(x)-s(T),E>_?S/E>M&&(A=x,y=T,M=S/E):S/b>M&&(A={val:x.val,nopad:1},y={val:T.val,nopad:1},M=S/b));function C(R,L){return Math.max(R,s(L))}if(f===h){var k=f-1,D=f+1;if(g)if(f===0)n=[0,1];else{var F=(f>0?c:u).reduce(C,0),P=f/(1-Math.min(.5,F/b));n=f>0?[0,P]:[P,0]}else w?n=[Math.max(0,k),Math.max(1,D)]:n=[k,D]}else g?(A.val>=0&&(A={val:0,nopad:1}),y.val<=0&&(y={val:0,nopad:1})):w&&(A.val-M*o(A)<0&&(A={val:0,nopad:1}),y.val<=0&&(y={val:1,nopad:1})),M=(y.val-A.val-Pve(t,x.val,T.val))/(b-o(A)-s(y)),n=[A.val-M*o(A),y.val+M*s(y)];return n=Ove(n,t),t.limitRange&&t.limitRange(),p&&n.reverse(),Cy.simpleMap(n,t.l2r||Number)}function Pve(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),x=_((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=_(r.vpadplus||r.vpad),A=_(r.vpadminus||r.vpad);if(!u){if(w=1/0,b=-1/0,l)for(f=0;f0&&(w=h),h>b&&h-RD&&(w=h),h>b&&h=S;f--)E(f);return{min:i,max:n,opts:r}}function wG(e,t,r,i){qve(e,t,r,i,pTt)}function TG(e,t,r,i){qve(e,t,r,i,vTt)}function qve(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else n(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function Rve(e){return zve(e)&&Math.abs(e)=t}function gTt(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&zD(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&zD(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function mTt(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&zD(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&zD(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function zD(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(a=l,r=l),o<=l&&(o=l,i=l)}}return r=gTt(r,t),i=mTt(i,t),[r,i]}});var ji=W((h9r,u1e)=>{"use strict";var ud=vi(),kl=sn(),ww=Ko(),mA=yi(),bn=it(),Tw=bn.strTranslate,t_=uo(),yTt=e_(),yA=ni(),v0=Ji(),xTt=ec(),Uve=YV(),f9r=Gl(),Tc=Kn(),_Tt=Tc.ONEMAXYEAR,OD=Tc.ONEAVGYEAR,ND=Tc.ONEMINYEAR,bTt=Tc.ONEMAXQUARTER,kG=Tc.ONEAVGQUARTER,UD=Tc.ONEMINQUARTER,wTt=Tc.ONEMAXMONTH,Aw=Tc.ONEAVGMONTH,VD=Tc.ONEMINMONTH,g0=Tc.ONEWEEK,_f=Tc.ONEDAY,Dy=_f/2,a1=Tc.ONEHOUR,xA=Tc.ONEMIN,GD=Tc.ONESEC,TTt=Tc.ONEMILLI,ATt=Tc.ONEMICROSEC,r_=Tc.MINUS_SIGN,jD=Tc.BADNUM,CG={K:"zeroline"},DG={K:"gridline",L:"path"},FG={K:"minor-gridline",L:"path"},Jve={K:"tick",L:"path"},Vve={K:"tick",L:"text"},Gve={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},$D=Hl(),gA=$D.MID_SHIFT,i_=$D.CAP_SHIFT,_A=$D.LINE_SPACING,MTt=$D.OPPOSITE_SIDE,HD=3,Rr=u1e.exports={};Rr.setConvert=i1();var STt=bw(),o1=Cs(),ETt=o1.idSort,kTt=o1.isLinked;Rr.id2name=o1.id2name;Rr.name2id=o1.name2id;Rr.cleanId=o1.cleanId;Rr.list=o1.list;Rr.listIds=o1.listIds;Rr.getFromId=o1.getFromId;Rr.getFromTrace=o1.getFromTrace;var Qve=Op();Rr.getAutoRange=Qve.getAutoRange;Rr.findExtremes=Qve.findExtremes;var CTt=1e-4;function RG(e){var t=(e[1]-e[0])*CTt;return[e[0]-t,e[1]+t]}function DTt(e,t,r){if(![r,e,t].every(kl)||r===0)return e;let i=Math.round((e-t)/r),n=t+i*r;return e!==n&&Math.abs(e-n)h+" domain")),l=l.concat(a||[]),c.length>o?(bn.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))};Rr.saveRangeInitial=function(e,t){for(var r=Rr.list(e,"",!0),i=!1,n=0;nf*.3||u(i)||u(n))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Rr.tickIncrement(e,"M6","reverse")+_f*1.5:a.exactMonths>o?e=Rr.tickIncrement(e,"M1","reverse")+_f*15.5:e-=Dy;var l=Rr.tickIncrement(e,r);if(l<=i)return l}return e}Rr.prepMinorTicks=function(e,t,r){var f,h;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var i=t.dtick&&kl(t._tmin),n;if(i){var a=Rr.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,a*.99+t._tmin*.01]}else{var o=bn.simpleMap(t.range,t.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=bn.simpleMap(n,t.l2r),e._isMinor=!0,Rr.prepTicks(e,r),i){var s=kl(t.dtick),l=kl(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?MG(u,c)?u===2*g0&&c===2*_f&&(e.dtick=g0):u===2*g0&&c===3*_f?e.dtick=g0:u===g0&&!(t._input.minor||{}).nticks?e.dtick=_f:$ve(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":MG(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"?MG(u,c)||(e.dtick=$ve(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}((h=t.minor)==null?void 0:h._tick0Init)===void 0&&(e.tick0=t.tick0)};function MG(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function $ve(e,t){return Math.abs(e/t-1)<.001}Rr.prepTicks=function(e,t){var r=bn.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var i=e.nticks,n;i||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?bn.bigFont(e.tickfont.size||12):15,i=e._length/n):(n=e._id.charAt(0)==="y"?40:80,i=bn.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(i*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Rr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=i-1,o=i):(a=i,o=i);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=ND?u>=ND&&u<=_Tt?f=u:f=OD:r===kG&&c>=UD?u>=UD&&u<=bTt?f=u:f=kG:c>=VD?u>=VD&&u<=wTt?f=u:f=Aw:r===g0&&c>=g0?f=g0:c>=_f?f=_f:r===Dy&&c>=Dy?f=Dy:r===a1&&c>=a1&&(f=a1);var h;f>=u&&(f=u,h=!0);var d=n+f;if(t.rangebreaks&&f>0){for(var p=84,v=0,m=0;mg0&&(f=u)}(f>0||i===0)&&(e[i].periodX=n+f/2)}}Rr.calcTicks=function(t,r){for(var i=t.type,n=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||bn.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=bn.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(_?0:1);M--){var x=!M;M?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):_&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var T=M?t:bn.extendFlat({},t,_?t.minor:{minor:{}});if(x?Rr.prepMinorTicks(T,t,r):Rr.prepTicks(T,r),T.tickmode==="array"){M?(m=[],p=Wve(t,!x)):(g=[],v=Wve(t,!x));continue}if(T.tickmode==="sync"){m=[],p=zTt(t);continue}var A=RG(u),y=A[0],E=A[1],S=kl(T.dtick),C=i==="log"&&!(S||T.dtick.charAt(0)==="L"),k=Rr.tickFirst(T,r);if(M){if(t._tmin=k,k=E:F<=E;F=Rr.tickIncrement(F,L,c,n)){if(M&&P++,T.rangebreaks&&!c){if(F=h)break}if(m.length>d||F===D)break;D=F;var B={value:DTt(F,I,L)};M?(F===k&&(B.first=!0),C&&F!==(F|0)&&(B.simpleLabel=!0),a>1&&P%a&&(B.skipLabel=!0),m.push(B)):(B.minor=!0,g.push(B))}}if(!g||g.length<3)l=!1;else{var O=(g[2].value-g[1].value)*(s?-1:1);s6t(O,t.tickformat)||(l=!1,g=g.slice(1))}if(!l)w=m;else{var $=m.concat(g);o&&m.length&&($=$.slice(1)),$=$.sort(function(ue,ee){return ue.value-ee.value}).filter(function(ue,ee,ae){return ee===0||ue.value!==ae[ee-1].value});var Y=$.map(function(ue,ee){return ue.minor===void 0&&!ue.skipLabel?ee:null}).filter(function(ue){return ue!==null});Y.forEach(function(ue){l.map(function(ee){var ae=ue+ee;ae>=0&&ae<$.length&&bn.pushUnique(w,$[ae])})}),m.forEach(function(ue){ue.skipLabel=w.indexOf(ue)===-1})}if(b){var K=t.minor.ticks==="inside"&&t.ticks==="outside"||t.minor.ticks==="outside"&&t.ticks==="inside";if(!K){for(var j=m.map(function(ue){return ue.value}),q=[],J=0;J-1;G--){if(m[G].drop){m.splice(G,1);continue}m[G].value=EG(m[G].value,t);var ge=t.c2p(m[G].value);(Q?ce>ge-te:ceh||xeh&&(ae.periodX=h),xen&&pn&&mOD)t/=OD,i=n(10),e.dtick="M"+12*n1(t,i,BD);else if(a>Aw)t/=Aw,e.dtick="M"+n1(t,1,Yve);else if(a>_f){if(e.dtick=n1(t,_f,e._hasDayOfWeekBreaks?[1,2,7,14]:BTt),!r){var o=Rr.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=bn.dateTick0(e.calendar,2):e.tick0=bn.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>a1?e.dtick=n1(t,a1,Yve):a>xA?e.dtick=n1(t,xA,Xve):a>GD?e.dtick=n1(t,GD,Xve):(i=n(10),e.dtick=n1(t,i,BD))}else if(e.type==="log"){e.tick0=0;var l=bn.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,i=n(10),e.dtick="L"+n1(t,i,BD)}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))):OG(e)?(e.tick0=0,i=1,e.dtick=n1(t,i,qTt)):(e.tick0=0,i=n(10),e.dtick=n1(t,i,BD));if(e.dtick===0&&(e.dtick=1),!kl(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function i1e(e){var t=e.dtick;if(e._tickexponent=0,!kl(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),i=e.l2r(r).replace(/(^-|i)/g,""),n=i.length;if(String(t).charAt(0)==="M")n>10||i.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=_f&&n<=10||t>=_f*15)e._tickround="d";else if(t>=xA&&n<=16||t>=a1)e._tickround="M";else if(t>=GD&&n<=19||t>=xA)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(n,a)-20,e._tickround<0&&(e._tickround=4)}}else if(kl(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);kl(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&&(Mw(e.exponentformat)&&e.exponentformat!=="SI extended"&&!zG(l)||Mw(e.exponentformat)&&e.exponentformat==="SI extended"&&!BG(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rr.tickIncrement=function(e,t,r,i){var n=r?-1:1;if(kl(t))return bn.increment(e,n*t);var a=t.charAt(0),o=n*Number(t.slice(1));if(a==="M")return bn.incrementMonth(e,o,i);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?r1e:t1e,l=e+n*.01,u=bn.roundUp(bn.mod(l,1),s,r);return Math.floor(l)+Math.log(ud.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rr.tickFirst=function(e,t){var r=e.r2l||Number,i=bn.simpleMap(e.range,r,void 0,void 0,t),n=i[1]=0&&_<=e._length?b:null};if(l&&bn.isArrayOrTypedArray(e.ticktext)){var p=bn.simpleMap(e.range,e.r2l),v=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(h=0;h"+s;else{var u=wA(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function NTt(e,t,r,i,n){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(n==="never"&&(n=""),i&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=bA(Math.pow(10,o),e,n,i);else if(kl(a)||l==="D"&&(e.minorloglabels==="complete"||bn.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(bn.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),p=e.exponentformat;p==="power"||Mw(p)&&p!=="SI extended"&&zG(h)||Mw(p)&&p==="SI extended"&&BG(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":r_)+d+""),t.fontSize*=1.25):(p==="e"||p==="E")&&d>2?t.text=f[0]+p+(h>0?"+":r_)+d:(t.text=bA(Math.pow(10,o),e,"","fakehover"),a==="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,bn.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var v=String(t.text).charAt(0);(v==="0"||v==="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 UTt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function VTt(e,t,r){var i=Math.round(t.x),n=e._categories[i]||[],a=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function GTt(e,t,r,i,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(n="hide"),t.text=bA(t.x,e,n,i)}function HTt(e,t,r,i,n){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=jTt(a);if(o[1]>=100)t.text=bA(bn.deg2rad(t.x),e,n,i);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=r_+t.text)}}}else t.text=bA(t.x,e,n,i)}function jTt(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 i(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var n=i(e),a=e*n,o=Math.abs(r(a,n));return[Math.round(a/o),Math.round(n/o)]}var a1e=["f","p","n","\u03BC","m","","k","M","G","T"],$Tt=["q","r","y","z","a",...a1e,"P","E","Z","Y","R","Q"],Mw=e=>["SI","SI extended","B"].includes(e);function zG(e){return e>14||e<-15}function BG(e){return e>32||e<-30}function WTt(e,t){return Mw(t)?!!(t==="SI extended"&&BG(e)||t!=="SI extended"&&zG(e)):!1}function bA(e,t,r,i){var n=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rr.getTickFormat(t),u=t.separatethousands;if(i){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:kl(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};i1e(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,r_);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-a)/2;if(e"+h+"":o==="B"&&s===9?e+="B":Mw(o)&&(e+=o==="SI extended"?$Tt[s/3+10]:a1e[s/3+5])}return n?r_+e:e}Rr.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*Aw}function i(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)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function n(l,u,c){var f=c||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=i(l,u[0])>=0,d=i(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&n.unshift(n.splice(c,1).shift())}});var s={false:{left:0,right:0}};return bn.syncOrAsync(n.map(function(l){return function(){if(l){var u=Rr.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rr.drawOne(e,u,r);return u._shiftPusher&&IG(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=bn.simpleMap(u._r,u.r2l),c}}}))};Rr.drawOne=function(e,t,r){r=r||{};var i=r.axShifts||{},n=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rr.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||n.indexOf(t._id)!==-1||n.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),IG(t,p,i,!0),IG(t,t.shift||0,i,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=o6t(t,i));var v=h[c+"axislayer"],m=t._mainLinePosition,g=m+=t._shift,w=t._mainMirrorPosition,b=t._vals=Rr.calcTicks(t),_=[t.mirror,g,w].join("_");for(a=0;a0?ee.bottom-ye:0,ue))));var pe=0,we=0;if(t._shiftPusher&&(pe=Math.max(ue,ee.height>0?oe==="l"?ye-ee.left:ee.right-ye:0),t.title.text!==l._dfltTitle[c]&&(we=(t._titleStandoff||0)+(t._titleScoot||0),oe==="l"&&(we+=Kve(t))),t._fullDepth=Math.max(pe,we)),t.automargin){ae={x:0,y:0,r:0,l:0,t:0,b:0};var Fe=[0,1],Se=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(oe==="b"?ae[oe]=t._depth:(ae[oe]=t._depth=Math.max(ee.width>0?ye-ee.top:0,ue),Fe.reverse()),ee.width>0){var ke=ee.right-(t._offset+t._length);ke>0&&(ae.xr=1,ae.r=ke);var _e=t._offset-ee.left;_e>0&&(ae.xl=0,ae.l=_e)}}else if(oe==="l"?(t._depth=Math.max(ee.height>0?ye-ee.left:0,ue),ae[oe]=t._depth-Se):(t._depth=Math.max(ee.height>0?ee.right-ye:0,ue),ae[oe]=t._depth+Se,Fe.reverse()),ee.height>0){var Ie=ee.bottom-(t._offset+t._length);Ie>0&&(ae.yb=0,ae.b=Ie);var Oe=t._offset-ee.top;Oe>0&&(ae.yt=1,ae.t=Oe)}ae[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Fe[0]],t.title.text!==l._dfltTitle[c]&&(ae[oe]+=Kve(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(xe={x:0,y:0,r:0,l:0,t:0,b:0},xe[Ee]=t.linewidth,t.mirror&&t.mirror!==!0&&(xe[Ee]+=ue),t.mirror===!0||t.mirror==="ticks"?xe[f]=t._anchorAxis.domain[Fe[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(xe[f]=[t._counterDomainMin,t._counterDomainMax][Fe[1]]))}he&&(re=mA.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Zve(ae,t.automargin),Zve(xe,t.automargin)),ww.autoMargin(e,qG(t),ae),ww.autoMargin(e,s1e(t),xe),ww.autoMargin(e,l1e(t),re)}),bn.syncOrAsync(Ce)}};function Zve(e,t){if(e){var r=Object.keys(Gve).reduce(function(i,n){return t.indexOf(n)!==-1&&Gve[n].forEach(function(a){i[a]=1}),i},{});Object.keys(e).forEach(function(i){r[i]||(i.length===1?e[i]=0:delete e[i])})}}function YTt(e,t){var r=[],i,n=function(a,o){var s=a.xbnd[o];s!==null&&r.push(bn.extendFlat({},a,{x:s}))};if(t.length){for(i=0;ie.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(i){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;i=i*f}return e._id.charAt(0)==="x"?function(h){return Tw(n+e._offset+e.l2p(LG(h))+r,a+i)}:function(h){return Tw(a+i,n+e._offset+e.l2p(LG(h))+r)}};function LG(e){return e.periodX!==void 0?e.periodX:e.x}function JTt(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(p){return t.indexOf(p)!==-1},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),u=r!=="boundaries"&&(s||a||n||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=HD,d=e.tickfont?e.tickfont.size:12;return(s||n)&&(f+=d*i_,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=HD),l&&c==="top"&&(h-=d*(1-i_)),(a||n)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}Rr.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=i.len!==void 0?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};Rr.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",n=e.tickson||"",a=function(k){return i.indexOf(k)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=n!=="boundaries"&&(u||s||o||l),f=a("inside"),h=i==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&n!=="boundaries",d=0,p=0,v=h?e.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(d+=v,r)){var m=bn.deg2rad(r);d=v*Math.cos(m)+1,p=v*Math.sin(m)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var g={labelStandoff:d,labelShift:p},w,b,_,M,x=0,T=e.side,A=e._id.charAt(0),y=e.tickangle,E;if(A==="x")E=!f&&T==="bottom"||f&&T==="top",M=E?1:-1,f&&(M*=-1),w=p*M,b=t+d*M,_=E?1:-.2,Math.abs(y)===90&&(f?_+=gA:y===-90&&T==="bottom"?_=i_:y===90&&T==="top"?_=gA:_=.5,x=gA/2*(y/90)),g.xFn=function(k){return k.dx+w+x*k.fontSize},g.yFn=function(k){return k.dy+b+k.fontSize*_},g.anchorFn=function(k,D){if(c){if(s)return"end";if(l)return"start"}return!kl(D)||D===0||D===180?"middle":D*M<0!==f?"end":"start"},g.heightFn=function(k,D,F){return D<-60||D>60?-.5*F:e.side==="top"!==f?-F:0};else if(A==="y"){if(E=!f&&T==="left"||f&&T==="right",M=E?1:-1,f&&(M*=-1),w=d,b=p*M,_=0,!f&&Math.abs(y)===90&&(y===-90&&T==="left"||y===90&&T==="right"?_=i_:_=.5),f){var S=kl(y)?+y:0;if(S!==0){var C=bn.deg2rad(S);x=Math.abs(Math.sin(C))*i_*M,_=0}}g.xFn=function(k){return k.dx+t-(w+k.fontSize*_)*M+x*k.fontSize},g.yFn=function(k){return k.dy+b+k.fontSize*gA},g.anchorFn=function(k,D){return kl(D)&&Math.abs(D)===90?"middle":E?"end":"start"},g.heightFn=function(k,D,F){return e.side==="right"&&(D*=-1),D<-30?-F:D<30?-.5*F:0}}return g};function WD(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rr.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",n=[].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}):[]),a=r.layer.selectAll("path."+i).data(n,WD);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return yA.stroke(ud.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return v0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),YD(t,[Jve]),a.attr("transform",r.transFn)};Rr.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var i=t._id+"grid",n=t.minor&&t.minor.showgrid,a=n?r.vals.filter(function(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&Rr.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;p--){var v=p?h:d;if(v){var m=v.selectAll("path."+i).data(p?o:a,WD);m.exit().remove(),m.enter().append("path").classed(i,1).classed("crisp",r.crisp!==!1),m.attr("transform",r.transFn).attr("d",r.path).each(function(g){return yA.stroke(ud.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return v0.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&m.attr("d",r.path)}}YD(t,[DG,FG])}};Rr.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Rr.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",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return ETt(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(yA.stroke,t.zerolinecolor||yA.defaultLine).style("stroke-width",v0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),YD(t,[CG])};Rr.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,n=t._id,a=t.zerolinelayer==="above traces",o=r.cls||n+"tick",s=r.vals.filter(function(I){return I.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],WD),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(I){var B=ud.select(this),O=e._promises.length;B.call(t_.positionText,l.xFn(I),l.yFn(I)).call(v0.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(t_.convertToTspans,e),e._promises[O]?h.push(e._promises.pop().then(function(){d(B,u)})):d(B,u)}),YD(t,[Vve]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(I){ud.select(this).select("text").call(t_.positionText,l.xFn(I),l.yFn(I))});function d(I,B){I.each(function(O){var $=ud.select(this),Y=$.select(".text-math-group"),K=l.anchorFn(O,B),j=r.transFn.call($.node(),O)+(kl(B)&&+B!=0?" rotate("+B+","+l.xFn(O)+","+(l.yFn(O)-O.fontSize/2)+")":""),q=t_.lineCount($),J=_A*O.fontSize,U=l.heightFn(O,kl(B)?+B:0,(q-1)*J);if(U&&(j+=Tw(0,U)),Y.empty()){var V=$.select("text");V.attr({transform:j,"text-anchor":K}),V.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var X=v0.bBox(Y.node()).width,H=X*{end:-.5,start:.5}[K];Y.attr("transform",j+Tw(H,0))}})}t._adjustTickLabelsOverflow=function(){var I=t.ticklabeloverflow;if(!(!I||I==="allow")){var B=I.indexOf("hide")!==-1,O=t._id.charAt(0)==="x",$=0,Y=O?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var K=bn.simpleMap(t.range,t.r2l);$=t.l2p(K[0])+t._offset,Y=t.l2p(K[1])+t._offset}var j=Math.min($,Y),q=Math.max($,Y),J=t.side,U=1/0,V=-1/0;f.each(function(Q){var te=ud.select(this),ce=te.select(".text-math-group");if(ce.empty()){var ge=v0.bBox(te.node()),Ce=0;O?(ge.right>q||ge.leftq||ge.top+(t.tickangle?0:Q.fontSize/4)t["_visibleLabelMin_"+K._id]?te.style("display","none"):q.K==="tick"&&!j&&te.node().style.display!=="none"&&te.style("display",null)})})})})},d(f,c+1?c:u);function p(){return h.length&&Promise.all(h)}var v=null;function m(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){v=t.autotickangles[0];var I=0,B=[],O,$=1;f.each(function(ae){I=Math.max(I,ae.fontSize);var xe=t.l2p(ae.x),re=PG(this),pe=v0.bBox(re.node());$=Math.max($,t_.lineCount(re)),B.push({top:0,bottom:10,height:10,left:xe-pe.width/2,right:xe+pe.width/2+2,width:pe.width+2})});var Y=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,K=s.length,j=Math.abs((s[K-1].x-s[0].x)*t._m)/(K-1),q=Y?j/2:j,J=Y?t.ticklen:I*1.25*$,U=Math.sqrt(Math.pow(q,2)+Math.pow(J,2)),V=q/U,X=t.autotickangles.map(function(ae){return ae*Math.PI/180}),H=X.find(function(ae){return Math.abs(Math.cos(ae))<=V});H===void 0&&(H=X.reduce(function(ae,xe){return Math.abs(Math.cos(ae))P*F&&(C=F,y[A]=E[A]=k[A])}var R=Math.abs(C-S);R-M>0?(R-=M,M*=1+M/R):M=0,t._id.charAt(0)!=="y"&&(M=-M),y[T]=b.p2r(b.r2p(E[T])+x*M),b.autorange==="min"||b.autorange==="max reversed"?(y[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(y[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[b._name+".range"]=y}var L=bn.syncOrAsync(g);return L&&L.then&&e._promises.push(L),L};function QTt(e,t,r){var i=t._id+"divider",n=r.vals,a=r.layer.selectAll("path."+i).data(n,WD);a.exit().remove(),a.enter().insert("path",":first-child").classed(i,1).classed("crisp",1).call(yA.stroke,t.dividercolor).style("stroke-width",v0.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Rr.getPxPosition=function(e,t){var r=e._fullLayout._size,i=t._id.charAt(0),n=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:i==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:i==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),n==="top"||n==="left")return a._offset;if(n==="bottom"||n==="right")return a._offset+a._length};function Kve(e){var t=e.title.font.size,r=(e.title.text.match(t_.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(i_+r*_A):r?t*(r+1)*_A:t}function e6t(e,t){var r=e._fullLayout,i=t._id,n=i.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(t_.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*i_:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(gA+s*_A));else{var l=wA(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(n==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Rr.getPxPosition(e,t),f,h,d;n==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var v=t._selections[t._id+"tick"];if(p={selection:v,side:t.side},v&&v.node()&&v.node().parentNode){var m=v0.getTranslate(v.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,yTt.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[n],avoid:p,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}Rr.shouldShowZeroLine=function(e,t,r){var i=bn.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===jD)&&(o1e(t,0)||!t6t(e,t,r,i)||r6t(e,t))};Rr.clipEnds=function(e,t){return t.filter(function(r){return o1e(e,r.x)})};function o1e(e,t){var r=e.l2p(t);return r>1&&r1)for(n=1;n=n.min&&e=ATt:/%L/.test(t)?e>=TTt:/%[SX]/.test(t)?e>=GD:/%M/.test(t)?e>=xA:/%[HI]/.test(t)?e>=a1:/%p/.test(t)?e>=Dy:/%[Aadejuwx]/.test(t)?e>=_f:/%[UVW]/.test(t)?e>=g0:/%[Bbm]/.test(t)?e>=VD:/%[q]/.test(t)?e>=UD:/%[Yy]/.test(t)?e>=ND:!0}});var NG=W((d9r,c1e)=>{"use strict";c1e.exports=function(t,r,i){var n,a;if(i){var o=r==="reversed"||r==="min reversed"||r==="max reversed";n=i[o?1:0],a=i[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?n:void 0),l=t("autorangeoptions.maxallowed",n===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var UG=W((p9r,f1e)=>{"use strict";var l6t=NG();f1e.exports=function(t,r,i,n){var a=r._template||{},o=r.type||a.type||"-";i("minallowed"),i("maxallowed");var s=i("range");if(!s){var l;!n.noInsiderange&&o!=="log"&&(l=i("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=i("range",l)))}var u=r.getAutorangeDflt(s,n),c=i("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,n),c=i("autorange",u)),c&&(l6t(i,c,s),(o==="linear"||o==="-")&&i("rangemode")),r.cleanRange()}});var d1e=W((v9r,h1e)=>{var u6t={left:0,top:0};h1e.exports=c6t;function c6t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,n=e.clientY||0,a=f6t(t);return r[0]=i-a.left,r[1]=n-a.top,r}function f6t(e){return e===window||e===document||e===document.body?u6t:e.getBoundingClientRect()}});var XD=W((g9r,p1e)=>{"use strict";var h6t=wV();function d6t(){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}p1e.exports=h6t&&d6t()});var g1e=W((m9r,v1e)=>{"use strict";v1e.exports=function(t,r,i,n,a){var o=(t-i)/(n-i),s=o+r/(n-i),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var x1e=W((y9r,y1e)=>{"use strict";var m1e=it(),p6t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];y1e.exports=function(t,r,i,n){return i==="left"?t=0:i==="center"?t=1:i==="right"?t=2:t=m1e.constrain(Math.floor(t*3),0,2),n==="bottom"?r=0:n==="middle"?r=1:n==="top"?r=2:r=m1e.constrain(Math.floor(r*3),0,2),p6t[r][t]}});var b1e=W((x9r,_1e)=>{"use strict";var v6t=lw(),g6t=QC(),m6t=K6().getGraphDiv,y6t=P6(),VG=_1e.exports={};VG.wrapped=function(e,t,r){var a;e=m6t(e),e._fullLayout&&g6t.clear(e._fullLayout._uid+y6t.HOVERID);let i=e._hoverdata;VG.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(a=e._fullLayout)!=null&&a.hoveranywhere&&(t!=null&&t.target)&&!i&&e.emit("plotly_unhover",{event:t,points:[]}))};VG.raw=function(t,r){var i=t._fullLayout,n=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&v6t.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&n&&t.emit("plotly_unhover",{event:r,points:n}),!0)}});var bf=W((_9r,M1e)=>{"use strict";var x6t=d1e(),GG=AV(),_6t=XD(),b6t=it().removeElement,w6t=Gl(),n_=M1e.exports={};n_.align=g1e();n_.getCursor=x1e();var T1e=b1e();n_.unhover=T1e.wrapped;n_.unhoverRaw=T1e.raw;n_.init=function(t){var r=t.gd,i=1,n=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=m,_6t?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=m,a.addEventListener("touchstart",m,{passive:!1})):a.ontouchstart=m;function p(b,_,M){return Math.abs(b)n&&(i=Math.max(i-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var _;f.target===h?_=f:(_={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(M=>{var x=f[M];!_[M]&&typeof x!="function"&&(_[M]=x)})),t.clickFn&&t.clickFn(i,_),d||h.dispatchEvent(new MouseEvent("click",b))}r._dragging=!1,r._dragged=!1}};function A1e(){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}n_.coverSlip=A1e;function w1e(e){return x6t(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Np=W((b9r,S1e)=>{"use strict";S1e.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(i){i.indexOf("cursor-")===0&&t.classed(i,!1)}),r&&t.classed("cursor-"+r,!0)}});var C1e=W((w9r,k1e)=>{"use strict";var HG=Np(),TA="data-savedcursor",E1e="!!";k1e.exports=function(t,r){var i=t.attr(TA);if(r){if(!i){for(var n=(t.attr("class")||"").split(" "),a=0;a{"use strict";var jG=Ho(),T6t=Vl();D1e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:T6t.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:jG({editType:"legend"}),grouptitlefont:jG({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:jG({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var MA=W(AA=>{"use strict";AA.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};AA.isVertical=function(t){return t.orientation!=="h"};AA.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};AA.getId=function(t){return t._id||"legend"}});var YG=W((M9r,F1e)=>{"use strict";var ZD=yi(),m0=it(),A6t=Da(),M6t=Wa(),S6t=$G(),E6t=ew(),WG=MA();function k6t(e,t,r,i,n){var a=t[e]||{},o=A6t.newContainer(r,e);function s(B,O){return m0.coerce(a,o,S6t,B,O)}var l=m0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(B,O){var $=c._input,Y=c;return m0.coerce($,Y,M6t,B,O)},h=r.font||{},d=m0.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),p=0,v=!1,m="normal",g=(r.shapes||[]).filter(function(B){return B.showlegend});function w(B){return ZD.traceIs(B,"pie-like")&&B._length!=null&&(Array.isArray(B.legend)||Array.isArray(B.showlegend))}i.filter(w).forEach(function(B){B.visible&&p++;for(var O=0;OB.legend.length)for(var Y=B.legend.length;Y(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),x===!1&&!a.uirevision||(s("uirevision",r.uirevision),x===!1))return;s("borderwidth");var T=s("orientation"),A=s("yref"),y=s("xref"),E=T==="h",S=A==="paper",C=y==="paper",k,D,F,P="left";E?(k=0,ZD.getComponentMethod("rangeslider","isVisible")(t.xaxis)?S?(D=1.1,F="bottom"):(D=1,F="top"):S?(D=-.1,F="top"):(D=0,F="bottom")):(D=1,F="auto",C?k=1.02:(k=1,P="right")),m0.coerce(a,o,{x:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:k}},"x"),m0.coerce(a,o,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:D}},"y"),s("traceorder",m),WG.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick");let R=s("groupclick");s("groupdoubleclick",R),s("xanchor",P),s("yanchor",F),s("maxheight"),s("valign"),m0.noneOrAll(a,o,["x","y"]);var L=s("title.text");if(L){s("title.side",E?"left":"top");var I=m0.extendFlat({},l,{size:m0.bigFont(l.size)});m0.coerceFont(s,"title.font",I);let B=n>1;s("titleclick",B?"toggle":!1),s("titledoubleclick",B?"toggleothers":!1)}}F1e.exports=function(t,r,i){var n,a=i.slice(),o=r.shapes;if(o)for(n=0;n{"use strict";var Fy=yi(),XG=it(),C6t=XG.pushUnique,D6t=MA(),L1e=!0;ZG.handleItemClick=function(t,r,i,n,a){var o=r._fullLayout;if(r._dragged||r._editing)return;var s=t.data()[0][0];if(s.groupTitle&&s.noClick)return;let l=a===2?i.groupdoubleclick:i.groupclick;n==="toggle"&&i.itemdoubleclick==="toggleothers"&&L1e&&r.data&&r._context.showTips&&(XG.notifier(XG._(r,"Double-click on legend to isolate one trace"),"long",r),L1e=!1);var u=l==="togglegroup",c=o.hiddenlabels?o.hiddenlabels.slice():[],f=r._fullData;let h=(o.shapes||[]).filter(be=>be.showlegend||be.legendgroup);var d=f.concat(h),p=s.trace;p._isShape&&(p=o.shapes[p.index]);var v=p.legendgroup,m,g,w,b,_,M,x={},T=[],A=[],y=[];function E(be,he){var oe=T.indexOf(be),Ee=x.visible;return Ee||(Ee=x.visible=[]),T.indexOf(be)===-1&&(T.push(be),oe=T.length-1),Ee[oe]=he,oe}var S=(o.shapes||[]).map(function(be){return be._input}),C=!1;function k(be,he){S[be].visible=he,C=!0}function D(be,he){if(!(s.groupTitle&&!u)){var oe=be._isShape,Ee=be.index;Ee===void 0&&(Ee=be._index);var ye=be.visible===!1?!1:he;oe?k(Ee,ye):E(Ee,ye)}}var F=p.legend;if(!p._isShape&&Fy.traceIs(p,"pie-like")){var P=s.label,R=c.indexOf(P);if(n==="toggle")R===-1?c.push(P):c.splice(R,1);else if(n==="toggleothers"){var L=R!==-1,I=[];for(m=0;mg.showlegend||g.legendgroup),l=a.concat(s);function u(g){return(g.legend||"legend")===o}var c,f;if(i==="toggle")c=!l.some(function(w){return u(w)&&w.visible===!0}),f=!1;else{let g=l.some(function(w){return!u(w)&&w.visible===!0&&w.showlegend!==!1});c=!0,f=!g}let h={visible:[]},d=[],p=(n.shapes||[]).map(function(g){return g._input});for(var v=!1,m=0;m{"use strict";P1e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var z1e=W((k9r,R1e)=>{"use strict";var{isArrayOrTypedArray:QG}=yc(),I1e=yi(),eH=MA();R1e.exports=function(t,r,i){var n=r._inHover,a=eH.isGrouped(r),o=eH.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,p;function v(B,O,$){if(r.visible!==!1&&!(i&&B!==r._id))if(O===""||!eH.isGrouped(r)){var Y="~~i"+f;l.push(Y),s[Y]=[$],f++}else l.indexOf(O)===-1?(l.push(O),u=!0,s[O]=[$]):s[O].push($)}for(d=0;dk&&(S=k)}y[d][0]._groupMinRank=S,y[d][0]._preGroupSort=d}var D=function(B,O){return B[0]._groupMinRank-O[0]._groupMinRank||B[0]._preGroupSort-O[0]._preGroupSort},F=function(B,O){var $=QG(B.trace.legendrank)?B.trace.legendrank[B.i]:B.trace.legendrank,Y=QG(O.trace.legendrank)?O.trace.legendrank[O.i]:O.trace.legendrank;return $-Y||B._preSort-O._preSort};for(y.forEach(function(B,O){B[0]._preGroupSort=O}),y.sort(D),d=0;d{"use strict";var KD=it();function B1e(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}a_.formatPiePercent=function(t,r){var i=B1e((t*100).toPrecision(3));return KD.numSeparate(i,r)+"%"};a_.formatPieValue=function(t,r){var i=B1e(t.toPrecision(10));return KD.numSeparate(i,r)};a_.getFirstFilled=function(t,r){if(KD.isArrayOrTypedArray(t))for(var i=0;i{"use strict";var F6t=Ji(),L6t=ni();q1e.exports=function(t,r,i,n){var a=i.marker.pattern;a&&a.shape?F6t.pointStyle(t,i,n,r):L6t.fill(t,r.color)}});var Sw=W((F9r,V1e)=>{"use strict";var N1e=ni(),U1e=Ly().castOption,P6t=O1e();V1e.exports=function(t,r,i,n){var a=i.marker.line,o=U1e(a.color,r.pts)||N1e.defaultLine,s=U1e(a.width,r.pts)||0;t.call(P6t,r,i,n).style("stroke-width",s).call(N1e.stroke,o)}});var nH=W((L9r,Y1e)=>{"use strict";var wf=vi(),tH=yi(),Kc=it(),G1e=Kc.strTranslate,y0=Ji(),cd=ni(),rH=bc().extractOpts,JD=$o(),I6t=Sw(),R6t=Ly().castOption,z6t=JG(),H1e=12,j1e=5,o_=2,B6t=10,Ew=5;Y1e.exports=function(t,r,i){var n=r._fullLayout;i||(i=n.legend);var a=i.itemsizing==="constant",o=i.itemwidth,s=(o+z6t.itemGap*2)/2,l=G1e(s,0),u=function(T,A,y,E){var S;if(T+1)S=T;else if(A&&A.width>0)S=A.width;else return 0;return a?E:Math.min(S,y)};t.each(function(T){var A=wf.select(this),y=Kc.ensureSingle(A,"g","layers");y.style("opacity",T[0].trace.opacity);var E=i.indentation,S=i.valign,C=T[0].lineHeight,k=T[0].height;if(S==="middle"&&E===0||!C||!k)y.attr("transform",null);else{var D={top:1,bottom:-1}[S],F=D*(.5*(C-k+3))||0,P=i.indentation;y.attr("transform",G1e(P,F))}var R=y.selectAll("g.legendfill").data([T]);R.enter().append("g").classed("legendfill",!0);var L=y.selectAll("g.legendlines").data([T]);L.enter().append("g").classed("legendlines",!0);var I=y.selectAll("g.legendsymbols").data([T]);I.enter().append("g").classed("legendsymbols",!0),I.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(p).each(d).each(m).each(_).each(b).each(c).each(f).each(g).each(w);function c(T){var A=$1e(T),y=A.showFill,E=A.showLine,S=A.showGradientLine,C=A.showGradientFill,k=A.anyFill,D=A.anyLine,F=T[0],P=F.trace,R,L,I=rH(P),B=I.colorscale,O=I.reversescale,$=function(V){if(V.size())if(y)y0.fillGroupStyle(V,r,!0);else{var X="legendfill-"+P.uid;y0.gradient(V,r,X,iH(O),B,"fill")}},Y=function(V){if(V.size()){var X="legendline-"+P.uid;y0.lineGroupStyle(V),y0.gradient(V,r,X,iH(O),B,"stroke")}},K=JD.hasMarkers(P)||!k?"M5,0":D?"M5,-2":"M5,-3",j=wf.select(this),q=j.select(".legendfill").selectAll("path").data(y||C?[T]:[]);if(q.enter().append("path").classed("js-fill",!0),q.exit().remove(),q.attr("d",K+"h"+o+"v6h-"+o+"z").call($),E||S){var J=u(void 0,P.line,B6t,j1e);L=Kc.minExtend(P,{line:{width:J}}),R=[Kc.minExtend(F,{trace:L})]}var U=j.select(".legendlines").selectAll("path").data(E||S?[R]:[]);U.enter().append("path").classed("js-line",!0),U.exit().remove(),U.attr("d",K+(S?"l"+o+",0.0001":"h"+o)).call(E?y0.lineGroupStyle:Y)}function f(T){var A=$1e(T),y=A.anyFill,E=A.anyLine,S=A.showLine,C=A.showMarker,k=T[0],D=k.trace,F=!C&&!E&&!y&&JD.hasText(D),P,R;function L(J,U,V,X){var H=Kc.nestedProperty(D,J).get(),G=Kc.isArrayOrTypedArray(H)&&U?U(H):H;if(a&&G&&X!==void 0&&(G=X),V){if(GV[1])return V[1]}return G}function I(J){return k._distinct&&k.index&&J[k.index]?J[k.index]:J[0]}if(C||F||S){var B={},O={};if(C){B.mc=L("marker.color",I);var $=D.type==="scattermap";B.mx=$?"circle":L("marker.symbol",I),B.mo=L("marker.opacity",Kc.mean,[.2,1]),B.mlc=L("marker.line.color",I),B.mlw=L("marker.line.width",Kc.mean,[0,5],o_),B.mld=L("marker.line.dash",I),O.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Y=L("marker.size",Kc.mean,[2,16],H1e);B.ms=Y,O.marker.size=Y}S&&(O.line={width:L("line.width",I,[0,10],j1e)}),F&&(B.tx="Aa",B.tp=L("textposition",I),B.ts=10,B.tc=L("textfont.color",I),B.tf=L("textfont.family",I),B.tw=L("textfont.weight",I),B.ty=L("textfont.style",I),B.tv=L("textfont.variant",I),B.tC=L("textfont.textcase",I),B.tE=L("textfont.lineposition",I),B.tS=L("textfont.shadow",I)),P=[Kc.minExtend(k,B)],R=Kc.minExtend(D,O),R.selectedpoints=null,R.texttemplate=null}var K=wf.select(this).select("g.legendpoints"),j=K.selectAll("path.scatterpts").data(C?P:[]);j.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),j.exit().remove(),j.call(y0.pointStyle,R,r),C&&(P[0].mrc=3);var q=K.selectAll("g.pointtext").data(F?P:[]);q.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),q.exit().remove(),q.selectAll("text").call(y0.textPointStyle,R,r)}function h(T){var A=T[0].trace,y=A.type==="waterfall";if(T[0]._distinct&&y){var E=T[0].trace[T[0].dir].marker;return T[0].mc=E.color,T[0].mlw=E.line.width,T[0].mlc=E.line.color,v(T,this,"waterfall")}var S=[];A.visible&&y&&(S=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 C=wf.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(S);C.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),C.exit().remove(),C.each(function(k){var D=wf.select(this),F=A[k[0]].marker,P=u(void 0,F.line,Ew,o_);D.attr("d",k[1]).style("stroke-width",P+"px").call(cd.fill,F.color),P&&D.call(cd.stroke,F.line.color)})}function d(T){v(T,this)}function p(T){v(T,this,"funnel")}function v(T,A,y){var E=T[0].trace,S=E.marker||{},C=S.line||{},k=S.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",D=y?E.visible&&E.type===y:tH.traceIs(E,"bar"),F=wf.select(A).select("g.legendpoints").selectAll("path.legend"+y).data(D?[T]:[]);F.enter().append("path").classed("legend"+y,!0).attr("d",k).attr("transform",l),F.exit().remove(),F.each(function(P){var R=wf.select(this),L=P[0],I=u(L.mlw,S.line,Ew,o_);R.style("stroke-width",I+"px");var B=L.mcc;if(!i._inHover&&"mc"in L){var O=rH(S),$=O.mid;$===void 0&&($=(O.max+O.min)/2),B=y0.tryColorscale(S,"")($)}var Y=B||L.mc||S.color,K=S.pattern,j=y0.getPatternAttr,q=K&&(j(K.shape,0,"")||j(K.path,0,""));if(q){var J=j(K.bgcolor,0,null),U=j(K.fgcolor,0,null),V=K.fgopacity,X=W1e(K.size,8,10),H=W1e(K.solidity,.5,1),G="legend-"+E.uid;R.call(y0.pattern,"legend",r,G,q,X,H,B,K.fillmode,J,U,V)}else R.call(cd.fill,Y);I&&cd.stroke(R,L.mlc||C.color)})}function m(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendbox").data(A.visible&&tH.traceIs(A,"box-violin")?[T]:[]);y.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),y.exit().remove(),y.each(function(){var E=wf.select(this);if((A.boxpoints==="all"||A.points==="all")&&cd.opacity(A.fillcolor)===0&&cd.opacity((A.line||{}).color)===0){var S=Kc.minExtend(A,{marker:{size:a?H1e:Kc.constrain(A.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});y.call(y0.pointStyle,S,r)}else{var C=u(void 0,A.line,Ew,o_);E.style("stroke-width",C+"px").call(cd.fill,A.fillcolor),C&&cd.stroke(E,A.line.color)}})}function g(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(A.visible&&A.type==="candlestick"?[T,T]:[]);y.enter().append("path").classed("legendcandle",!0).attr("d",function(E,S){return S?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),y.exit().remove(),y.each(function(E,S){var C=wf.select(this),k=A[S?"increasing":"decreasing"],D=u(void 0,k.line,Ew,o_);C.style("stroke-width",D+"px").call(cd.fill,k.fillcolor),D&&cd.stroke(C,k.line.color)})}function w(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(A.visible&&A.type==="ohlc"?[T,T]:[]);y.enter().append("path").classed("legendohlc",!0).attr("d",function(E,S){return S?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),y.exit().remove(),y.each(function(E,S){var C=wf.select(this),k=A[S?"increasing":"decreasing"],D=u(void 0,k.line,Ew,o_);C.style("fill","none").call(y0.dashLine,k.line.dash,D),D&&cd.stroke(C,k.line.color)})}function b(T){M(T,this,"pie")}function _(T){M(T,this,"funnelarea")}function M(T,A,y){var E=T[0],S=E.trace,C=y?S.visible&&S.type===y:tH.traceIs(S,y),k=wf.select(A).select("g.legendpoints").selectAll("path.legend"+y).data(C?[T]:[]);if(k.enter().append("path").classed("legend"+y,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),k.exit().remove(),k.size()){var D=S.marker||{},F=u(R6t(D.line.width,E.pts),D.line,Ew,o_),P="pieLike",R=Kc.minExtend(S,{marker:{line:{width:F}}},P),L=Kc.minExtend(E,{trace:R},P);I6t(k,L,R,r)}}function x(T){var A=T[0].trace,y,E=[];if(A.visible)switch(A.type){case"histogram2d":case"heatmap":E=[["M-15,-2V4H15V-2Z"]],y=!0;break;case"choropleth":case"choroplethmap":E=[["M-6,-6V6H6V-6Z"]],y=!0;break;case"densitymap":E=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],y="radial";break;case"cone":E=[["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"]],y=!1;break;case"streamtube":E=[["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"]],y=!1;break;case"surface":E=[["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"]],y=!0;break;case"mesh3d":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],y=!1;break;case"volume":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],y=!0;break;case"isosurface":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],y=!1;break}var S=wf.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(E);S.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(C,k){var D=wf.select(this),F=rH(A),P=F.colorscale,R=F.reversescale,L=function($){if($.size()){var Y="legendfill-"+A.uid;y0.gradient($,r,Y,iH(R,y==="radial"),P,"fill")}},I;if(P){if(!y){var O=P.length;I=k===0?P[R?O-1:0][1]:k===1?P[R?0:O-1][1]:P[Math.floor((O-1)/2)][1]}}else{var B=A.vertexcolor||A.facecolor||A.color;I=Kc.isArrayOrTypedArray(B)?B[k]||B[0]:B}D.attr("d",C[0]),I?D.call(cd.fill,I):D.call(L)})}};function iH(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function $1e(e){var t=e[0].trace,r=t.contours,i=JD.hasLines(t)||t.visible&&t.type==="quiver",n=JD.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:i=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:n,showLine:i,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:i||o,anyFill:a||s}}function W1e(e,t,r){return e&&Kc.isArrayOrTypedArray(e)?t:e>r?r:e}});var lH=W((P9r,ige)=>{"use strict";var Jf=vi(),Cl=it(),oH=Ko(),s_=yi(),t7=lw(),aH=bf(),Dl=Ji(),SA=ni(),l_=uo(),X1e=KG().handleItemClick,Z1e=KG().handleTitleClick,jl=JG(),sH=Hl(),tge=sH.LINE_SPACING,Cw=sH.FROM_TL,K1e=sH.FROM_BR,J1e=z1e(),q6t=nH(),Dw=MA(),kw=1,O6t=/^legend[0-9]*$/;ige.exports=function(t,r){if(r)Q1e(t,r);else{var i=t._fullLayout,n=i._legends,a=i._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Jf.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(O6t)&&n.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var p=i.hiddenlabels||[];if(!s&&(!i.showlegend||!l.length))return o.selectAll("."+n).remove(),i._topdefs.select("#"+a).remove(),oH.autoMargin(e,n);var v=Cl.ensureSingle(o,"g",n,function(A){s||A.attr("pointer-events","all")}),m=Cl.ensureSingleById(i._topdefs,"clipPath",a,function(A){A.append("rect")}),g=Cl.ensureSingle(v,"rect","bg",function(A){A.attr("shape-rendering","crispEdges")});g.call(SA.stroke,r.bordercolor).call(SA.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var w=Cl.ensureSingle(v,"g","scrollbox"),b=r.title;r._titleWidth=0,r._titleHeight=0;var _;b.text?(_=Cl.ensureSingle(w,"text",n+"titletext"),_.attr("text-anchor","start").call(Dl.font,b.font).text(b.text),e7(_,w,e,r,kw),!s&&(r.titleclick||r.titledoubleclick)&&G6t(w,e,r,n)):(w.selectAll("."+n+"titletext").remove(),w.selectAll("."+n+"titletoggle").remove());var M=Cl.ensureSingle(v,"rect","scrollbar",function(A){A.attr(jl.scrollBarEnterAttrs).call(SA.fill,jl.scrollBarColor)}),x=w.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var T=x.selectAll("g.traces").data(Cl.identity);T.enter().append("g").attr("class","traces"),T.exit().remove(),T.style("opacity",function(A){let y=A[0],E=y.trace;if(y.groupTitle){let S=E.legendgroup,C=(i.shapes||[]).filter(function(D){return D.showlegend});return e._fullData.concat(C).some(function(D){return D.legendgroup===S&&(D.legend||"legend")===n&&D.visible===!0})?1:.5}return s_.traceIs(E,"pie-like")?p.indexOf(A[0].label)!==-1?.5:1:E.visible==="legendonly"?.5:1}).each(function(){Jf.select(this).call(U6t,e,r)}).call(q6t,e,r).each(function(A){s||A[0].groupTitle&&r.groupclick==="toggleitem"||Jf.select(this).call(V6t,e,n)}),Cl.syncOrAsync([oH.previousPromises,function(){return $6t(e,x,T,r,w)},function(){var A=i._size,y=r.borderwidth,E=r.xref==="paper",S=r.yref==="paper";if(b.text){let ce=(i.shapes||[]).filter(function(Ce){return Ce.showlegend}),ge=e._fullData.concat(ce).some(function(Ce){let be=Ce.legend||"legend";var he=Array.isArray(be)?be.includes(n):be===n;return he&&Ce.visible===!0});_.style("opacity",ge?1:.5)}if(!s){var C,k;E?C=A.l+A.w*r.x-Cw[r7(r)]*r._width:C=i.width*r.x-Cw[r7(r)]*r._width,S?k=A.t+A.h*(1-r.y)-Cw[i7(r)]*r._effHeight:k=i.height*(1-r.y)-Cw[i7(r)]*r._effHeight;var D=W6t(e,n,C,k);if(D)return;if(i.margin.autoexpand){var F=C,P=k;C=E?Cl.constrain(C,0,i.width-r._width):F,k=S?Cl.constrain(k,0,i.height-r._effHeight):P,C!==F&&Cl.log("Constrain "+n+".x to make legend fit inside graph"),k!==P&&Cl.log("Constrain "+n+".y to make legend fit inside graph")}Dl.setTranslate(v,C,k)}if(M.on(".drag",null),v.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var R=r._effHeight;s&&(R=r._height),g.attr({width:r._width-y,height:R-y,x:y/2,y:y/2}),Dl.setTranslate(w,0,0),m.select("rect").attr({width:r._width-2*y,height:R-2*y,x:y,y}),Dl.setClipUrl(w,a,e),Dl.setRect(M,0,0,0,0),delete r._scrollY}else{var L=Math.max(jl.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),I=r._effHeight-L-2*jl.scrollBarMargin,B=r._height-r._effHeight,O=I/B,$=Math.min(r._scrollY||0,B);g.attr({width:r._width-2*y+jl.scrollBarWidth+jl.scrollBarMargin,height:r._effHeight-y,x:y/2,y:y/2}),m.select("rect").attr({width:r._width-2*y+jl.scrollBarWidth+jl.scrollBarMargin,height:r._effHeight-2*y,x:y,y:y+$}),Dl.setClipUrl(w,a,e),X($,L,O),v.on("wheel",function(){$=Cl.constrain(r._scrollY+Jf.event.deltaY/B*I,0,B),X($,L,O),$!==0&&$!==B&&Jf.event.preventDefault()});var Y,K,j,q=function(ce,ge,Ce){var be=(Ce-ge)/O+ce;return Cl.constrain(be,0,B)},J=function(ce,ge,Ce){var be=(ge-Ce)/O+ce;return Cl.constrain(be,0,B)},U=Jf.behavior.drag().on("dragstart",function(){var ce=Jf.event.sourceEvent;ce.type==="touchstart"?Y=ce.changedTouches[0].clientY:Y=ce.clientY,j=$}).on("drag",function(){var ce=Jf.event.sourceEvent;ce.buttons===2||ce.ctrlKey||(ce.type==="touchmove"?K=ce.changedTouches[0].clientY:K=ce.clientY,$=q(j,Y,K),X($,L,O))});M.call(U);var V=Jf.behavior.drag().on("dragstart",function(){var ce=Jf.event.sourceEvent;ce.type==="touchstart"&&(Y=ce.changedTouches[0].clientY,j=$)}).on("drag",function(){var ce=Jf.event.sourceEvent;ce.type==="touchmove"&&(K=ce.changedTouches[0].clientY,$=J(j,Y,K),X($,L,O))});w.call(V)}function X(ce,ge,Ce){r._scrollY=e._fullLayout[n]._scrollY=ce,Dl.setTranslate(w,0,-ce),Dl.setRect(M,r._width,jl.scrollBarMargin+ce*Ce,jl.scrollBarWidth,ge),m.select("rect").attr("y",y+ce)}if(e._context.edits.legendPosition){var H,G,Q,te;v.classed("cursor-move",!0),aH.init({element:v.node(),gd:e,prepFn:function(ce){if(ce.target!==M.node()){var ge=Dl.getTranslate(v);Q=ge.x,te=ge.y}},moveFn:function(ce,ge){if(Q!==void 0&&te!==void 0){var Ce=Q+ce,be=te+ge;Dl.setTranslate(v,Ce,be),H=aH.align(Ce,r._width,A.l,A.l+A.w,r.xanchor),G=aH.align(be+r._height,-r._height,A.t+A.h,A.t,r.yanchor)}},doneFn:function(){if(H!==void 0&&G!==void 0){var ce={};ce[n+".x"]=H,ce[n+".y"]=G,s_.call("_guiRelayout",e,ce)}},clickFn:function(ce,ge){var Ce=o.selectAll("g.traces").filter(function(){var be=this.getBoundingClientRect();return ge.clientX>=be.left&&ge.clientX<=be.right&&ge.clientY>=be.top&&ge.clientY<=be.bottom});Ce.size()>0&&rge(e,r,Ce,ce,ge)}})}}],e)}}function QD(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||n)}function rge(e,t,r,i,n){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:n,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:a};o._group&&(u.group=o._group),s_.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=t7.triggerHandler(e,"plotly_legendclick",u);if(i===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&X1e(r,e,t,s,i)},e._context.doubleClickDelay)}else if(i===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=t7.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&X1e(r,e,t,l,i)}}function U6t(e,t,r){var i=Dw.getId(r),n=e.data()[0][0],a=n.trace,o=s_.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;n.groupTitle?(u=n.groupTitle.text,c=n.groupTitle.font):(c=r.font,r.entries?u=n.text:(u=o?n.label:a.name,a._meta&&(u=Cl.templateString(u,a._meta))));var f=Cl.ensureSingle(e,"text",i+"text");f.attr("text-anchor","start").call(Dl.font,c).text(s?ege(u,l):u);var h=r.indentation+r.itemwidth+jl.itemGap*2;l_.positionText(f,h,0),s?f.call(l_.makeEditable,{gd:t,text:u}).call(e7,e,t,r).on("edit",function(d){this.text(ege(d,l)).call(e7,e,t,r);var p={};return p.name=d,n.trace._isShape?s_.call("_guiRelayout",t,"shapes["+a.index+"].name",p.name):s_.call("_guiRestyle",t,p,a.index)}):e7(f,e,t,r)}function ege(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 V6t(e,t,r){var i=t._context.doubleClickDelay,n,a=1,o=Cl.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(SA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-t._legendMouseDownTimei&&(a=Math.max(a-1,1)),rge(t,s,e,a,Jf.event)}}))}function G6t(e,t,r,i){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(i):c===i)&&s_.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=Cl.ensureSingle(e,"rect",i+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(SA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1));let u={event:Jf.event,legendId:i,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(t7.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Z1e(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,t7.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Z1e(t,r,r.titledoubleclick))}))}function e7(e,t,r,i,n){i._inHover&&e.attr("data-notex",!0),l_.convertToTspans(e,r,function(){H6t(t,r,i,n)})}function H6t(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=a[n.i]!==!1),!r._inHover&&n&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=Dw.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;i===kw?c=r.title.font:n.groupTitle?c=n.groupTitle.font:c=r.font;var f=c.size*tge,h,d;if(s){var p=Dl.bBox(s);h=p.height,d=p.width,i===kw?Dl.setTranslate(o,u,u+h*.75):Dl.setTranslate(o,0,h*.25)}else{var v="."+l+(i===kw?"title":"")+"text",m=e.select(v),g=l_.lineCount(m),w=m.node();if(h=f*g,d=w?Dl.bBox(w).width:0,i===kw)r.title.side==="left"&&(d+=jl.itemGap*2),l_.positionText(m,u+jl.titlePad,u+f);else{var b=jl.itemGap*2+r.indentation+r.itemwidth;n.groupTitle&&(b=jl.itemGap,d-=r.indentation+r.itemwidth),l_.positionText(m,b,-f*((g-1)/2-.3))}}i===kw?(r._titleWidth=d,r._titleHeight=h):(n.lineHeight=f,n.height=Math.max(h,16)+3,n.width=d)}function j6t(e){var t=0,r=0,i=e.title.side;return i&&(i.indexOf("left")!==-1&&(t=e._titleWidth),i.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function $6t(e,t,r,i,n){var a=e._fullLayout,o=Dw.getId(i);i||(i=a[o]);var s=a._size,l=Dw.isVertical(i),u=Dw.isGrouped(i),c=i.entrywidthmode==="fraction",f=i.borderwidth,h=2*f,d=jl.itemGap,p=i.indentation+i.itemwidth+d*2,v=2*(f+d),m=i7(i),g=i.y<0||i.y===0&&m==="top",w=i.y>1||i.y===1&&m==="bottom",b=i.tracegroupgap,_={};let{orientation:M,yref:x}=i,{maxheight:T}=i,A=g||w||M!=="v"||x!=="paper";T||(T=A?.5:1);let y=A?a.height:s.h;i._maxHeight=Math.max(T>1?T:T*y,30);var E=0;i._width=0,i._height=0;var S=j6t(i);if(l)r.each(function(ce){var ge=ce[0].height;Dl.setTranslate(this,f+S[0],f+S[1]+i._height+ge/2+d),i._height+=ge,i._width=Math.max(i._width,ce[0].width)}),E=p+i._width,i._width+=d+p+h,i._height+=v,u&&(t.each(function(ce,ge){Dl.setTranslate(this,0,ge*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var C=r7(i),k=i.x<0||i.x===0&&C==="right",D=i.x>1||i.x===1&&C==="left",F=w||g,P=a.width/2;i._maxWidth=Math.max(k?F&&C==="left"?s.l+s.w:P:D?F&&C==="right"?s.r+s.w:P:s.w,2*p);var R=0,L=0;r.each(function(ce){var ge=QD(ce,i,p);R=Math.max(R,ge),L+=ge}),E=null;var I=0;if(u){var B=0,O=0,$=0;t.each(function(){var ce=0,ge=0;Jf.select(this).selectAll("g.traces").each(function(be){var he=QD(be,i,p),oe=be[0].height;Dl.setTranslate(this,S[0],S[1]+f+d+oe/2+ge),ge+=oe,ce=Math.max(ce,he),_[be[0].trace.legendgroup]=ce});var Ce=ce+d;O>0&&Ce+f+O>i._maxWidth?(I=Math.max(I,O),O=0,$+=B+b,B=ge):B=Math.max(B,ge),Dl.setTranslate(this,O,$),O+=Ce}),i._width=Math.max(I,O)+f,i._height=$+B+v}else{var Y=r.size(),K=L+h+(Y-1)*d=i._maxWidth&&(I=Math.max(I,U),q=0,J+=j,i._height+=j,j=0),Dl.setTranslate(this,S[0]+f+q,S[1]+f+J+ge/2+d),U=q+Ce+d,q+=be,j=Math.max(j,ge)}),K?(i._width=q+h,i._height=j+v):(i._width=Math.max(I,U)+h,i._height+=j+v)}}i._width=Math.ceil(Math.max(i._width+S[0],i._titleWidth+2*(f+jl.titlePad))),i._height=Math.ceil(Math.max(i._height+S[1],i._titleHeight+2*(f+jl.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=e._context.edits,X=V.legendText||V.legendPosition;r.each(function(ce){var ge=Jf.select(this).select("."+o+"toggle"),Ce=ce[0].height,be=ce[0].trace.legendgroup,he=QD(ce,i,p);u&&be!==""&&(he=_[be]);var oe=X?p:E||he;!l&&!c&&(oe+=d/2),Dl.setRect(ge,0,-Ce/2,oe,Ce)});var H=n.select("."+o+"titletext");H.node()&&N6t(H,i,f);var G=n.select("."+o+"titletoggle");if(G.size()&&H.node()){var Q=H.attr("x")||0,te=jl.titlePad;Dl.setRect(G,Q-te,f,i._titleWidth+2*te,i._titleHeight+2*te)}}function W6t(e,t,r,i){var n=e._fullLayout,a=n[t],o=r7(a),s=i7(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:n.width-r,l:r+a._width,b:n.height-i,t:i+a._effHeight};if(l&&u)return oH.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*Cw[o],r:a._width*K1e[o],b:a._effHeight*K1e[s],t:a._effHeight*Cw[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function r7(e){return Cl.isRightAnchor(e)?"right":Cl.isCenterAnchor(e)?"center":"left"}function i7(e){return Cl.isBottomAnchor(e)?"bottom":Cl.isMiddleAnchor(e)?"middle":"top"}});var hH=W(fH=>{"use strict";var u_=vi(),Rg=sn(),tl=it(),Y6t=tl.pushUnique,uH=tl.strTranslate,X6t=tl.strRotate,Z6t=lw(),fd=uo(),K6t=C1e(),s1=Ji(),$l=ni(),n7=bf(),l1=ji(),J6t=Gl().zindexSeparator,Lw=yi(),x0=Kf(),c_=P6(),Q6t=YG(),eAt=lH(),fge=c_.YANGLE,cH=Math.PI*fge/180,tAt=1/Math.sin(cH),rAt=Math.cos(cH),iAt=Math.sin(cH),ws=c_.HOVERARROWSIZE,wa=c_.HOVERTEXTPAD,nge={box:!0,ohlc:!0,violin:!0,candlestick:!0},nAt={scatter:!0,scattergl:!0,splom:!0};function age(e,t){return e.distance-t.distance}fH.hover=function(t,r,i,n){t=tl.getGraphDiv(t);var a=r.target;tl.throttle(t._fullLayout._uid+c_.HOVERID,c_.HOVERMINTIME,function(){aAt(t,r,i,n,a)})};fH.loneHover=function(t,r){var i=!0;Array.isArray(t)||(i=!1,t=[t]);var n=r.gd,a=gge(n),o=mge(n),s=t.map(function(m){var g=m._x0||m.x0||m.x||0,w=m._x1||m.x1||m.x||0,b=m._y0||m.y0||m.y||0,_=m._y1||m.y1||m.y||0,M=m.eventData;if(M){var x=Math.min(g,w),T=Math.max(g,w),A=Math.min(b,_),y=Math.max(b,_),E=m.trace;if(Lw.traceIs(E,"gl3d")){var S=n._fullLayout[E.scene]._scene.container,C=S.offsetLeft,k=S.offsetTop;x+=C,T+=C,A+=k,y+=k}M.bbox={x0:x+o,x1:T+o,y0:A+a,y1:y+a},M.xPixel=(g+w)/2,M.yPixel=(b+_)/2,r.inOut_bbox&&r.inOut_bbox.push(M.bbox)}else M=!1;return{color:m.color||$l.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:M}}),l=!1,u=dge(s,{gd:n,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||$l.background,container:u_.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(m,g){return m.y0-g.y0}).each(function(m,g){var w=m.y0-m.by/2;w-fT[0]._length||te<0||te>A[0]._length)return n7.unhoverRaw(e,t)}if(t.pointerX=Q+T[0]._offset,t.pointerY=te+A[0]._offset,"xval"in t?P=x0.flat(a,t.xval):P=x0.p2c(T,Q),"yval"in t?R=x0.flat(a,t.yval):R=x0.p2c(A,te),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!Rg(P[0])||!Rg(R[0]))return tl.warn("Fx.hover failed",t,e),n7.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=P,e._hoverYVals=R,e._hoverXAxes=T,e._hoverYAxes=A);var Ce=1/0;function be(Je,Ct){for(I=0;IU&&(D.splice(0,U),Ce=D[0].distance),f&&k!==0&&D.length===0){J.distance=k,J.index=!1;var ei=O._module.hoverPoints(J,j,q,"closest",{hoverLayer:s._hoverlayer});if(ei&&(ei=ei.filter(function(ca){return ca.spikeDistance<=k})),ei&&ei.length){var Lr,$i=ei.filter(function(ca){return ca.xa.showspikes&&ca.xa.spikesnap!=="hovered data"});if($i.length){var Tn=$i[0];Rg(Tn.x0)&&Rg(Tn.y0)&&(Lr=oe(Tn),(!V.vLinePoint||V.vLinePoint.spikeDistance>Lr.spikeDistance)&&(V.vLinePoint=Lr))}var hn=ei.filter(function(ca){return ca.ya.showspikes&&ca.ya.spikesnap!=="hovered data"});if(hn.length){var ta=hn[0];Rg(ta.x0)&&Rg(ta.y0)&&(Lr=oe(ta),(!V.hLinePoint||V.hLinePoint.spikeDistance>Lr.spikeDistance)&&(V.hLinePoint=Lr))}}}}}be();function he(Je,Ct,ir){for(var hr=null,Ur=1/0,si,ei=0;eiJe.trace.index===_e.trace.index):D=[_e];var Ie=D.length,Oe=cge("x",_e,s),Qe=cge("y",_e,s);be(Oe,Qe);var et=[],_t={},ut=0,vt=function(Je){var Ct=nge[Je.trace.type]?hge(Je):Je.trace.index;if(!_t[Ct])ut++,_t[Ct]=ut,et.push(Je);else{var ir=_t[Ct]-1,hr=et[ir];ir>0&&Math.abs(Je.distance)Ie-1;Xe--)vt(D[Xe]);D=et,ee()}var mt=e._hoverdata,bt=[],Ne=gge(e),Ue=mge(e);for(let Je of D){var Ge=x0.makeEventData(Je,Je.trace,Je.cd);if(Je.hovertemplate!==!1){var je=!1;Je.cd[Je.index]&&Je.cd[Je.index].ht&&(je=Je.cd[Je.index].ht),Je.hovertemplate=je||Je.trace.hovertemplate||!1}if(Je.xa&&Je.ya){var Re=Je.x0+Je.xa._offset,Ve=Je.x1+Je.xa._offset,ct=Je.y0+Je.ya._offset,Tt=Je.y1+Je.ya._offset,Xt=Math.min(Re,Ve),Vt=Math.max(Re,Ve),lr=Math.min(ct,Tt),ur=Math.max(ct,Tt);Ge.bbox={x0:Xt+Ue,x1:Vt+Ue,y0:lr+Ne,y1:ur+Ne},Ge.xPixel=(Re+Ve)/2,Ge.yPixel=(ct+Tt)/2}Je.eventData=[Ge],bt.push(Ge)}e._hoverdata=bt;var Bt=h==="y"&&(F.length>1||D.length>1)||h==="closest"&&X&&D.length>1,Zt=$l.combine(s.plot_bgcolor||$l.background,s.paper_bgcolor),kr=dge(D,{gd:e,hovermode:h,rotateLabels:Bt,bgColor:Zt,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),$e=kr.hoverLabels;if(x0.isUnifiedHover(h)||(sAt($e,Bt,s,kr.commonLabelBoundingBox),vge($e,Bt,s._invScaleX,s._invScaleY)),n&&n.tagName){var tt=Lw.getComponentMethod("annotations","hasClickToShow")(e,bt);K6t(u_.select(n),tt?"pointer":"")}var st=cAt(e,t,mt);if(!n||i||!st&&!s.hoveranywhere)return;mt&&st&&e.emit("plotly_unhover",{event:t,points:mt}),xt(e._hoverdata);function xt(Je){e.emit("plotly_hover",{event:t,points:Je,xaxes:T,yaxes:A,xvals:x0.c2dApply(T,P),yvals:x0.c2dApply(A,R),xPixel:t.pointerX,yPixel:t.pointerY})}}function hge(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 oAt=/([\s\S]*)<\/extra>/;function dge(e,t){var r=t.gd,i=r._fullLayout,n=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||c_.HOVERFONT,f=t.fontSize||c_.HOVERFONTSIZE,h=t.fontWeight||i.font.weight,d=t.fontStyle||i.font.style,p=t.fontVariant||i.font.variant,v=t.fontTextcase||i.font.textcase,m=t.fontLineposition||i.font.lineposition,g=t.fontShadow||i.font.shadow,w=e[0],b=w.xa,_=w.ya,M=n.charAt(0),x=M+"Label",T=w[x];if(T===void 0&&b.type==="multicategory")for(var A=0;Ai.width-bt&&(Ne=i.width-bt),ke.attr("d","M"+(vt-Ne)+",0L"+(vt-Ne+ws)+","+mt+ws+"H"+bt+"v"+mt+(wa*2+ut.height)+"H"+-bt+"V"+mt+ws+"H"+(vt-Ne-ws)+"Z"),vt=Ne,I.minX=vt-bt,I.maxX=vt+bt,b.side==="top"?(I.minY=Xe-(wa*2+ut.height),I.maxY=Xe-wa):(I.minY=Xe+wa,I.maxY=Xe+(wa*2+ut.height))}else{var Ue,Ge,je;_.side==="right"?(Ue="start",Ge=1,je="",vt=b._offset+b._length):(Ue="end",Ge=-1,je="-",vt=b._offset),Xe=_._offset+(w.y0+w.y1)/2,_e.attr("text-anchor",Ue),ke.attr("d","M0,0L"+je+ws+","+ws+"V"+(wa+ut.height/2)+"h"+je+(wa*2+ut.width)+"V-"+(wa+ut.height/2)+"H"+je+ws+"V-"+ws+"Z"),I.minY=Xe-(wa+ut.height/2),I.maxY=Xe+(wa+ut.height/2),_.side==="right"?(I.minX=vt+ws,I.maxX=vt+ws+(wa*2+ut.width)):(I.minX=vt-ws-(wa*2+ut.width),I.maxX=vt-ws);var Re=ut.height/2,Ve=E-ut.top-Re,ct="clip"+i._uid+"commonlabel"+_._id,Tt;if(vtke.hoverinfo!=="none");if(Se.length===0)return[];var B=i.hoverlabel,O=B.font,$=Se[0],Y=((n==="x unified"?$.xa:$.ya).unifiedhovertitle||{}).text,K=Y?tl.hovertemplateString({data:n==="x unified"?[{xa:$.xa,x:$.xVal}]:[{ya:$.ya,y:$.yVal}],fallback:$.trace.hovertemplatefallback,locale:i._d3locale,template:Y}):T,j={showlegend:!0,legend:{title:{text:K,font:O},font:O,bgcolor:B.bgcolor,bordercolor:B.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},q={font:O};Q6t(j,q,r._fullData);var J=q.legend;J.entries=[];for(var U=0;U=0?pe=ee:ae+ge=0?pe=ae:xe+ge=0?we=ye:ue+Ce=0?we=ue:re+Ce=0,(Se.idealAlign==="top"||!lr)&&ur?(je-=Ve/2,Se.anchor="end"):lr?(je+=Ve/2,Se.anchor="start"):Se.anchor="middle",Se.crossPos=je;else{if(Se.pos=je,lr=Ge+Re/2+Vt<=S,ur=Ge-Re/2-Vt>=0,(Se.idealAlign==="left"||!lr)&&ur)Ge-=Re/2,Se.anchor="end";else if(lr)Ge+=Re/2,Se.anchor="start";else{Se.anchor="middle";var Bt=Vt/2,Zt=Ge+Bt-S,kr=Ge-Bt;Zt>0&&(Ge-=Zt),kr<0&&(Ge+=-kr)}Se.crossPos=Ge}Xe.attr("text-anchor",Se.anchor),bt&&mt.attr("text-anchor",Se.anchor),ke.attr("transform",uH(Ge,je)+(a?X6t(fge):""))}),{hoverLabels:Fe,commonLabelBoundingBox:I}}function oge(e,t,r,i,n,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tl.templateString(e.name,e.trace._meta)),o=uge(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"]===n?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),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==n&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=tl.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:i._d3locale,template:c}),s=s.replace(oAt,(p,v)=>(o=uge(v,e.nameLength),""))}return[s,o]}function sAt(e,t,r,i){var n=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=i.minX,h=i.maxX,d=i.minY,p=i.maxY,v=function(P){return P*r._invScaleX},m=function(P){return P*r._invScaleY};e.each(function(P){var R=P[n],L=P[a],I=R._id.charAt(0)==="x",B=R.range;c===0&&B&&B[0]>B[1]!==I&&(s=-1);var O=0,$=I?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Y=pge(P,t),K=P.anchor,j=K==="end"?-1:1,q,J;if(K==="middle")q=P.crossPos+(I?m(Y.y-P.by/2):v(P.bx/2+P.tx2width/2)),J=q+(I?m(P.by):v(P.bx));else if(I)q=P.crossPos+m(ws+Y.y)-m(P.by/2-ws),J=q+m(P.by);else{var U=v(j*ws+Y.x),V=U+v(j*P.bx);q=P.crossPos+Math.min(U,V),J=P.crossPos+Math.max(U,V)}I?d!==void 0&&p!==void 0&&Math.min(J,p)-Math.max(q,d)>1&&(L.side==="left"?(O=L._mainLinePosition,$=r.width):$=L._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(J,h)-Math.max(q,f)>1&&(L.side==="top"?(O=L._mainLinePosition,$=r.height):$=L._mainLinePosition)}u[c++]=[{datum:P,traceIndex:P.trace.index,dp:0,pos:P.pos,posref:P.posref,size:P.by*(I?tAt:1)/2,pmin:O,pmax:$}]}),u.sort(function(P,R){return P[0].posref-R[0].posref||s*(R[0].traceIndex-P[0].traceIndex)});var g,w,b,_,M,x,T;function A(P){var R=P[0],L=P[P.length-1];if(w=R.pmin-R.pos-R.dp+R.size,b=L.pos+L.dp+L.size-R.pmax,w>.01){for(M=P.length-1;M>=0;M--)P[M].dp+=w;g=!1}if(!(b<.01)){if(w<-.01){for(M=P.length-1;M>=0;M--)P[M].dp-=b;g=!1}if(g){var I=0;for(_=0;_R.pmax&&I++;for(_=P.length-1;_>=0&&!(I<=0);_--)x=P[_],x.pos>R.pmax-1&&(x.del=!0,I--);for(_=0;_=0;M--)P[M].dp-=b;for(_=P.length-1;_>=0&&!(I<=0);_--)x=P[_],x.pos+x.dp+x.size>R.pmax&&(x.del=!0,I--)}}}for(;!g&&o<=l;){for(o++,g=!0,_=0;_.01){for(M=E.length-1;M>=0;M--)E[M].dp+=w;for(y.push.apply(y,E),u.splice(_+1,1),T=0,M=y.length-1;M>=0;M--)T+=y[M].dp;for(b=T/y.length,M=y.length-1;M>=0;M--)y[M].dp-=b;g=!1}else _++}u.forEach(A)}for(_=u.length-1;_>=0;_--){var k=u[_];for(M=k.length-1;M>=0;M--){var D=k[M],F=D.datum;F.offset=D.dp,F.del=D.del}}}function pge(e,t){var r=0,i=e.offset;return t&&(i*=-iAt,r=e.offset*rAt),{x:r,y:i}}function lAt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(ws+wa),i=r+t*(e.txwidth+wa),n=e.anchor==="middle";return n&&(r-=e.tx2width/2,i+=e.txwidth/2+wa),{alignShift:t,textShiftX:r,text2ShiftX:i}}function vge(e,t,r,i){var n=function(o){return o*r},a=function(o){return o*i};e.each(function(o){var s=u_.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=lAt(o),h=pge(o,t),d=h.x,p=h.y,v=u==="middle",m="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,g;v?g="M-"+n(o.bx/2+o.tx2width/2)+","+a(p-o.by/2)+"h"+n(o.bx)+"v"+a(o.by)+"h-"+n(o.bx)+"Z":m?g="M0,0L"+n(c*ws+d)+","+a(ws+p)+"v"+a(o.by/2-ws)+"h"+n(c*o.bx)+"v-"+a(o.by)+"H"+n(c*ws+d)+"V"+a(p-ws)+"Z":g="M"+n(c*ws+d)+","+a(p-o.by/2)+"h"+n(c*o.bx)+"v"+a(o.by)+"h"+n(-c*o.bx)+"Z",s.select("path").attr("d",g);var w=d+f.textShiftX,b=p+o.ty0-o.by/2+wa,_=o.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(l.attr("text-anchor","start"),w=v?-o.bx/2-o.tx2width/2+wa:-o.bx-wa):_==="right"&&u!=="end"&&(l.attr("text-anchor","end"),w=v?o.bx/2-o.tx2width/2-wa:o.bx+wa)),l.call(fd.positionText,n(w),a(b)),o.tx2width&&(s.select("text.name").call(fd.positionText,n(f.text2ShiftX+f.alignShift*wa+d),a(p+o.ty0-o.by/2+wa)),s.select("rect").call(s1.setRect,n(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(p-o.by/2-1),n(o.tx2width),a(o.by+2)))})}function uAt(e,t){var r=e.index,i=e.trace||{},n=e.cd[0],a=e.cd[r]||{};function o(h){return h||Rg(h)&&h===0}var s=Array.isArray(r)?function(h,d){var p=tl.castOption(n,r,h);return o(p)?p:tl.extractOption({},i,"",d)}:function(h,d){return tl.extractOption(a,i,h,d)};function l(h,d,p){var v=s(d,p);o(v)&&(e[h]=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"&&i.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tl.constrain(e.x0,0,e.xa._length),e.x1=tl.constrain(e.x1,0,e.xa._length),e.y0=tl.constrain(e.y0,0,e.ya._length),e.y1=tl.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:l1.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:l1.hoverLabelText(e.ya,e.yLabelVal,i.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=l1.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+l1.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=l1.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+l1.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 sge(e,t,r){var i=r.container,n=r.fullLayout,a=n._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(i.selectAll(".spikeline").remove(),!!(l||s)){var f=$l.combine(n.plot_bgcolor,n.paper_bgcolor);if(s){var h=t.hLinePoint,d,p;u=h&&h.xa,c=h&&h.ya;var v=c.spikesnap;v==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+h.x,p=c._offset+h.y);var m=$l.wcagContrast(h.color,f)<1.5?$l.contrast(f):h.color,g=c.spikemode,w=c.spikethickness,b=c.spikecolor||m,_=l1.getPxPosition(e,c),M,x;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(M=_,x=d),g.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)),M=a.l+T*a.w,x=a.l+A*a.w}i.insert("line",":first-child").attr({x1:M,x2:x,y1:p,y2:p,"stroke-width":w,stroke:b,"stroke-dasharray":s1.dashStyle(c.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:M,x2:x,y1:p,y2:p,"stroke-width":w+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:_+(c.side!=="right"?w:-w),cy:p,r:w,fill:b}).classed("spikeline",!0)}if(l){var y=t.vLinePoint,E,S;u=y&&y.xa,c=y&&y.ya;var C=u.spikesnap;C==="cursor"?(E=o.pointerX,S=o.pointerY):(E=u._offset+y.x,S=c._offset+y.y);var k=$l.wcagContrast(y.color,f)<1.5?$l.contrast(f):y.color,D=u.spikemode,F=u.spikethickness,P=u.spikecolor||k,R=l1.getPxPosition(e,u),L,I;if(D.indexOf("toaxis")!==-1||D.indexOf("across")!==-1){if(D.indexOf("toaxis")!==-1&&(L=R,I=S),D.indexOf("across")!==-1){var B=u._counterDomainMin,O=u._counterDomainMax;u.anchor==="free"&&(B=Math.min(B,u.position),O=Math.max(O,u.position)),L=a.t+(1-O)*a.h,I=a.t+(1-B)*a.h}i.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:I,"stroke-width":F,stroke:P,"stroke-dasharray":s1.dashStyle(u.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:I,"stroke-width":F+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}D.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:E,cy:R-(u.side!=="top"?F:-F),r:F,fill:P}).classed("spikeline",!0)}}}function cAt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var i=r.length-1;i>=0;i--){var n=r[i],a=e._hoverdata[i];if(n.curveNumber!==a.curveNumber||String(n.pointNumber)!==String(a.pointNumber)||String(n.pointNumbers)!==String(a.pointNumbers)||n.binNumber!==a.binNumber)return!0}return!1}function lge(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function uge(e,t){return fd.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function fAt(e,t){for(var r=t.charAt(0),i=[],n=[],a=[],o=0;oe.offsetTop+e.clientTop,mge=e=>e.offsetLeft+e.clientLeft;function Fw(e,t){var r=e._fullLayout,i=t.getBoundingClientRect(),n=i.left,a=i.top,o=n+i.width,s=a+i.height,l=tl.apply3DTransform(r._invTransform)(n,a),u=tl.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var EA=W((R9r,yge)=>{"use strict";var hAt=it(),dAt=ni(),pAt=Kf().isUnifiedHover;yge.exports=function(t,r,i,n){n=n||{};var a=r.legend;function o(s){n.font[s]||(n.font[s]=a?r.legend.font[s]:r.font[s])}r&&pAt(r.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(n.bgcolor||(n.bgcolor=dAt.combine(r.legend.bgcolor,r.paper_bgcolor)),n.bordercolor||(n.bordercolor=r.legend.bordercolor)):n.bgcolor||(n.bgcolor=r.paper_bgcolor)),i("hoverlabel.bgcolor",n.bgcolor),i("hoverlabel.bordercolor",n.bordercolor),i("hoverlabel.namelength",n.namelength),i("hoverlabel.showarrow",n.showarrow),hAt.coerceFont(i,"hoverlabel.font",n.font),i("hoverlabel.align",n.align)}});var _ge=W((z9r,xge)=>{"use strict";var vAt=it(),gAt=EA(),mAt=sy();xge.exports=function(t,r){function i(n,a){return vAt.coerce(t,r,mAt,n,a)}gAt(t,r,i)}});var Tge=W((B9r,wge)=>{"use strict";var bge=it(),yAt=N3(),xAt=EA();wge.exports=function(t,r,i,n){function a(s,l){return bge.coerce(t,r,yAt,s,l)}var o=bge.extendFlat({},n.hoverlabel);r.hovertemplate&&(o.namelength=-1),xAt(t,r,a,o)}});var dH=W((q9r,Age)=>{"use strict";var _At=it(),bAt=sy();Age.exports=function(t,r){function i(n,a){return r[n]!==void 0?r[n]:_At.coerce(t,r,bAt,n,a)}return i("clickmode"),i("hoversubplots"),i("hoveranywhere"),i("clickanywhere"),i("hovermode")}});var Ege=W((O9r,Sge)=>{"use strict";var Mge=it(),wAt=sy(),TAt=dH(),AAt=EA();Sge.exports=function(t,r){function i(u,c){return Mge.coerce(t,r,wAt,u,c)}var n=TAt(t,r);n&&(i("hoverdistance"),i("spikedistance"),n.indexOf("unified")!==-1&&i("hoversort"));var a=i("dragmode");a==="select"&&i("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"),AAt(t,r,i),Mge.coerceFont(i,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Dge=W((N9r,Cge)=>{"use strict";var pH=it(),kge=yi();Cge.exports=function(t){var r=t.calcdata,i=t._fullLayout;function n(u){return function(c){return pH.coerceHoverinfo({hoverinfo:c},{_module:u._module},i)}}for(var a=0;a{"use strict";var SAt=yi(),Fge=Kf(),EAt=hH().hover;Lge.exports=function(t,r,i){var n=SAt.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;i!==void 0&&EAt(t,r,i,!0);function o(){var l,u,c,f,h,d;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&&Fge.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&Fge.c2dApply(t._hoverYAxes,t._hoverYVals)),(h=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(d=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),n&&n.then?n.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var Ds=W((V9r,zge)=>{"use strict";var kAt=vi(),a7=it(),CAt=bf(),kA=Kf(),Ige=sy(),Rge=hH();zge.exports={moduleType:"component",name:"fx",constants:P6(),schema:{layout:Ige},attributes:N3(),layoutAttributes:Ige,supplyLayoutGlobalDefaults:_ge(),supplyDefaults:Tge(),supplyLayoutDefaults:Ege(),calc:Dge(),getDistanceFunction:kA.getDistanceFunction,getClosest:kA.getClosest,inbox:kA.inbox,quadrature:kA.quadrature,appendArrayPointValue:kA.appendArrayPointValue,castHoverOption:FAt,castHoverinfo:LAt,hover:Rge.hover,unhover:CAt.unhover,loneHover:Rge.loneHover,loneUnhover:DAt,click:Pge()};function DAt(e){var t=a7.isD3Selection(e)?e:kAt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function FAt(e,t,r){return a7.castOption(e,t,"hoverlabel."+r)}function LAt(e,t,r){function i(n){return a7.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}return a7.castOption(e,r,"hoverinfo",i)}});var u1=W(zg=>{"use strict";zg.selectMode=function(e){return e==="lasso"||e==="select"};zg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};zg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};zg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};zg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};zg.selectingOrDrawing=function(e){return zg.freeMode(e)||zg.rectMode(e)}});var CA=W((H9r,Bge)=>{"use strict";Bge.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(i){i.regl&&i.regl.clear({color:!0,depth:!0})})}});var o7=W((j9r,qge)=>{"use strict";qge.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 l7=W(($9r,Oge)=>{"use strict";var s7=32;Oge.exports={CIRCLE_SIDES:s7,i000:0,i090:s7/4,i180:s7/2,i270:s7/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var u7=W((W9r,Uge)=>{"use strict";var PAt=it().strTranslate;function Nge(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 IAt(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 RAt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Nge(e,r[t])}}function zAt(e){return PAt(e.xaxis._offset,e.yaxis._offset)}Uge.exports={p2r:Nge,r2p:IAt,axValue:RAt,getTransform:zAt}});var Py=W(Bg=>{"use strict";var BAt=iG(),Hge=l7(),Pw=Hge.CIRCLE_SIDES,vH=Hge.SQRT2,jge=u7(),Vge=jge.p2r,Gge=jge.r2p,qAt=[0,3,4,5,6,1,2],OAt=[0,3,4,1,2];Bg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&l{"use strict";var $ge=Cs(),Kge=u1(),NAt=Kge.drawMode,UAt=Kge.openMode,Iw=l7(),Wge=Iw.i000,Yge=Iw.i090,Xge=Iw.i180,Zge=Iw.i270,VAt=Iw.cos45,GAt=Iw.sin45,Jge=u7(),f7=Jge.p2r,Iy=Jge.r2p,HAt=by(),jAt=HAt.clearOutline,h7=Py(),$At=h7.readPaths,WAt=h7.writePaths,YAt=h7.ellipseOver,XAt=h7.fixDatesForPaths;function ZAt(e,t){if(e.length){var r=e[0][0];if(r){var i=t.gd,n=t.isActiveShape,a=t.dragmode,o=(i.layout||{}).shapes||[];if(!NAt(a)&&n!==void 0){var s=i._fullLayout._activeShapeIndex;if(s{"use strict";var KAt=u1(),JAt=KAt.selectMode,QAt=by(),eMt=QAt.clearOutline,gH=Py(),tMt=gH.readPaths,rMt=gH.writePaths,iMt=gH.fixDatesForPaths;tme.exports=function(t,r){if(t.length){var i=t[0][0];if(i){var n=i.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!JAt(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";rme.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 zy=W(tc=>{"use strict";var f1=FA(),ime=it(),Ry=ji();tc.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};tc.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};tc.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};tc.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};tc.extractPathCoords=function(e,t,r){var i=[],n=e.match(f1.segmentRE);return n.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(f1.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=n[s].drawn!==void 0;return a+(l?1:0)},0)};tc.getDataToPixel=function(e,t,r,i,n){var a=e._fullLayout._size,o;if(t)if(n==="domain")o=function(l){return t._length*(i?1-l:l)+t._offset};else{var s=tc.shapePositionToRange(t);o=function(l){var u=c1(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=tc.decodeDate(o))}else i?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};tc.getPixelToData=function(e,t,r,i){var n=e._fullLayout._size,a;if(t)if(i==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=tc.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-n.t)/n.h}:a=function(s){return(s-n.l)/n.w};return a};tc.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,i=Math.round(e);return r?i+.5:i};tc.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?i._hadPlotinfo=!0:(i={},r.xref&&r.xref!=="paper"&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(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}};tc.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?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}};tc.getPathString=function(e,t){let r=t.type,i=Ry.getRefType(t.xref),n=Ry.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,p,v,m,g;function w(E,S,C,k){var D;if(E)if(S==="domain")k?D=function(F){return E._offset+E._length*(1-F)}:D=function(F){return E._offset+E._length*F};else{let F=tc.shapePositionToRange(E);D=function(P){return E._offset+E.r2p(F(P,!0))},C==="path"&&E.type==="date"&&(D=tc.decodeDate(D))}else k?D=function(F){return a.t+a.h*(1-F)}:D=function(F){return a.l+a.w*F};return D}if(i==="array"?(h=[],o=t.xref.map(function(E){return Ry.getFromId(e,E)}),h=t.xref.map(function(E,S){return w(o[S],Ry.getRefType(E),r,!1)})):(o=Ry.getFromId(e,t.xref),h=w(o,i,r,!1)),n==="array"?(d=[],s=t.yref.map(function(E){return Ry.getFromId(e,E)}),d=t.yref.map(function(E,S){return w(s[S],Ry.getRefType(E),r,!0)})):(s=Ry.getFromId(e,t.yref),d=w(s,n,r,!0)),r==="path")return nMt(t,h,d);if(i==="array")l=c1(o[0],t.x0shift),u=c1(o[1],t.x1shift),p=h[0](t.x0)+l,v=h[1](t.x1)+u;else if(l=c1(o,t.x0shift),u=c1(o,t.x1shift),t.xsizemode==="pixel"){let E=h(t.xanchor);p=E+t.x0+l,v=E+t.x1+u}else p=h(t.x0)+l,v=h(t.x1)+u;if(n==="array")c=c1(s[0],t.y0shift),f=c1(s[1],t.y1shift),m=d[0](t.y0)+c,g=d[1](t.y1)+f;else if(c=c1(s,t.y0shift),f=c1(s,t.y1shift),t.ysizemode==="pixel"){let E=d(t.yanchor);m=E-t.y0+c,g=E-t.y1+f}else m=d(t.y0)+c,g=d(t.y1)+f;if(r==="line")return"M"+p+","+m+"L"+v+","+g;if(r==="rect")return"M"+p+","+m+"H"+v+"V"+g+"H"+p+"Z";var b=(p+v)/2,_=(m+g)/2,M=Math.abs(b-p),x=Math.abs(_-m),T="A"+M+","+x,A=b+M+","+_,y=b+","+(_-x);return"M"+A+T+" 0 1,1 "+y+T+" 0 0,1 "+A+"Z"};function nMt(e,t,r){let i=e.path,n=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return i.replace(f1.segmentRE,function(h){var d=0,p=h.charAt(0),v=f1.paramIsX[p],m=f1.paramIsY[p],g=f1.numParams[p];let w=v.drawn!==void 0,b=m.drawn!==void 0,_=l?t[c]:t,M=u?r[f]:r;var x=h.slice(1).replace(f1.paramRE,function(T){return v[d]?n==="pixel"?T=_(o)+Number(T):T=_(T):m[d]&&(a==="pixel"?T=M(s)-Number(T):T=M(T)),d++,d>g&&(T="X"),T});return d>g&&(x=x.replace(/[\s,]*X.*/,""),ime.log("Ignoring extra params in segment "+h)),w&&c++,b&&f++,p+x})}tc.getPixelShift=c1;function c1(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 yH=W((Q9r,ome)=>{"use strict";var aMt=it(),h1=ji(),nme=uo(),ame=Ji(),oMt=Py().readPaths,f_=zy(),sMt=f_.getPathString,LA=GC(),lMt=Hl().FROM_TL;ome.exports=function(t,r,i,n){if(n.selectAll(".shape-label").remove(),!!(i.label.text||i.label.texttemplate)){var a;if(i.label.texttemplate){var o={};if(i.type!=="path"){var s=h1.getFromId(t,i.xref),l=h1.getFromId(t,i.yref);let O=Array.isArray(i.xref),$=Array.isArray(i.yref);for(var u in LA){var c=typeof LA[u]=="function",f=!O||LA.simpleXVariables.includes(u),h=!$||LA.simpleYVariables.includes(u);if(c&&f&&h){var d=LA[u](i,s,l);d!==void 0&&(o[u]=d)}}}a=aMt.texttemplateStringForShapes({data:[o],fallback:i.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:i.label.texttemplate})}else a=i.label.text;var p={"data-index":r},v=i.label.font,m={"data-notex":1},g=n.append("g").attr(p).classed("shape-label",!0),w=g.append("text").attr(m).classed("shape-label-text",!0).text(a),b,_,M,x;if(i.path){var T=sMt(t,i),A=oMt(T,t);b=1/0,M=1/0,_=-1/0,x=-1/0;for(var y=0;yf_.getDataToPixel(t,ce,te,!1,ge)(Q),G=(Q,te,ce,ge)=>f_.getDataToPixel(t,ce,te,!0,ge)(Q);if(i.xsizemode==="pixel"){let Q=H(i.xanchor,void 0,Y,J),te=f_.getPixelShift(Y,i.x0shift),ce=f_.getPixelShift(Y,i.x1shift);b=Q+i.x0+te,_=Q+i.x1+ce}else b=H(i.x0,i.x0shift,Y,J),_=H(i.x1,i.x1shift,K,U);if(i.ysizemode==="pixel"){let Q=G(i.yanchor,void 0,j,V),te=f_.getPixelShift(j,i.y0shift),ce=f_.getPixelShift(j,i.y1shift);M=Q-i.y0+te,x=Q-i.y1+ce}else M=G(i.y0,i.y0shift,j,V),x=G(i.y1,i.y1shift,q,X)}var F=i.label.textangle;F==="auto"&&(i.type==="line"?F=uMt(b,M,_,x):F=0),w.call(function(O){return O.call(ame.font,v).attr({}),nme.convertToTspans(O,t),O});var P=ame.bBox(w.node()),R=cMt(b,M,_,x,i,F,P),L=R.textx,I=R.texty,B=R.xanchor;w.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[B],y:I,x:L,transform:"rotate("+F+","+L+","+I+")"}).call(nme.positionText,L,I)}};function uMt(e,t,r,i){var n,a;return a=Math.abs(r-e),r>=e?n=t-i:n=i-t,-180/Math.PI*Math.atan2(n,a)}function cMt(e,t,r,i,n,a,o){var s=n.label.textposition,l=n.label.textangle,u=n.label.padding,c=n.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),p=n.label.xanchor,v=n.label.yanchor,m,g,w,b;if(c==="line"){s==="start"?(m=e,g=t):s==="end"?(m=r,g=i):(m=(e+r)/2,g=(t+i)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var fMt=it(),hMt=fMt.strTranslate,sme=bf(),cme=u1(),dMt=cme.drawMode,fme=cme.selectMode,hme=yi(),lme=ni(),v7=l7(),pMt=v7.i000,vMt=v7.i090,gMt=v7.i180,mMt=v7.i270,yMt=by(),dme=yMt.clearOutlineControllers,_H=Py(),p7=_H.pointsOnRectangle,xH=_H.pointsOnEllipse,xMt=_H.writePaths,_Mt=d7().newShapes,bMt=d7().createShapeObj,wMt=mH(),TMt=yH();pme.exports=function e(t,r,i,n){n||(n=0);var a=i.gd;function o(){e(t,r,i,n++),(xH(t[0])||i.hasText)&&s({redrawing:!0})}function s(R){var L={};i.isActiveShape!==void 0&&(i.isActiveShape=!1,L=_Mt(r,i)),i.isActiveSelection!==void 0&&(i.isActiveSelection=!1,L=wMt(r,i),a._fullLayout._reselect=!0),Object.keys(L).length&&hme.call((R||{}).redrawing?"relayout":"_guiRelayout",a,L)}var l=a._fullLayout,u=l._zoomlayer,c=i.dragmode,f=dMt(c),h=fme(c);(f||h)&&(a._fullLayout._outlining=!0),dme(a),r.attr("d",xMt(t));var d,p,v,m,g;if(!n&&(i.isActiveShape||i.isActiveSelection)){g=AMt([],t);var w=u.append("g").attr("class","outline-controllers");E(w),P()}if(f&&i.hasText){var b=u.select(".label-temp"),_=bMt(r,i,i.dragmode);TMt(a,"label-temp",_,b)}function M(R){v=+R.srcElement.getAttribute("data-i"),m=+R.srcElement.getAttribute("data-j"),d[v][m].moveFn=x}function x(R,L){if(t.length){var I=g[v][m][1],B=g[v][m][2],O=t[v],$=O.length;if(p7(O)){var Y=R,K=L;if(i.isActiveSelection){var j=ume(O,m);j[1]===O[m][1]?K=0:Y=0}for(var q=0;q<$;q++)if(q!==m){var J=O[q];J[1]===O[m][1]&&(J[1]=I+Y),J[2]===O[m][2]&&(J[2]=B+K)}if(O[m][1]=I+Y,O[m][2]=B+K,!p7(O))for(var U=0;U<$;U++)for(var V=0;V1&&!(R.length===2&&R[1][0]==="Z")&&(m===0&&(R[0][0]="M"),t[v]=R,o(),s())}}function y(R,L){if(R===2){v=+L.srcElement.getAttribute("data-i"),m=+L.srcElement.getAttribute("data-j");var I=t[v];!p7(I)&&!xH(I)&&A()}}function E(R){d=[];for(var L=0;L{"use strict";var SMt=vi(),_me=yi(),wH=it(),h_=ji(),EMt=Py().readPaths,kMt=g7(),y7=yH(),bme=by().clearOutlineControllers,bH=ni(),x7=Ji(),CMt=Da().arrayEditor,vme=bf(),gme=Ds(),mme=Np(),d_=FA(),Bh=zy(),TH=Bh.getPathString;Ame.exports={draw:AH,drawOne:wme,eraseActiveShape:IMt,drawLabel:y7};function AH(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 i=t._plots[r].shapelayer;i&&(i.selectAll("path").remove(),i.selectAll("text").remove())}for(var n=0;n{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=n(a);o&&gme.hover(e,o,r.id)}}),i.addEventListener("click",a=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=n(a);o&&gme.click(e,o,r.id)}})}function Tme(e,t,r){let i=r.xref,n=r.yref;if(Array.isArray(i)||Array.isArray(n)){let a="clip"+t._fullLayout._uid+"shape"+r._index,o=FMt(t,i,n);wH.ensureSingleById(t._fullLayout._clips,"clipPath",a,function(s){s.append("rect")}).select("rect").attr(o),x7.setClipUrl(e,a,t)}else{let a=(i+n).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");x7.setClipUrl(e,a?"clip"+t._fullLayout._uid+a:null,t)}}function FMt(e,t,r){let i=e._fullLayout._size;function n(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>h_.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[i.t,i.t+i.h]:[i.l,i.l+i.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=n(t,!1),o=n(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function LMt(e,t,r,i,n,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C=SMt.select(t.node().parentNode),k=h_.getFromId(e,r.xref),D=h_.getRefType(r.xref),F=h_.getFromId(e,r.yref),P=h_.getRefType(r.yref),R=r.x0shift,L=r.x1shift,I=r.y0shift,B=r.y1shift,O=function(he,oe){var Ee=Bh.getDataToPixel(e,k,oe,!1,D);return Ee(he)},$=function(he,oe){var Ee=Bh.getDataToPixel(e,F,oe,!0,P);return Ee(he)},Y=Bh.getPixelToData(e,k,!1,D),K=Bh.getPixelToData(e,F,!0,P),j=U(),q={element:j.node(),gd:e,prepFn:H,doneFn:G,clickFn:Q},J;vme.init(q),j.node().onmousemove=X;function U(){return c?V():t}function V(){var he=10,oe=Math.max(r.line.width,he),Ee=n.append("g").attr("data-index",i).attr("drag-helper",!0);Ee.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":oe,"stroke-opacity":"0"});var ye={"fill-opacity":"0"},ue=Math.max(oe/2,he);return Ee.append("circle").attr({"data-line-point":"start-point",cx:l?O(r.xanchor)+r.x0:O(r.x0,R),cy:u?$(r.yanchor)-r.y0:$(r.y0,I),r:ue}).style(ye).classed("cursor-grab",!0),Ee.append("circle").attr({"data-line-point":"end-point",cx:l?O(r.xanchor)+r.x1:O(r.x1,L),cy:u?$(r.yanchor)-r.y1:$(r.y1,B),r:ue}).style(ye).classed("cursor-grab",!0),Ee}function X(he){if(m7(e)){J=null;return}if(c)he.target.tagName==="path"?J="move":J=he.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var oe=q.element.getBoundingClientRect(),Ee=oe.right-oe.left,ye=oe.bottom-oe.top,ue=he.clientX-oe.left,ee=he.clientY-oe.top,ae=!f&&Ee>o&&ye>s&&!he.shiftKey?vme.getCursor(ue/Ee,1-ee/ye):"move";mme(t,ae),J=ae.split("-")[0]}}function H(he){m7(e)||(l&&(g=O(r.xanchor)),u&&(w=$(r.yanchor)),r.type==="path"?S=r.path:(d=l?r.x0:O(r.x0),p=u?r.y0:$(r.y0),v=l?r.x1:O(r.x1),m=u?r.y1:$(r.y1)),dm?(b=p,T="y0",_=m,A="y1"):(b=m,T="y1",_=p,A="y0"),X(he),ge(n,r),be(t,r,e),q.moveFn=J==="move"?te:ce,q.altKey=he.altKey)}function G(){m7(e)||(mme(t),Ce(n),Tme(t,e,r),_me.call("_guiRelayout",e,a.getUpdateObj()))}function Q(){m7(e)||Ce(n)}function te(he,oe){if(r.type==="path"){var Ee=function(ee){return ee},ye=Ee,ue=Ee;l?h("xanchor",r.xanchor=Y(g+he)):(ye=function(ae){return Y(O(ae)+he)},k&&k.type==="date"&&(ye=Bh.encodeDate(ye))),u?h("yanchor",r.yanchor=K(w+oe)):(ue=function(ae){return K($(ae)+oe)},F&&F.type==="date"&&(ue=Bh.encodeDate(ue))),h("path",r.path=yme(S,ye,ue))}else l?h("xanchor",r.xanchor=Y(g+he)):(h("x0",r.x0=Y(d+he)),h("x1",r.x1=Y(v+he))),u?h("yanchor",r.yanchor=K(w+oe)):(h("y0",r.y0=K(p+oe)),h("y1",r.y1=K(m+oe)));t.attr("d",TH(e,r)),ge(n,r),y7(e,i,r,C)}function ce(he,oe){if(f){var Ee=function(et){return et},ye=Ee,ue=Ee;l?h("xanchor",r.xanchor=Y(g+he)):(ye=function(_t){return Y(O(_t)+he)},k&&k.type==="date"&&(ye=Bh.encodeDate(ye))),u?h("yanchor",r.yanchor=K(w+oe)):(ue=function(_t){return K($(_t)+oe)},F&&F.type==="date"&&(ue=Bh.encodeDate(ue))),h("path",r.path=yme(S,ye,ue))}else if(c){if(J==="resize-over-start-point"){var ee=d+he,ae=u?p-oe:p+oe;h("x0",r.x0=l?ee:Y(ee)),h("y0",r.y0=u?ae:K(ae))}else if(J==="resize-over-end-point"){var xe=v+he,re=u?m-oe:m+oe;h("x1",r.x1=l?xe:Y(xe)),h("y1",r.y1=u?re:K(re))}}else{var pe=function(et){return J.indexOf(et)!==-1},we=pe("n"),Fe=pe("s"),Se=pe("w"),ke=pe("e"),_e=we?b+oe:b,Ie=Fe?_+oe:_,Oe=Se?M+he:M,Qe=ke?x+he:x;u&&(we&&(_e=b-oe),Fe&&(Ie=_-oe)),(!u&&Ie-_e>s||u&&_e-Ie>s)&&(h(T,r[T]=u?_e:K(_e)),h(A,r[A]=u?Ie:K(Ie))),Qe-Oe>o&&(h(y,r[y]=l?Oe:Y(Oe)),h(E,r[E]=l?Qe:Y(Qe)))}t.attr("d",TH(e,r)),ge(n,r),y7(e,i,r,C)}function ge(he,oe){(l||u)&&Ee();function Ee(){var ye=oe.type!=="path",ue=he.selectAll(".visual-cue").data([0]),ee=1;ue.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ee}).classed("visual-cue",!0);var ae=O(l?oe.xanchor:wH.midRange(ye?[oe.x0,oe.x1]:Bh.extractPathCoords(oe.path,d_.paramIsX))),xe=$(u?oe.yanchor:wH.midRange(ye?[oe.y0,oe.y1]:Bh.extractPathCoords(oe.path,d_.paramIsY)));if(ae=Bh.roundPositionForSharpStrokeRendering(ae,ee),xe=Bh.roundPositionForSharpStrokeRendering(xe,ee),l&&u){var re="M"+(ae-1-ee)+","+(xe-1-ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ue.attr("d",re)}else if(l){var pe="M"+(ae-1-ee)+","+(xe-9-ee)+"v18 h2 v-18 Z";ue.attr("d",pe)}else{var we="M"+(ae-9-ee)+","+(xe-1-ee)+"h18 v2 h-18 Z";ue.attr("d",we)}}}function Ce(he){he.selectAll(".visual-cue").remove()}function be(he,oe,Ee){var ye=oe.xref,ue=oe.yref,ee=h_.getFromId(Ee,ye),ae=h_.getFromId(Ee,ue),xe="";ye!=="paper"&&!ee.autorange&&(xe+=ye),ue!=="paper"&&!ae.autorange&&(xe+=ue),x7.setClipUrl(he,xe?"clip"+Ee._fullLayout._uid+xe:null,Ee)}}function yme(e,t,r){return e.replace(d_.segmentRE,function(i){var n=0,a=i.charAt(0),o=d_.paramIsX[a],s=d_.paramIsY[a],l=d_.numParams[a],u=i.slice(1).replace(d_.paramRE,function(c){return n>=l||(o[n]?c=t(c):s[n]&&(c=r(c)),n++),c});return a+u})}function PMt(e,t){if(_7(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeShapeIndex){xme(e);return}e._fullLayout._activeShapeIndex=i,e._fullLayout._deactivateShape=xme,AH(e)}}}function xme(e){if(_7(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(bme(e),delete e._fullLayout._activeShapeIndex,AH(e))}}function IMt(e){if(_7(e)){bme(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var Rw=it()._,RMt=function(e){return{DIALOG_TITLE:Rw(e,"Share chart"),DIALOG_MESSAGE_CLOUD:Rw(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:Rw(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:Rw(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:Rw(e,"Cancel"),DIALOG_CONFIRM:Rw(e,"Share")}};Mme.exports=RMt});var Cme=W((iPr,kme)=>{"use strict";var Eme=vi(),{dfltConfig:zMt}=cy(),BMt=Sme(),qMt=(e,t,r,i,n)=>{let a=BMt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(a.DIALOG_TITLE),r===zMt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=a.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],h=c[2],d=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(h),l.append("span").text(d),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(a.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=a.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),h=f[0],d=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(h),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(d)}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(a.DIALOG_CANCEL).on("click",n),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(a.DIALOG_CONFIRM).on("click",i)},OMt=(e,t,r)=>{let i=Eme.select(e._fullLayout._paperdiv.node());i.selectAll(".plotly-cloud-dialog").remove();let n=i.append("div").classed("plotly-cloud-dialog",!0),a=()=>{n.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&a()};document.addEventListener("keydown",o),n.on("click",()=>{Eme.event.target===n.node()&&a()}),qMt(e,n,t,()=>{a(),r()},a)};kme.exports=OMt});var EH=W((nPr,zme)=>{"use strict";var _0=yi(),NMt=Ko(),Fme=Cs(),Ya=o7(),UMt=b7().eraseActiveShape,VMt=Cme(),zw=it(),Ta=zw._,Xa=zme.exports={};Xa.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Ta(e,"Download plot as a PNG"):Ta(e,"Download plot")},icon:Ya.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};zw.notifier(Ta(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(i){i in t&&(r[i]=t[i])}),_0.call("downloadImage",e,r).then(function(i){zw.notifier(Ta(e,"Image download succeeded")+" - "+i,"long",e)}).catch(function(){zw.notifier(Ta(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};Xa.downloadJson={name:"downloadJson",title:function(e){return Ta(e,"Download plot as JSON")},icon:Ya.curlybraces,click:function(e){_0.call("downloadImage",e,{format:"full-json"}).then(function(t){zw.notifier(Ta(e,"JSON download succeeded")+" - "+t,"long",e)}).catch(function(){zw.notifier(Ta(e,"Sorry, there was a problem downloading your JSON file!"),"long",e)})}};Xa.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Ta(e,"Share chart...")},icon:Ya.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(n){console.error("Invalid plotlyServerURL: "+t);return}let i=["http:","https:"];if(!i.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${i.join(", ")}`);return}VMt(e,t,function(){NMt.sendDataToCloud(e,t)})}};Xa.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ta(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ya.zoombox,click:Tf};Xa.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ta(e,"Pan")},attr:"dragmode",val:"pan",icon:Ya.pan,click:Tf};Xa.select2d={name:"select2d",_cat:"select",title:function(e){return Ta(e,"Box Select")},attr:"dragmode",val:"select",icon:Ya.selectbox,click:Tf};Xa.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ta(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ya.lasso,click:Tf};Xa.drawclosedpath={name:"drawclosedpath",title:function(e){return Ta(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ya.drawclosedpath,click:Tf};Xa.drawopenpath={name:"drawopenpath",title:function(e){return Ta(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ya.drawopenpath,click:Tf};Xa.drawline={name:"drawline",title:function(e){return Ta(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ya.drawline,click:Tf};Xa.drawrect={name:"drawrect",title:function(e){return Ta(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ya.drawrect,click:Tf};Xa.drawcircle={name:"drawcircle",title:function(e){return Ta(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ya.drawcircle,click:Tf};Xa.eraseshape={name:"eraseshape",title:function(e){return Ta(e,"Erase active shape")},icon:Ya.eraseshape,click:UMt};Xa.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ta(e,"Zoom in")},attr:"zoom",val:"in",icon:Ya.zoom_plus,click:Tf};Xa.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ta(e,"Zoom out")},attr:"zoom",val:"out",icon:Ya.zoom_minus,click:Tf};Xa.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ta(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ya.autoscale,click:Tf};Xa.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ta(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ya.home,click:Tf};Xa.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ta(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ya.tooltip_basic,gravity:"ne",click:Tf};Xa.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ta(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ya.tooltip_compare,gravity:"ne",click:Tf};function Tf(e,t){var r=t.currentTarget,i=r.getAttribute("data-attr"),n=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Fme.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(i==="zoom"){var f=n==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,p,v;for(c=0;c-x),[v,m]=f.invert(c.midPt),{minscale:g}=u.projection,w=(s=u.projection.maxscale)!=null?s:1/0,b=Math.min(g,w),_=Math.max(g,w),M=n==="in"?Dme*h:1/Dme*h;M>_?M=_:M{"use strict";var Bme=EH(),$Mt=Object.keys(Bme),qme=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Ome=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(qme,["downloadJson"]),Bw=[],WMt=function(e){if(Ome.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Bw.indexOf(t)===-1&&Bw.push(t),Bw.indexOf(r)===-1&&Bw.push(r)}};$Mt.forEach(function(e){WMt(Bme[e])});Bw.sort();Nme.exports={DRAW_MODES:qme,backButtons:Ome,foreButtons:Bw}});var DH={};Fp(DH,{default:()=>XMt});var CH,YMt,XMt,FH=Ea(()=>{"use strict";CH=nd(kH()),YMt={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 *${CH.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 *${CH.default.foreButtons.join("*, *")}*.`].join(" ")}},XMt=YMt});var Vme=W((oPr,Ume)=>{"use strict";var ZMt=it(),PA=ni(),KMt=Da(),JMt=(FH(),Go(DH)).default;Ume.exports=function(t,r){var i=t.modebar||{},n=KMt.newContainer(r,"modebar");function a(s,l){return ZMt.coerce(i,n,JMt,s,l)}a("orientation"),a("bgcolor",PA.addOpacity(r.paper_bgcolor,.5));var o=PA.contrast(PA.rgb(r.modebar.bgcolor));a("color",PA.addOpacity(o,.3)),a("activecolor",PA.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var $me=W((sPr,jme)=>{"use strict";var LH=vi(),QMt=sn(),A7=it(),Gme=o7(),eSt=E6().version,tSt=new DOMParser;function Hme(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var d1=Hme.prototype;d1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,n="modebar-"+i._uid;this.element.setAttribute("id",n),this.element.setAttribute("role","toolbar"),this._uid=n,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=i.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.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"),i.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),A7.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};d1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var i=t.createGroup();r.forEach(function(n){var a=n.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(n);t.buttonElements.push(o),i.appendChild(o)}),t.element.appendChild(i)})};d1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};d1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;i===void 0?i=e.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&(r.setAttribute("data-title",i),r.setAttribute("aria-label",i)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),r.setAttribute("data-val",n));var a=e.click;if(typeof a!="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&&LH.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Gme.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};d1.createIcon=function(e){var t=QMt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",i;if(e.path){i=document.createElementNS(r,"svg"),i.setAttribute("viewBox",[0,0,e.width,t].join(" ")),i.setAttribute("class","icon");var n=document.createElementNS(r,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),i.appendChild(n)}if(e.svg){var a=tSt.parseFromString(e.svg,"application/xml");i=a.childNodes[0]}return i.setAttribute("height","1em"),i.setAttribute("width","1em"),i};d1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var n=i.getAttribute("data-val")||!0,a=i.getAttribute("data-attr"),o=i.getAttribute("data-toggle")==="true",s=LH.select(i),l=function(f,h){var d=t.modebar,p=f.querySelector(".icon path");p&&(h||f.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(i,u)}}else{var c=a===null?a:A7.nestedProperty(t,a).get();s.classed("active",c===n),l(i,c===n)}})};d1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var nSt=Cs(),Wme=$o(),PH=yi(),aSt=Kf().isUnifiedHover,oSt=$me(),M7=EH(),sSt=kH().DRAW_MODES,lSt=it().extendDeep;Yme.exports=function(t){var r=t._fullLayout,i=t._context,n=r._modeBar;if(!i.displayModeBar&&!i.watermark){n&&(n.destroy(),delete r._modeBar);return}if(!Array.isArray(i.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(i.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=i.modeBarButtons,o;Array.isArray(a)&&a.length?o=pSt(a):!i.displayModeBar&&i.watermark?o=[]:o=uSt(t),n?n.update(t,o):r._modeBar=oSt(t,o)};function uSt(e){var t=e._fullLayout,r=e._fullData,i=e._context;function n(L,I){if(typeof I=="string"){if(I.toLowerCase()===L.toLowerCase())return!0}else{var B=I.name,O=I._cat||I.name;if(B===L||O===L.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=i.modeBarButtonsToAdd.concat(a.filter(function(L){for(var I=0;I1?(y=["toggleHover"],E=["resetViews"]):f?(A=["zoomInGeo","zoomOutGeo"],y=["hoverClosestGeo"],E=["resetGeo"]):c?(y=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):v?(A=["zoomInMap","zoomOutMap"],y=["toggleHover"],E=["resetViewMap"]):h?y=["hoverClosestPie"]:w?(y=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):y=["toggleHover"],u&&y.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(hSt(r)||_)&&(y=[]),u&&!b&&(A=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?S=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||p?S=["zoom2d","pan2d"]:v||f?S=["pan2d"]:m&&(S=["zoom2d"]),fSt(r)&&S.push("select2d","lasso2d");var C=[],k=function(L){C.indexOf(L)===-1&&y.indexOf(L)!==-1&&C.push(L)};if(Array.isArray(s)){for(var D=[],F=0;F{"use strict";Zme.exports={moduleType:"component",name:"modebar",layoutAttributes:(FH(),Go(DH)).default,supplyLayoutDefaults:Vme(),manage:Xme()}});var RH=W((cPr,Kme)=>{"use strict";var vSt=Hl().FROM_BL;Kme.exports=function(t,r,i){i===void 0&&(i=vSt[t.constraintoward||"center"]);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=n[0]+(n[1]-n[0])*i;t.range=t._input.range=[t.l2r(a+(n[0]-a)*r),t.l2r(a+(n[1]-a)*r)],t.setScale()}});var v_=W(IA=>{"use strict";var p_=it(),zH=Op(),Up=Cs().id2name,gSt=ec(),Jme=RH(),mSt=i1(),ySt=Kn().ALMOST_EQUAL,xSt=Hl().FROM_BL;IA.handleDefaults=function(e,t,r){var i=r.axIds,n=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,p;for(s=0;sa?r.slice(a):i.slice(n))+o}function bSt(e,t){for(var r=t._size,i=r.h/r.w,n={},a=Object.keys(e),o=0;oySt*p&&!w)){for(a=0;aC&&BE&&(E=B);var $=(E-y)/(2*S);f/=$,y=l.l2r(y),E=l.l2r(E),l.range=l._input.range=x{"use strict";var E7=vi(),Af=yi(),b0=Ko(),hd=it(),OH=uo(),NH=CA(),RA=ni(),qw=Ji(),rye=e_(),sye=IH(),zA=ji(),qg=Hl(),lye=v_(),wSt=lye.enforce,TSt=lye.clean,iye=Op().doAutoRange,uye="start",ASt="middle",cye="end",MSt=Gl().zindexSeparator;Pu.layoutStyles=function(e){return hd.syncOrAsync([b0.doAutoMargin,ESt],e)};function SSt(e,t,r){for(var i=0;i=e[1]||n[1]<=e[0])&&a[0]t[0])return!0}return!1}function ESt(e){var t=e._fullLayout,r=t._size,i=r.p,n=zA.list(e,"",!0),a,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(qw.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Pu.drawMainTitle(e),sye.manage(e),!t._has("cartesian"))return b0.previousPromises(e);function f(H,G,Q){var te=H._lw/2;if(H._id.charAt(0)==="x"){if(G){if(Q==="top")return G._offset-i-te}else return r.t+r.h*(1-(H.position||0))+te%1;return G._offset+G._length+i+te}if(G){if(Q==="right")return G._offset+G._length+i+te}else return r.l+r.w*(H.position||0)+te%1;return G._offset-i-te}for(a=0;a0){FSt(e,a,u,l),s.attr({x:o,y:a,"text-anchor":i,dy:oye(t.yanchor)}).call(OH.positionText,o,a);var c=(t.text.match(OH.BR_TAG_ALL)||[]).length;if(c){var f=qg.LINE_SPACING*c+qg.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",m)})}var h=E7.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),p=d.y+d.height,v=p+rye.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:v,"text-anchor":i,dy:oye(t.yanchor)}).call(OH.positionText,o,v)}}}};function kSt(e,t,r,i,n){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=hd.isTopAnchor(t)?i:i-n,s=r==="b"?a-o:o;return hd.isTopAnchor(t)&&r==="t"||hd.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=CSt(a,i,n,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function FSt(e,t,r,i){var n="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&kSt(e,a,o,t,i)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[n]=l),b0.allowAutoMargin(e,n),b0.autoMargin(e,n,s)}function LSt(e,t){var r=e.title,i=e._size,n=0;return t===uye?n=r.pad.l:t===cye&&(n=-r.pad.r),r.xref==="paper"?i.l+i.w*r.x+n:e.width*r.x+n}function PSt(e,t){var r=e.title,i=e._size,n=0;return t==="0em"||!t?n=-r.pad.b:t===qg.CAP_SHIFT+"em"&&(n=r.pad.t),r.y==="auto"?i.t/2:r.yref==="paper"?i.t+i.h-i.h*r.y+n:e.height-e.height*r.y+n}function oye(e){return e==="top"?qg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":qg.MID_SHIFT+"em"}function ISt(e){var t=e.title,r=ASt;return hd.isRightAnchor(t)?r=cye:hd.isLeftAnchor(t)&&(r=uye),r}function RSt(e){var t=e.title,r="0em";return hd.isTopAnchor(t)?r=qg.CAP_SHIFT+"em":hd.isMiddleAnchor(t)&&(r=qg.MID_SHIFT+"em"),r}Pu.doTraceStyle=function(e){var t=e.calcdata,r=[],i;for(i=0;i{"use strict";var zSt=Py().readPaths,BSt=g7(),fye=by().clearOutlineControllers,UH=ni(),hye=Ji(),qSt=Da().arrayEditor,dye=zy(),OSt=dye.getPathString;vye.exports={draw:k7,drawOne:pye,activateLastSelection:VSt};function k7(e){var t=e._fullLayout;fye(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var i=t._plots[r].selectionLayer;i&&i.selectAll("path").remove()}for(var n=0;n=0;m--){var g=o.append("path").attr(l).style("opacity",m?.1:u).call(UH.stroke,f).call(UH.fill,c).call(hye.dashLine,m?"solid":d,m?4+h:h);if(NSt(g,e,i),p){var w=qSt(e.layout,"selections",i);g.style({cursor:"move"});var b={element:g.node(),plotinfo:n,gd:e,editHelpers:w,isActiveSelection:!0},_=zSt(s,e);BSt(_,g,b)}else g.style("pointer-events",m?"all":"none");v[m]=g}var M=v[0],x=v[1];x.node().addEventListener("click",function(){return USt(e,M)})}}function NSt(e,t,r){var i=r.xref+r.yref;hye.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}function USt(e,t){if(C7(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeSelectionIndex){VH(e);return}e._fullLayout._activeSelectionIndex=i,e._fullLayout._deactivateSelection=VH,k7(e)}}}function VSt(e){if(C7(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=VH,k7(e)}}function VH(e){if(C7(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(fye(e),delete e._fullLayout._activeSelectionIndex,k7(e))}}});var mye=W((pPr,gye)=>{function GSt(){var e,t=0,r=!1;function i(n,a){return e.list.push({type:n,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(n,a){return i("check",{seg1:n,seg2:a})},segmentChop:function(n,a){return i("div_seg",{seg:n,pt:a}),i("chop",{seg:n,pt:a})},statusRemove:function(n){return i("pop_seg",{seg:n})},segmentUpdate:function(n){return i("seg_update",{seg:n})},segmentNew:function(n,a){return i("new_seg",{seg:n,primary:a})},segmentRemove:function(n){return i("rem_seg",{seg:n})},tempStatus:function(n,a,o){return i("temp_status",{seg:n,above:a,below:o})},rewind:function(n){return i("rewind",{seg:n})},status:function(n,a,o){return i("status",{seg:n,above:a,below:o})},vert:function(n){return n===r?e:(r=n,i("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),i("log",{txt:n})},reset:function(){return i("reset")},selected:function(n){return i("selected",{segs:n})},chainStart:function(n){return i("chain_start",{seg:n})},chainRemoveHead:function(n,a){return i("chain_rem_head",{index:n,pt:a})},chainRemoveTail:function(n,a){return i("chain_rem_tail",{index:n,pt:a})},chainNew:function(n,a){return i("chain_new",{pt1:n,pt2:a})},chainMatch:function(n){return i("chain_match",{index:n})},chainClose:function(n){return i("chain_close",{index:n})},chainAddHead:function(n,a){return i("chain_add_head",{index:n,pt:a})},chainAddTail:function(n,a){return i("chain_add_tail",{index:n,pt:a})},chainConnect:function(n,a){return i("chain_con",{index1:n,index2:a})},chainReverse:function(n){return i("chain_rev",{index:n})},chainJoin:function(n,a){return i("chain_join",{index1:n,index2:a})},done:function(){return i("done")}},e}gye.exports=GSt});var xye=W((vPr,yye)=>{function HSt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,i,n){var a=i[0],o=i[1],s=n[0],l=n[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,i,n){var a=r[1]-i[1],o=n[0]-i[0],s=r[0]-i[0],l=n[1]-i[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,i){return Math.abs(r[0]-i[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-n>e&&(l=!l),o=c,s=f}return l}};return t}yye.exports=HSt});var bye=W((gPr,_ye)=>{var jSt={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 i=e.root,n=e.root.next;n!==null;){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;i!==null&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(n){return n.prev=r,n.next=i,r.next=n,i!==null&&(i.prev=n),n}}}};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}};_ye.exports=jSt});var Tye=W((mPr,wye)=>{var qA=bye();function $St(e,t,r){function i(p,v){return{id:r?r.segmentId():-1,start:p,end:v,myFill:{above:null,below:null},otherFill:null}}function n(p,v,m){return{id:r?r.segmentId():-1,start:p,end:v,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var a=qA.create();function o(p,v,m,g,w,b){var _=t.pointsCompare(v,w);return _!==0?_:t.pointsSame(m,b)?0:p!==g?p?1:-1:t.pointAboveOrOnLine(m,g?w:b,g?b:w)?1:-1}function s(p,v){a.insertBefore(p,function(m){var g=o(p.isStart,p.pt,v,m.isStart,m.pt,m.other.pt);return g<0})}function l(p,v){var m=qA.node({isStart:!0,pt:p.start,seg:p,primary:v,other:null,status:null});return s(m,p.end),m}function u(p,v,m){var g=qA.node({isStart:!1,pt:v.end,seg:v,primary:m,other:p,status:null});p.other=g,s(g,p.pt)}function c(p,v){var m=l(p,v);return u(m,p,v),m}function f(p,v){r&&r.segmentChop(p.seg,v),p.other.remove(),p.seg.end=v,p.other.pt=v,s(p.other,p.pt)}function h(p,v){var m=n(v,p.seg.end,p.seg);return f(p,v),c(m,p.primary)}function d(p,v){var m=qA.create();function g(F,P){var R=F.seg.start,L=F.seg.end,I=P.seg.start,B=P.seg.end;return t.pointsCollinear(R,I,B)?t.pointsCollinear(L,I,B)||t.pointAboveOrOnLine(L,I,B)?1:-1:t.pointAboveOrOnLine(R,I,B)?1:-1}function w(F){return m.findTransition(function(P){var R=g(F,P.ev);return R>0})}function b(F,P){var R=F.seg,L=P.seg,I=R.start,B=R.end,O=L.start,$=L.end;r&&r.checkIntersection(R,L);var Y=t.linesIntersect(I,B,O,$);if(Y===!1){if(!t.pointsCollinear(I,B,O)||t.pointsSame(I,$)||t.pointsSame(B,O))return!1;var K=t.pointsSame(I,O),j=t.pointsSame(B,$);if(K&&j)return P;var q=!K&&t.pointBetween(I,O,$),J=!j&&t.pointBetween(B,O,$);if(K)return J?h(P,B):h(F,$),P;q&&(j||(J?h(P,B):h(F,$)),h(P,I))}else Y.alongA===0&&(Y.alongB===-1?h(F,O):Y.alongB===0?h(F,Y.pt):Y.alongB===1&&h(F,$)),Y.alongB===0&&(Y.alongA===-1?h(P,I):Y.alongA===0?h(P,Y.pt):Y.alongA===1&&h(P,B));return!1}for(var _=[];!a.isEmpty();){var M=a.getHead();if(r&&r.vert(M.pt[0]),M.isStart){let F=function(){if(T){var P=b(M,T);if(P)return P}return A?b(M,A):!1};var D=F;r&&r.segmentNew(M.seg,M.primary);var x=w(M),T=x.before?x.before.ev:null,A=x.after?x.after.ev:null;r&&r.tempStatus(M.seg,T?T.seg:!1,A?A.seg:!1);var y=F();if(y){if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,E&&(y.seg.myFill.above=!y.seg.myFill.above)}else y.seg.otherFill=M.seg.myFill;r&&r.segmentUpdate(y.seg),M.other.remove(),M.remove()}if(a.getHead()!==M){r&&r.rewind(M.seg);continue}if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,A?M.seg.myFill.below=A.seg.myFill.above:M.seg.myFill.below=p,E?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var S;A?M.primary===A.primary?S=A.seg.otherFill.above:S=A.seg.myFill.above:S=M.primary?v:p,M.seg.otherFill={above:S,below:S}}r&&r.status(M.seg,T?T.seg:!1,A?A.seg:!1),M.other.status=x.insert(qA.node({ev:M}))}else{var C=M.status;if(C===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(C.prev)&&m.exists(C.next)&&b(C.prev.ev,C.next.ev),r&&r.statusRemove(C.ev.seg),C.remove(),!M.primary){var k=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=k}_.push(M.seg)}a.getHead().remove()}return r&&r.done(),_}return e?{addRegion:function(p){for(var v,m=p[p.length-1],g=0;g{function WSt(e,t,r){var i=[],n=[];return e.forEach(function(a){var o=a.start,s=a.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(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(D,F,P){return c.index=D,c.matches_head=F,c.matches_pt1=P,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function OA(e,t,r){var i=[];return e.forEach(function(n){var a=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);t[a]!==0&&i.push({id:r?r.segmentId():-1,start:n.start,end:n.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(i),i}var YSt={union:function(e,t){return OA(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return OA(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return OA(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return OA(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return OA(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Sye.exports=YSt});var Cye=W((_Pr,kye)=>{var XSt={toPolygon:function(e,t){function r(a){if(a.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(a[0]),l=1;l{var ZSt=mye(),KSt=xye(),Dye=Tye(),JSt=Mye(),NA=Eye(),Fye=Cye(),dd=!1,UA=KSt(),qh;qh={buildLog:function(e){return e===!0?dd=ZSt():e===!1&&(dd=!1),dd===!1?!1:dd.list},epsilon:function(e){return UA.epsilon(e)},segments:function(e){var t=Dye(!0,UA,dd);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Dye(!1,UA,dd);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:NA.union(e.combined,dd),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:NA.intersect(e.combined,dd),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:NA.difference(e.combined,dd),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:NA.differenceRev(e.combined,dd),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:NA.xor(e.combined,dd),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:JSt(e.segments,UA,dd),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Fye.toPolygon(qh,e)},polygonToGeoJSON:function(e){return Fye.fromPolygon(qh,UA,e)},union:function(e,t){return VA(e,t,qh.selectUnion)},intersect:function(e,t){return VA(e,t,qh.selectIntersect)},difference:function(e,t){return VA(e,t,qh.selectDifference)},differenceRev:function(e,t){return VA(e,t,qh.selectDifferenceRev)},xor:function(e,t){return VA(e,t,qh.selectXor)}};function VA(e,t,r){var i=qh.segments(e),n=qh.segments(t),a=qh.combine(i,n),o=r(a);return qh.polygon(o)}typeof window=="object"&&(window.PolyBool=qh);Lye.exports=qh});var Rye=W((wPr,Iye)=>{Iye.exports=function(t,r,i,n){var a=t[0],o=t[1],s=!1;i===void 0&&(i=0),n===void 0&&(n=r.length);for(var l=n-i,u=0,c=l-1;uo!=p>o&&a<(d-f)*(o-h)/(p-h)+f;v&&(s=!s)}return s}});var GA=W((TPr,zye)=>{"use strict";var HH=NC().dot,D7=Kn().BADNUM,F7=zye.exports={};F7.tester=function(t){var r=t.slice(),i=r[0][0],n=i,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sn||g===D7||go||v&&u(p))}function f(p,v){var m=p[0],g=p[1];if(m===D7||mn||g===D7||go)return!1;var w=r.length,b=r[0][0],_=r[0][1],M=0,x,T,A,y,E;for(x=1;xMath.max(T,b)||g>Math.max(A,_)))if(gs||Math.abs(HH(f,u))>n)return!0;return!1};F7.filter=function(t,r){var i=[t[0]],n=0,a=0;function o(l){t.push(l);var u=i.length,c=n;i.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:i}}});var qye=W((APr,Bye)=>{"use strict";Bye.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var o2e=W((MPr,a2e)=>{"use strict";var Oye=Pye(),QSt=Rye(),$A=yi(),eEt=Ji().dashStyle,HA=ni(),tEt=Ds(),rEt=Kf().makeEventData,KA=u1(),iEt=KA.freeMode,nEt=KA.rectMode,WA=KA.drawMode,YH=KA.openMode,XH=KA.selectMode,Nye=zy(),Uye=FA(),$ye=g7(),Wye=by().clearOutline,Yye=Py(),jH=Yye.handleEllipse,aEt=Yye.readPaths,oEt=d7().newShapes,sEt=mH(),lEt=GH().activateLastSelection,P7=it(),uEt=P7.sorterAsc,Xye=GA(),jA=QC(),pd=Cs().getFromId,cEt=CA(),fEt=BA().redrawReglTraces,I7=qye(),p1=I7.MINSELECT,hEt=Xye.filter,ZH=Xye.tester,KH=u7(),Vye=KH.p2r,dEt=KH.axValue,pEt=KH.getTransform;function JH(e){return e.subplot!==void 0}function vEt(e,t,r,i,n){var a=!JH(i),o=iEt(n),s=nEt(n),l=YH(n),u=WA(n),c=XH(n),f=n==="drawline",h=n==="drawcircle",d=f||h,p=i.gd,v=p._fullLayout,m=c&&v.newselection.mode==="immediate"&&a,g=v._zoomlayer,w=i.element.getBoundingClientRect(),b=i.plotinfo,_=pEt(b),M=t-w.left,x=r-w.top;v._calcInverseTransform(p);var T=P7.apply3DTransform(v._invTransform)(M,x);M=T[0],x=T[1];var A=v._invScaleX,y=v._invScaleY,E=M,S=x,C="M"+M+","+x,k=i.xaxes[0],D=i.yaxes[0],F=k._length,P=D._length,R=e.altKey&&!(WA(n)&&l),L,I,B,O,$,Y,K;Kye(e,p,i),o&&(L=hEt([[M,x]],I7.BENDPX));var j=g.selectAll("path.select-outline-"+b.id).data([1]),q=u?v.newshape:v.newselection;u&&(i.hasText=q.label.text||q.label.texttemplate);var J=u&&!l?q.fillcolor:"rgba(0,0,0,0)",U=q.line.color||(a?HA.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");j.enter().append("path").attr("class","select-outline select-outline-"+b.id).style({opacity:u?q.opacity/2:1,"stroke-dasharray":eEt(q.line.dash,q.line.width),"stroke-width":q.line.width+"px","shape-rendering":"crispEdges"}).call(HA.stroke,U).call(HA.fill,J).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",_).attr("d",C+"Z");var V=g.append("path").attr("class","zoombox-corners").style({fill:HA.background,stroke:HA.defaultLine,"stroke-width":1}).attr("transform",_).attr("d","M0,0Z");if(u&&i.hasText){var X=g.select(".label-temp");X.empty()&&(X=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var H=v._uid+I7.SELECTID,G=[],Q=R7(p,i.xaxes,i.yaxes,i.subplot);m&&!e.shiftKey&&(i._clearSubplotSelections=function(){if(a){var ce=k._id,ge=D._id;r2e(p,ce,ge,Q);for(var Ce=(p.layout||{}).selections||[],be=[],he=!1,oe=0;oe=0){p._fullLayout._deactivateShape(p);return}if(!u){var Ce=v.clickmode;jA.done(H).then(function(){if(jA.clear(H),ce===2){for(j.remove(),$=0;$-1&&Zye(ge,p,i.xaxes,i.yaxes,i.subplot,i,j),Ce==="event"&&ZA(p,void 0);tEt.click(p,ge,b.id)}).catch(P7.error)}},i.doneFn=function(){V.remove(),jA.done(H).then(function(){jA.clear(H),!m&&O&&i.selectionDefs&&(O.subtract=R,i.selectionDefs.push(O),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,B)),(m||u)&&YA(i,m),i.doneFnCompleted&&i.doneFnCompleted(G),c&&ZA(p,K)}).catch(P7.error)}}function Zye(e,t,r,i,n,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,p,v,m,g,w,b,_,M;if(_Et(s)){Kye(e,t,a),h=R7(t,r,i,n);var x=bEt(s,h),T=x.pointNumbers.length>0;if(T?wEt(h,x):TEt(h)&&(w=Hye(x))){for(o&&o.remove(),M=0;M=0}function xEt(e){return e._fullLayout._activeSelectionIndex>=0}function YA(e,t){var r=e.dragmode,i=e.plotinfo,n=e.gd;yEt(n)&&n._fullLayout._deactivateShape(n),xEt(n)&&n._fullLayout._deactivateSelection(n);var a=n._fullLayout,o=a._zoomlayer,s=WA(r),l=XH(r);if(s||l){var u=o.selectAll(".select-outline-"+i.id);if(u&&n._fullLayout._outlining){var c;s&&(c=oEt(u,e)),c&&$A.call("_guiRelayout",n,{shapes:c});var f;l&&!JH(e)&&(f=sEt(u,e)),f&&(n._fullLayout._noEmitSelectedAtStart=!0,$A.call("_guiRelayout",n,{selections:f}).then(function(){t&&lEt(n)})),n._fullLayout._outlining=!1}}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function Gye(e){return e._id}function R7(e,t,r,i){if(!e.calcdata)return[];var n=[],a=t.map(Gye),o=r.map(Gye),s,l,u;for(u=0;u0,a=n?i[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function wEt(e,t){var r=[],i,n,a,o;for(o=0;o0&&r.push(i);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(n=t.searchInfo.cd[0].trace,n.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=i.selectedpoints.length,t>1)))return!1;return t===1}function XA(e,t,r){var i,n;for(i=0;i-1&&t;if(!o&&t){var ce=jye(e,!0);if(ce.length){var ge=ce[0].xref,Ce=ce[0].yref;if(ge&&Ce){var be=i2e(ce),he=n2e([pd(e,ge,"x"),pd(e,Ce,"y")]);he(G,be)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:te&&ZA(e,G),h._reselect=!1}if(!o&&h._deselect){var oe=h._deselect;s=oe.xref,l=oe.yref,SEt(s,l,c)||r2e(e,s,l,i),te&&(G.points.length?ZA(e,G):tj(e)),h._deselect=!1}return{eventData:G,selectionTesters:r}}function MEt(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";s2e.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 JA=W((EPr,l2e)=>{"use strict";l2e.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 qy=W((CPr,f2e)=>{"use strict";var u2e=rj(),c2e=Ho(),z7=Gl(),FEt=Da().templatedArray,kPr=JA();f2e.exports=FEt("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:c2e({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:u2e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:u2e.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",z7.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",z7.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",z7.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",z7.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:c2e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var v1=W((DPr,h2e)=>{"use strict";h2e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var g1=W((FPr,d2e)=>{"use strict";d2e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ns=W((LPr,b2e)=>{"use strict";var p2e=_s().axisHoverFormat,{hovertemplateAttrs:LEt,texttemplateAttrs:PEt,templatefallbackAttrs:v2e}=Ga(),g2e=Eo(),IEt=Ho(),m2e=Du().dash,REt=Du().pattern,zEt=Ji(),BEt=v1(),QA=tn().extendFlat,qEt=g1();function y2e(e){return{valType:"any",dflt:0,editType:"calc"}}function x2e(e){return{valType:"any",editType:"calc"}}function _2e(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}b2e.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:y2e("x"),yperiod:y2e("y"),xperiod0:x2e("x0"),yperiod0:x2e("y0"),xperiodalignment:_2e("x"),yperiodalignment:_2e("y"),xhoverformat:p2e("x"),yhoverformat:p2e("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:PEt(),texttemplatefallback:v2e({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:LEt({},{keys:BEt.eventDataKeys}),hovertemplatefallback:v2e(),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:QA({},m2e,{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:qEt(!0),fillgradient:QA({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:REt,marker:QA({symbol:{valType:"enumerated",values:zEt.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:QA({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:QA({},m2e,{arrayOk:!0}),editType:"calc"},g2e("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"},g2e("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:IEt({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var ij=W((IPr,A2e)=>{"use strict";var w2e=qy(),T2e=Ns().line,OEt=Du().dash,B7=tn().extendFlat,NEt=ls().overrideAll,UEt=Da().templatedArray,PPr=JA();A2e.exports=NEt(UEt("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:B7({},w2e.xref,{}),yref:B7({},w2e.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:T2e.color,width:B7({},T2e.width,{min:1,dflt:1}),dash:B7({},OEt,{dflt:"dot"})}}),"arraydraw","from-root")});var k2e=W((RPr,E2e)=>{"use strict";var M2e=it(),q7=ji(),VEt=Xc(),GEt=ij(),S2e=zy();E2e.exports=function(t,r){VEt(t,r,{name:"selections",handleItemDefaults:HEt});for(var i=r.selections,n=0;n{"use strict";C2e.exports=function(t,r,i){i("newselection.mode");var n=i("newselection.line.width");n&&(i("newselection.line.color"),i("newselection.line.dash")),i("activeselection.fillcolor"),i("activeselection.opacity")}});var eM=W((BPr,P2e)=>{"use strict";var jEt=yi(),F2e=it(),L2e=Cs();P2e.exports=function(t){return function(i,n){var a=i[t];if(Array.isArray(a))for(var o=jEt.subplotsRegistry.cartesian,s=o.idRegex,l=n._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var I2e=GH(),tM=o2e();R2e.exports={moduleType:"component",name:"selections",layoutAttributes:ij(),supplyLayoutDefaults:k2e(),supplyDrawNewSelectionDefaults:D2e(),includeBasePlot:eM()("selections"),draw:I2e.draw,drawOne:I2e.drawOne,reselect:tM.reselect,prepSelect:tM.prepSelect,clearOutline:tM.clearOutline,clearSelectionsCache:tM.clearSelectionsCache,selectOnClick:tM.selectOnClick}});var fj=W((OPr,exe)=>{"use strict";var uj=vi(),vd=it(),z2e=vd.numberFormat,$Et=XD(),O7=yi(),H2e=vd.strTranslate,WEt=uo(),aj=ni(),Oy=Ji(),YEt=Ds(),B2e=ji(),XEt=Np(),ZEt=bf(),j2e=u1(),N7=j2e.selectingOrDrawing,KEt=j2e.freeMode,JEt=Hl().FROM_TL,QEt=CA(),ekt=BA().redrawReglTraces,tkt=Ko(),oj=Cs().getFromId,rkt=cu().prepSelect,ikt=cu().clearOutline,nkt=cu().selectOnClick,nj=RH(),cj=Gl(),q2e=cj.MINDRAG,Qf=cj.MINZOOM,O2e=!0;function akt(e,t,r,i,n,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k,D,F,P,R;r+=t.yaxis._shift;function L(){if(f=t.xaxis,h=t.yaxis,b=f._length,_=h._length,g=f._offset,w=h._offset,d={},d[f._id]=f,p={},p[h._id]=h,o&&s)for(var ke=t.overlays,_e=0;_e=0){Ie._fullLayout._deactivateShape(Ie);return}var Oe=Ie._fullLayout.clickmode;if(lj(Ie),ke===2&&!c&&xe(),u)Oe.indexOf("select")>-1&&nkt(_e,Ie,v,m,t.id,O),Oe.indexOf("event")>-1&&YEt.click(Ie,_e,t.id);else if(ke===1&&c){var Qe=o?h:f,et=o==="s"||s==="w"?0:1,_t=Qe._name+".range["+et+"]",ut=okt(Qe,et),vt="left",Xe="middle";if(Qe.fixedrange)return;o?(Xe=o==="n"?"top":"bottom",Qe.side==="right"&&(vt="right")):s==="e"&&(vt="right"),Ie._context.showAxisRangeEntryBoxes&&uj.select(B).call(WEt.makeEditable,{gd:Ie,immediate:!0,background:Ie._fullLayout.paper_bgcolor,text:String(ut),fill:Qe.tickfont?Qe.tickfont.color:"#444",horizontalAlign:vt,verticalAlign:Xe}).on("edit",function(mt){var bt=Qe.d2r(mt);bt!==void 0&&O7.call("_guiRelayout",Ie,_t,bt)})}}ZEt.init(O);var K,j,q,J,U,V,X,H,G,Q;function te(ke,_e,Ie){var Oe=B.getBoundingClientRect();K=_e-Oe.left,j=Ie-Oe.top,e._fullLayout._calcInverseTransform(e);var Qe=vd.apply3DTransform(e._fullLayout._invTransform)(K,j);K=Qe[0],j=Qe[1],q={l:K,r:K,w:0,t:j,b:j,h:0},J=e._hmpixcount?e._hmlumcount/e._hmpixcount:aj.luminosity(e._fullLayout.plot_bgcolor),U="M0,0H"+b+"V"+_+"H0V0",V=!1,X="xy",Q=!1,H=Y2e(l,J,g,w,U),G=X2e(l,g,w)}function ce(ke,_e){if(e._transitioningWithDuration)return!1;var Ie=Math.max(0,Math.min(b,P*ke+K)),Oe=Math.max(0,Math.min(_,R*_e+j)),Qe=Math.abs(Ie-K),et=Math.abs(Oe-j);q.l=Math.min(K,Ie),q.r=Math.max(K,Ie),q.t=Math.min(j,Oe),q.b=Math.max(j,Oe);function _t(){X="",q.r=q.l,q.t=q.b,G.attr("d","M0,0Z")}if(M.isSubplotConstrained)Qe>Qf||et>Qf?(X="xy",Qe/b>et/_?(et=Qe*_/b,j>Oe?q.t=j-et:q.b=j+et):(Qe=et*b/_,K>Ie?q.l=K-Qe:q.r=K+Qe),G.attr("d",U7(q))):_t();else if(x.isSubplotConstrained)if(Qe>Qf||et>Qf){X="xy";var ut=Math.min(q.l/b,(_-q.b)/_),vt=Math.max(q.r/b,(_-q.t)/_);q.l=ut*b,q.r=vt*b,q.b=(1-ut)*_,q.t=(1-vt)*_,G.attr("d",U7(q))}else _t();else!A||et0){var mt;if(x.isSubplotConstrained||!T&&A.length===1){for(mt=0;mt1&&(_t.maxallowed!==void 0&&E===(_t.range[0]<_t.range[1]?"e":"w")||_t.minallowed!==void 0&&E===(_t.range[0]<_t.range[1]?"w":"e"))&&(Ge=1,Re=0),Ue?(je=bt,Ve=o||x.isSubplotConstrained?ke[1]:Se(ut,je)):x.yaHash[ut._id]?(je=bt,Ve=ke[1]*ut._length/h._length):x.xaHash[ut._id]?(je=mt,Ve=T==="ew"?-ke[0]*ut._length/f._length:Se(ut,je,{e:"right",w:"left"}[T])):(je=we(ut,mt,bt),Ve=Fe(ut,je)),je>1&&(ut.maxallowed!==void 0&&S===(ut.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function lkt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Y2e(e,t,r,i,n){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",H2e(r,i)).attr("d",n+"Z")}function X2e(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:aj.background,stroke:aj.defaultLine,"stroke-width":1,opacity:0}).attr("transform",H2e(t,r)).attr("d","M0,0Z")}function Z2e(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"),K2e(e,t,n,a)}function K2e(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 lj(e){uj.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function J2e(e){O2e&&e.data&&e._context.showTips&&(vd.notifier(vd._(e,"Double-click to zoom back out"),"long",e),O2e=!1)}function ukt(e,t){return"M"+(e.l-.5)+","+(t-Qf-.5)+"h-3v"+(2*Qf+1)+"h3ZM"+(e.r+.5)+","+(t-Qf-.5)+"h3v"+(2*Qf+1)+"h-3Z"}function ckt(e,t){return"M"+(t-Qf-.5)+","+(e.t-.5)+"v-3h"+(2*Qf+1)+"v3ZM"+(t-Qf-.5)+","+(e.b+.5)+"v3h"+(2*Qf+1)+"v-3Z"}function U7(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,Qf)/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 V2e(e,t,r,i,n){for(var a=!1,o={},s={},l,u,c,f,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var fkt=vi(),V7=Ds(),hkt=bf(),dkt=Np(),Vp=fj().makeDragBox,Iu=Gl().DRAGGERSIZE;G7.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){fkt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var i=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.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[a].mainplot?1:-1});i.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Vp(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&V7.hover(t,h,a)},V7.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,hkt.unhover(t,h))},t._context.showAxisDragHandles&&(Vp(t,o,s._offset-Iu,l._offset-Iu,Iu,Iu,"n","w"),Vp(t,o,s._offset+s._length,l._offset-Iu,Iu,Iu,"n","e"),Vp(t,o,s._offset-Iu,l._offset+l._length,Iu,Iu,"s","w"),Vp(t,o,s._offset+s._length,l._offset+l._length,Iu,Iu,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=Iu),Vp(t,o,s._offset+s._length*.1,c,s._length*.8,Iu,"","ew"),Vp(t,o,s._offset,c,s._length*.1,Iu,"","w"),Vp(t,o,s._offset+s._length*.9,c,s._length*.1,Iu,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=Iu),Vp(t,o,f,l._offset+l._length*.1,Iu,l._length*.8,"ns",""),Vp(t,o,f,l._offset+l._length*.9,Iu,l._length*.1,"s",""),Vp(t,o,f,l._offset,Iu,l._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(a){a.target=t._fullLayout._lasthover,V7.hover(t,a,r._hoversubplot)},n.onclick=function(a){a.target=t._fullLayout._lasthover,V7.click(t,a)},n.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},G7.updateFx(t)}};G7.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";dkt(t._draggers,r)}});var ixe=W((UPr,rxe)=>{"use strict";var txe=yi();rxe.exports=function(t){for(var r=txe.layoutArrayContainers,i=txe.layoutArrayRegexes,n=t.split("[")[0],a,o,s=0;s{"use strict";var pkt=oy(),dj=OC(),rM=Eg(),vkt=ZC().sorterAsc,pj=yi();iM.containerArrayMatch=ixe();var gkt=iM.isAddVal=function(t){return t==="add"||pkt(t)},nxe=iM.isRemoveVal=function(t){return t===null||t==="remove"};iM.applyContainerArrayChanges=function(t,r,i,n,a){var o=r.astr,s=pj.getComponentMethod(o,"supplyLayoutDefaults"),l=pj.getComponentMethod(o,"draw"),u=pj.getComponentMethod(o,"drawOne"),c=n.replot||n.recalc||s===dj||l===dj,f=t.layout,h=t._fullLayout;if(i[""]){Object.keys(i).length>1&&rM.warn("Full array edits are incompatible with other edits",o);var d=i[""][""];if(nxe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return rM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var p=Object.keys(i).map(Number).sort(vkt),v=r.get(),m=v||[],g=a(h,o).get(),w=[],b=-1,_=m.length,M,x,T,A,y,E,S,C;for(M=0;Mm.length-(S?0:1)){rM.warn("index out of range",o,T);continue}if(E!==void 0)y.length>1&&rM.warn("Insertion & removal are incompatible with edits to the same index.",o,T),nxe(E)?w.push(T):S?(E==="add"&&(E={}),m.splice(T,0,E),g&&g.splice(T,0,{})):rM.warn("Unrecognized full object edit value",o,T,E),b===-1&&(b=T);else for(x=0;x=0;M--)m.splice(w[M],1),g&&g.splice(w[M],1);if(m.length?v||r.set(m):r.set(null),c)return!1;if(s(f,h),u!==dj){var k;if(b===-1)k=p;else{for(_=Math.max(m.length,_),k=[],M=0;M=b));M++)k.push(T);for(M=b;M<_;M++)k.push(M)}for(M=0;M{"use strict";var uxe=sn(),cxe=yi(),Mf=it(),nM=Ko(),fxe=Cs(),aM=fxe.cleanId,mkt=fxe.getFromTrace,vj=cxe.traceIs,ykt=["x","y","z"];gd.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Mf.log("Clearing previous rejected promises from queue."),e._promises=[]};gd.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 i=(nM.subplotsRegistry.cartesian||{}).attrRegex,n=(nM.subplotsRegistry.polar||{}).attrRegex,a=(nM.subplotsRegistry.ternary||{}).attrRegex,o=(nM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&gd.cleanLayout(e.template.layout),e};function Ow(e,t,r=!1){var i=e[t],n=t.charAt(0);r&&Array.isArray(i)||i&&i!=="paper"&&(e[t]=aM(i,n,!0))}gd.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}gd.hasParent=function(e,t){for(var r=lxe(t);r;){if(r in e)return!0;r=lxe(r)}return!1};gd.clearAxisTypes=function(e,t,r){for(var i=0;i{let r=(...i)=>i.every(n=>Mf.isPlainObject(n))||i.every(n=>Array.isArray(n));if([e,t].every(i=>Array.isArray(i))){if(e.length!==t.length)return!1;for(let i=0;iMf.isPlainObject(i))){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)?gj(n,a):!1))return!1}return!0}return!1};gd.collectionsAreEqual=gj});var rF=W(Fa=>{"use strict";var W7=vi(),bkt=sn(),wkt=AV(),fi=it(),Qo=fi.nestedProperty,xj=lw(),eh=J0e(),md=yi(),eF=fw(),Fn=Ko(),Sf=ji(),Tkt=UG(),Akt=ec(),mj=Ji(),Mkt=ni(),Skt=hj().initInteractions,Ekt=sd(),kkt=cu().clearOutline,mxe=cy().dfltConfig,j7=axe(),Fl=hxe(),vo=BA(),Ny=ls(),Ckt=Gl().AX_NAME_PATTERN,yj=0,dxe=5;function Dkt(e,t,r,i){var n;if(e=fi.getGraphDiv(e),xj.init(e),fi.isPlainObject(t)){var a=t;t=a.data,r=a.layout,i=a.config,n=a.frames}var o=xj.triggerHandler(e,"plotly_beforeplot",[t,r,i]);if(o===!1)return Promise.reject();!t&&!r&&!fi.isPlotDiv(e)&&fi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(n)return Fa.addFrames(e,n)}xxe(e,i),r||(r={}),W7.select(e).classed("js-plotly-plot",!0),mj.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Fl.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=Fl.cleanLayout(r)),Fn.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(Qkt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),mj.initGradients(e),mj.initPatterns(e),l&&Sf.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Fn.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new 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 new Error("each index in "+r+" must be unique.")}}function _xe(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]),X7(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&X7(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Rkt(e,t,r){var i,n;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]),i=0;i=0&&c=0&&c0&&typeof A.parts[S]!="string";)S--;var C=A.parts[S],k=A.parts[S-1]+"."+C,D=A.parts.slice(0,S).join("."),F=Qo(e.layout,D).get(),P=Qo(i,D).get(),R=A.get();if(y!==void 0){g[T]=y,w[T]=C==="reverse"?y:Og(R);var L=eF.getLayoutValObject(i,A.parts);if(L&&L.impliedEdits&&y!==null)for(var I in L.impliedEdits)b(fi.relativeAttr(T,I),L.impliedEdits[I]);if(["width","height"].indexOf(T)!==-1)if(y){b("autosize",null);var B=T==="height"?"width":"height";b(B,i[B])}else i[T]=e._initialAutoSize[T];else if(T==="autosize")b("width",y?null:i.width),b("height",y?null:i.height);else if(k.match(Cxe))x(k),Qo(i,D+"._inputRange").set(null);else if(k.match(Dxe)){x(k),Qo(i,D+"._inputRange").set(null);var O=Qo(i,D).get();O._inputDomain&&(O._input.domain=O._inputDomain.slice())}else k.match(Okt)&&Qo(i,D+"._inputDomain").set(null);if(C==="type"){M=F;var $=P.type==="linear"&&y==="log",Y=P.type==="log"&&y==="linear";if($||Y){if(!M||!M.range)b(D+".autorange",!0);else if(P.autorange)$&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var K=M.range[0],j=M.range[1];$?(K<=0&&j<=0&&b(D+".autorange",!0),K<=0?K=j/1e6:j<=0&&(j=K/1e6),b(D+".range[0]",Math.log(K)/Math.LN10),b(D+".range[1]",Math.log(j)/Math.LN10)):(b(D+".range[0]",Math.pow(10,K)),b(D+".range[1]",Math.pow(10,j)))}Array.isArray(i._subplots.polar)&&i._subplots.polar.length&&i[A.parts[0]]&&A.parts[1]==="radialaxis"&&delete i[A.parts[0]]._subplot.viewInitial["radialaxis.range"],md.getComponentMethod("annotations","convertCoords")(e,P,y,b),md.getComponentMethod("images","convertCoords")(e,P,y,b)}else b(D+".autorange",!0),b(D+".range",null);Qo(i,D+"._inputRange").set(null)}else if(C.match(Ckt)){var q=Qo(i,T).get(),J=(y||{}).type;(!J||J==="-")&&(J="linear"),md.getComponentMethod("annotations","convertCoords")(e,q,J,b),md.getComponentMethod("images","convertCoords")(e,q,J,b)}var U=j7.containerArrayMatch(T);if(U){c=U.array,f=U.index;var V=U.property,X=L||{editType:"calc"};f!==""&&V===""&&(j7.isAddVal(y)?w[T]=null:j7.isRemoveVal(y)?w[T]=(Qo(r,c).get()||[])[f]:fi.warn("unrecognized full object value",t)),Ny.update(m,X),u[c]||(u[c]={});var H=u[c][f];H||(H=u[c][f]={}),H[V]=y,delete t[T]}else C==="reverse"?(F.range?F.range.reverse():(b(D+".autorange",!0),F.range=[1,0]),P.autorange?m.calc=!0:m.plot=!0):(T==="dragmode"&&(y===!1&&R!==!1||y!==!1&&R===!1)||i._has("scatter-like")&&i._has("regl")&&T==="dragmode"&&(y==="lasso"||y==="select")&&!(R==="lasso"||R==="select")?m.plot=!0:L?Ny.update(m,L):m.calc=!0,A.set(y))}}for(c in u){var G=j7.applyContainerArrayChanges(e,a(r,c),u[c],m,a);G||(m.plot=!0)}for(var Q in _){M=Sf.getFromId(e,Q);var te=M&&M._constraintGroup;if(te){m.calc=!0;for(var ce in te)_[ce]||(Sf.getFromId(e,ce)._constraintShrinkable=!0)}}(Lxe(e)||t.height||t.width)&&(m.plot=!0);var ge=i.shapes;for(f=0;f1;)if(i.pop(),r=Qo(t,i.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Vkt(e,t){for(var r=0;r[D,e._ev.listeners(D)]);a=Fa.newPlot(e,t,r,i).then(()=>{for(let[D,F]of k)F.forEach(P=>e.on(D,P));return Fa.react(e,t,r,i)})}else{e.data=t||[],Fl.cleanData(e.data),e.layout=r||{},Fl.cleanLayout(e.layout),Hkt(e.data,e.layout,s,l),Fn.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,p=h.transition,v=Wkt(e,l,h,d,p),m=v.newDataRevision,g=$kt(e,s,f,d,p,m);if(Lxe(e)&&(v.layoutReplot=!0),g.calc||v.calc){e.calcdata=void 0;for(var w=Object.getOwnPropertyNames(h),b=0;b(c||e.emit("plotly_react",{config:i,data:t,layout:r}),e))}function $kt(e,t,r,i,n,a){var o=t.length===r.length;if(!n&&!o)return{fullReplot:!0,calc:!0};var s=Ny.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var p=eF.getTraceValObject(u,d);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:i,transition:n,newDataRevision:a,gd:e},h={};for(l=0;l=n.length?n[0]:n[u]:n}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(i._frameQueue.length!==0){for(;i._frameQueue.length;){var C=i._frameQueue.pop();C.onInterrupt&&C.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(C){if(C.length!==0){for(var k=0;ki._timeToNext&&p()};C()}var m=0;function g(C){return Array.isArray(n)?m>=n.length?C.transitionOpts=n[m]:C.transitionOpts=n[0]:C.transitionOpts=n,m++,C}var w,b,_=[],M=t==null,x=Array.isArray(t),T=!M&&!x&&fi.isPlainObject(t);if(T)_.push({type:"object",data:g(fi.extendFlat({},t))});else if(M||["string","number"].indexOf(typeof t)!==-1)for(w=0;w0&&E<_.length-1){var S=[];for(w=0;w<_.length;w++)b=_[w],(_[w].type!=="byname"||w>E)&&S.push(b);_=S}}_.length>0?h(_):(e.emit("plotly_animated"),u())})}function Xkt(e,t,r){if(e=fi.getGraphDiv(e),t==null)return Promise.resolve();if(!fi.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 i,n,a,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(i=t.length-1;i>=0;i--)if(fi.isPlainObject(t[i])){var h=t[i].name,d=(l[h]||f[h]||{}).name,p=t[i].name,v=l[d]||f[d];d&&p&&typeof p=="number"&&v&&yjA.index?-1:T.index=0;i--){if(n=c[i].frame,typeof n.name=="number"&&fi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;l[n.name="frame "+e._transitionData._counter++];);if(l[n.name]){for(a=0;a=0;r--)i=t[r],a.push({type:"delete",index:i}),o.unshift({type:"insert",index:i,value:n[i]});var s=Fn.modifyFrames,l=Fn.modifyFrames,u=[e,o],c=[e,a];return eh&&eh.add(e,s,u,l,c),Fn.modifyFrames(e,a)}function Kkt(e){e=fi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Fn.cleanPlot([],{},r,t),Fn.purge(e),xj.purge(e),t._container&&t._container.remove(),delete e._context,e}function Jkt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!fi.equalDomRects(r,t._lastBBox)){var i=t._invTransform=fi.inverseTransformMatrix(fi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(i[0][0]*i[0][0]+i[0][1]*i[0][1]+i[0][2]*i[0][2]),t._invScaleY=Math.sqrt(i[1][0]*i[1][0]+i[1][1]*i[1][1]+i[1][2]*i[1][2]),t._lastBBox=r}}function Qkt(e){var t=W7.select(e),r=e._fullLayout;if(r._calcInverseTransform=Jkt,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 i={};W7.selectAll("defs").each(function(){this.id&&(i[this.id.split("-")[1]]=1)}),r._uid=fi.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(Ekt.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 n=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=n.append("g").classed("imagelayer",!0),r._shapeLowerLayer=n.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 a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.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")}Fa.animate=Ykt;Fa.addFrames=Xkt;Fa.deleteFrames=Zkt;Fa.addTraces=Mxe;Fa.deleteTraces=Sxe;Fa.extendTraces=Txe;Fa.moveTraces=_j;Fa.prependTraces=Axe;Fa.newPlot=Ikt;Fa._doPlot=Dkt;Fa.purge=Kkt;Fa.react=jkt;Fa.redraw=Pkt;Fa.relayout=oM;Fa.restyle=Z7;Fa.setPlotConfig=Fkt;Fa.update=J7;Fa._guiRelayout=bj(oM);Fa._guiRestyle=bj(Z7);Fa._guiUpdate=bj(J7);Fa._storeDirectGUIEdit=qkt});var Ng=W(yd=>{"use strict";var e8t=yi();yd.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};yd.getRedrawFunc=function(e){return function(){e8t.getComponentMethod("colorbar","draw")(e)}};yd.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};yd.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var Pxe=window.URL||window.webkitURL;yd.createObjectURL=function(e){return Pxe.createObjectURL(e)};yd.revokeObjectURL=function(e){return Pxe.revokeObjectURL(e)};yd.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=t8t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};yd.octetStream=function(e){document.location.href="data:application/octet-stream"+e};yd.getPlotTitle=function(e){var i,n,a,o;var t=e._fullLayout;if(t){var r=(i=t.title)==null?void 0:i.text;return r===((n=t._dfltTitle)==null?void 0:n.plot)?void 0:r}return(o=(a=e.layout)==null?void 0:a.title)==null?void 0:o.text};yd.getPlotSubtitle=function(e){var i,n,a,o,s,l;var t=e._fullLayout;if(t){var r=(n=(i=t.title)==null?void 0:i.subtitle)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.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 t8t(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n{"use strict";var Tj=vi(),$Pr=it(),r8t=Ji(),i8t=ni(),WPr=sd(),wj=/"/g,g_="TOBESTRIPPED",n8t=new RegExp(`("${g_})|(${g_}")|("${g_})|(${g_}")`,"g"),a8t=["&","&","&",""",""",""","'","'","'"],o8t=["<","<","<"],s8t=[">",">",">"];function l8t(e){let t=Tj.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,i=>{let n=i.toLowerCase();return a8t.includes(n)?i:o8t.includes(n)?"<":s8t.includes(n)?">":i.includes("<")||i.includes(">")?"":t.html(i).text()});return t.remove(),r}function u8t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Ixe.exports=function(t,r,i){var n=t._fullLayout,a=n._paper,o=n._toppaper,s=n.width,l=n.height,u;a.insert("rect",":first-child").call(r8t.setRect,0,0,s,l).call(i8t.fill,n.paper_bgcolor);var c=n._basePlotModules||[];for(u=0;u{"use strict";var c8t=it(),f8t=Vx().EventEmitter,lM=Ng();function h8t(e){var t=e.emitter||new f8t,r=new Promise(function(i,n){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,p=l.getContext("2d",{willReadFrequently:!0}),v=new a,m,g;s==="svg"||c8t.isSafari()?g=lM.encodeSVG(o):(m=lM.createBlob(o,"svg"),g=lM.createObjectURL(m)),l.width=h,l.height=d,v.onload=function(){var w;switch(m=null,lM.revokeObjectURL(g),s!=="svg"&&p.drawImage(v,0,0,h,d),s){case"jpeg":w=l.toDataURL("image/jpeg");break;case"png":w=l.toDataURL("image/png");break;case"webp":w=l.toDataURL("image/webp");break;case"svg":w=g;break;default:var b="Image format is not jpeg, png, svg or webp.";if(n(new Error(b)),!e.promise)return t.emit("error",b)}i(w),e.promise||t.emit("success",w)},v.onerror=function(w){if(m=null,lM.revokeObjectURL(g),n(w),!e.promise)return t.emit("error",w)},v.src=g});return e.promise?r:t}Rxe.exports=h8t});var Mj=W((ZPr,qxe)=>{"use strict";var zxe=sn(),Bxe=rF(),d8t=Ko(),m1=it(),uM=Ng(),p8t=iF(),v8t=nF(),g8t=E6().version,Aj={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 m8t(e,t){t=t||{};var r,i,n,a;m1.isPlainObject(e)?(r=e.data||[],i=e.layout||{},n=e.config||{},a={}):(e=m1.getGraphDiv(e),r=m1.extendDeep([],e.data),i=m1.extendDeep({},e.layout),n=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||m1.validate(t[x],Aj[x])}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 "+m1.join2(Aj.format.values,", "," or ")+".");var s={};function l(x,T){return m1.coerce(t,s,Aj,x,T)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),p=l("imageDataOnly"),v=document.createElement("div");v.style.position="absolute",v.style.left="-5000px",document.body.appendChild(v);var m=m1.extendFlat({},i);c?m.width=c:t.width===null&&zxe(a.width)&&(m.width=a.width),f?m.height=f:t.height===null&&zxe(a.height)&&(m.height=a.height);var g=m1.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),w=uM.getRedrawFunc(v);function b(){return new Promise(function(x){setTimeout(x,uM.getDelay(v._fullLayout))})}function _(){return new Promise(function(x,T){var A=p8t(v,u,h),y=v._fullLayout.width,E=v._fullLayout.height;function S(){Bxe.purge(v),document.body.removeChild(v)}if(u==="full-json"){var C=d8t.graphJson(v,!1,"object",!0,!0);return C.version=g8t,C=JSON.stringify(C),S(),x(p?C:uM.encodeJSON(C))}if(S(),u==="svg")return x(p?A:uM.encodeSVG(A));var k=document.createElement("canvas");k.id=m1.randstr(),v8t({format:u,width:y,height:E,scale:h,canvas:k,svg:A,promise:!0}).then(x).catch(T)})}function M(x){return p?x.replace(uM.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,T){Bxe.newPlot(v,r,m,g).then(w).then(b).then(_).then(function(A){x(M(A))}).catch(function(A){T(A)})})}qxe.exports=m8t});var Uxe=W((KPr,Nxe)=>{"use strict";var xd=it(),y8t=Ko(),x8t=fw(),_8t=cy().dfltConfig,Gp=xd.isPlainObject,y_=Array.isArray,Sj=xd.isArrayOrTypedArray;Nxe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var i=x8t.get(),n=[],a={_context:xd.extendFlat({},_8t)},o,s;y_(t)?(a.data=xd.extendDeep([],t),o=t):(a.data=[],o=[],n.push(Ru("array","data"))),Gp(r)?(a.layout=xd.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&n.push(Ru("object","layout"))),y8t.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&i.push(Ru("unused",n,u.concat(f.length)));var g=f.length,w=Array.isArray(m);w&&(g=Math.min(g,m.length));var b,_,M,x,T;if(h.dimensions===2)for(_=0;_f[_].length&&i.push(Ru("unused",n,u.concat(_,f[_].length)));var A=f[_].length;for(b=0;b<(w?Math.min(A,m[_].length):A);b++)M=w?m[_][b]:m,x=c[_][b],T=f[_][b],xd.validate(x,M)?T!==x&&T!==+x&&i.push(Ru("dynamic",n,u.concat(_,b),x,T)):i.push(Ru("value",n,u.concat(_,b),x))}else i.push(Ru("array",n,u.concat(_),c[_]));else for(_=0;_{"use strict";var E8t=it(),oF=Ng();function k8t(e,t,r){var i=document.createElement("a"),n="download"in i,a=new Promise(function(o,s){var l,u;if(n)return l=oF.createBlob(e,r),u=oF.createObjectURL(l),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),oF.revokeObjectURL(u),l=null,o(t);if(E8t.isSafari()){var c=r==="svg"?",":";base64,";return oF.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}Vxe.exports=k8t});var Ej=W((QPr,Wxe)=>{"use strict";var sF=it(),Hxe=uo(),C8t=Mj(),D8t=Gxe(),jxe=Ng(),$xe=40;function F8t(e,t){var r;return sF.isPlainObject(e)||(r=sF.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(i,n){r&&r._snapshotInProgress&&n(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var a=C8t(e,t),o=t.filename||e.fn;if(!o){let l=jxe.getPlotTitle(e);if(l&&!Hxe.matchTex(l))o=sF.slugify(l,$xe);else{let u=jxe.getPlotSubtitle(e);u&&!Hxe.matchTex(u)&&(o=sF.slugify(u,$xe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),a.then(function(l){return r&&(r._snapshotInProgress=!1),D8t(l,s,t.format)}).then(function(l){i(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Wxe.exports=F8t});var Jxe=W(kj=>{"use strict";var Oh=it(),Nh=Oh.isPlainObject,Yxe=fw(),Xxe=Ko(),L8t=Wa(),Zxe=Da(),Kxe=cy().dfltConfig;kj.makeTemplate=function(e){e=Oh.isPlainObject(e)?e:Oh.getGraphDiv(e),e=Oh.extendDeep({_context:Kxe},{data:e.data,layout:e.layout}),Xxe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach(function(d){var p={};cM(d,p,I8t.bind(null,d));var v=Oh.coerce(d,{},L8t,"type"),m=i.data[v];m||(m=i.data[v]=[]),m.push(p)}),cM(r,i.layout,P8t.bind(null,r)),delete i.layout.template;var n=r.template;if(Nh(n)){var a=n.layout,o,s,l,u,c,f;Nh(a)&&lF(a,i.layout);var h=n.data;if(Nh(h)){for(s in i.data)if(l=h[s],Array.isArray(l)){for(c=i.data[s],f=c.length,u=l.length,o=0;og?o.push({code:"unused",traceType:d,templateCount:m,dataCount:g}):g>m&&o.push({code:"reused",traceType:d,templateCount:m,dataCount:g})}}function w(b,_){for(var M in b)if(M.charAt(0)!=="_"){var x=b[M],T=_d(b,M,_);Nh(x)?(Array.isArray(b)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:T,templateitemname:x.templateitemname}),w(x,T)):Array.isArray(x)&&R8t(x)&&w(x,T)}}if(w({data:l,layout:s},""),o.length)return o.map(z8t)};function R8t(e){for(var t=0;t{"use strict";var fu=rF();Ts._doPlot=fu._doPlot;Ts.newPlot=fu.newPlot;Ts.restyle=fu.restyle;Ts.relayout=fu.relayout;Ts.redraw=fu.redraw;Ts.update=fu.update;Ts._guiRestyle=fu._guiRestyle;Ts._guiRelayout=fu._guiRelayout;Ts._guiUpdate=fu._guiUpdate;Ts._storeDirectGUIEdit=fu._storeDirectGUIEdit;Ts.react=fu.react;Ts.extendTraces=fu.extendTraces;Ts.prependTraces=fu.prependTraces;Ts.addTraces=fu.addTraces;Ts.deleteTraces=fu.deleteTraces;Ts.moveTraces=fu.moveTraces;Ts.purge=fu.purge;Ts.addFrames=fu.addFrames;Ts.deleteFrames=fu.deleteFrames;Ts.animate=fu.animate;Ts.setPlotConfig=fu.setPlotConfig;var B8t=K6().getGraphDiv,q8t=b7().eraseActiveShape;Ts.deleteActiveShape=function(e){return q8t(B8t(e))};Ts.toImage=Mj();Ts.validate=Uxe();Ts.downloadImage=Ej();var Qxe=Jxe();Ts.makeTemplate=Qxe.makeTemplate;Ts.validateTemplate=Qxe.validateTemplate});var x_=W((rIr,t_e)=>{"use strict";var Cj=it(),O8t=yi();t_e.exports=function(t,r,i,n){var a=n("x"),o=n("y"),s,l=O8t.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],i),a){var u=Cj.minRowLength(a);o?s=Math.min(u,Cj.minRowLength(o)):(s=u,n("y0"),n("dy"))}else{if(!o)return 0;s=Cj.minRowLength(o),n("x0"),n("dx")}return r._length=s,s}});var Hp=W((iIr,n_e)=>{"use strict";var r_e=it().dateTick0,N8t=Kn(),U8t=N8t.ONEWEEK;function i_e(e,t){return e%U8t===0?r_e(t,1):r_e(t,0)}n_e.exports=function(t,r,i,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i_e(o,r.xcalendar)),n("xperiodalignment"))}if(a.y){var s=n("yperiod");s&&(n("yperiod0",i_e(s,r.ycalendar)),n("yperiodalignment"))}}});var s_e=W((nIr,o_e)=>{"use strict";var a_e=["orientation","groupnorm","stackgaps"];o_e.exports=function(t,r,i,n){var a=i._scatterStackOpts,o=n("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[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"},h=0;h{"use strict";var l_e=ni(),u_e=bc().hasColorscale,c_e=Fu(),V8t=$o();f_e.exports=function(t,r,i,n,a,o={}){var s=V8t.isBubble(t),l=(t.line||{}).color,u;if(l&&(i=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",i),u_e(t,"marker")&&c_e(t,r,n,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=l_e.background:u=l_e.defaultLine,a("marker.line.color",u),u_e(t,"marker.line")&&c_e(t,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var jp=W((oIr,h_e)=>{"use strict";var G8t=it().isArrayOrTypedArray,H8t=bc().hasColorscale,j8t=Fu();h_e.exports=function(t,r,i,n,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",i),H8t(t,"line"))j8t(t,r,n,a,{prefix:"line.",cLetter:"c"});else{var l=(G8t(s)?!1:s)||i;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var Nw=W((sIr,d_e)=>{"use strict";d_e.exports=function(t,r,i){var n=i("line.shape");n==="spline"&&i("line.smoothing")}});var $p=W((lIr,p_e)=>{"use strict";var $8t=it();p_e.exports=function(e,t,r,i,n){n=n||{},i("textposition"),$8t.coerceFont(i,"textfont",n.font||r.font,n),n.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}});var y1=W((uIr,g_e)=>{"use strict";var cF=ni(),v_e=it().isArrayOrTypedArray;function W8t(e){for(var t=cF.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var m_e=it(),Y8t=yi(),X8t=Ns(),Z8t=v1(),Uw=$o(),K8t=x_(),J8t=Hp(),Q8t=s_e(),eCt=bd(),tCt=jp(),y_e=Nw(),rCt=$p(),iCt=y1(),nCt=it().coercePattern;x_e.exports=function(t,r,i,n){function a(d,p){return m_e.coerce(t,r,X8t,d,p)}var o=K8t(t,r,n,a);if(o||(r.visible=!1),!!r.visible){J8t(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=Q8t(t,r,n,a);n.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var aCt=v_().getAxisGroup;b_e.exports=function(t,r,i,n,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=aCt(i,s)+o,u=i._alignmentOpts||{},c=n("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,v=p[d];r._offsetIndex=0,(a!=="group"||d)&&(v||(v=p[d]={offsetIndex:Object.keys(p).length}),r._offsetIndex=v.offsetIndex)}});var Dj=W((hIr,w_e)=>{"use strict";var oCt=it(),sCt=__(),lCt=Ns();w_e.exports=function(t,r){var i,n,a,o=r.scattermode;function s(h){return oCt.coerce(n._input,n,lCt,h)}if(r.scattermode==="group")for(a=0;a=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var A_e=W((dIr,T_e)=>{"use strict";var uCt=it(),cCt=fD();T_e.exports=function(e,t){function r(n,a){return uCt.coerce(e,t,cCt,n,a)}var i=t.barmode==="group";t.scattermode==="group"&&r("scattergap",i?t.bargap:.2)}});var Wp=W((pIr,S_e)=>{"use strict";var fCt=sn(),M_e=it(),hCt=M_e.dateTime2ms,fF=M_e.incrementMonth,dCt=Kn(),pCt=dCt.ONEAVGMONTH;S_e.exports=function(t,r,i,n){if(r.type!=="date")return{vals:n};var a=t[i+"periodalignment"];if(!a)return{vals:n};var o=t[i+"period"],s;if(fCt(o)){if(o=+o,o<=0)return{vals:n}}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:n}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[i+"period0"],d=hCt(h,u)||0,p=[],v=[],m=[],g=n.length,w=0;wb;)x=fF(x,-s,u);for(;x<=b;)x=fF(x,s,u);M=fF(x,-s,u)}else{for(_=Math.round((b-d)/o),x=d+_*o;x>b;)x-=o;for(;x<=b;)x+=o;M=x-o}p[w]=c?M:f?x:(M+x)/2,v[w]=M,m[w]=x}return{vals:p,starts:v,ends:m}}});var wd=W((vIr,k_e)=>{"use strict";var Fj=bc().hasColorscale,Lj=Zc(),E_e=$o();k_e.exports=function(t,r){E_e.hasLines(r)&&Fj(r,"line")&&Lj(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),E_e.hasMarkers(r)&&(Fj(r,"marker")&&Lj(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Fj(r,"marker.line")&&Lj(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var x1=W((gIr,C_e)=>{"use strict";var rl=it();C_e.exports=function(t,r){for(var i=0;i{"use strict";var D_e=it();F_e.exports=function(t,r){D_e.isArrayOrTypedArray(r.selectedpoints)&&D_e.tagSelected(t,r)}});var Td=W((yIr,q_e)=>{"use strict";var L_e=sn(),Ij=it(),fM=ji(),P_e=Wp(),Pj=Kn().BADNUM,Rj=$o(),vCt=wd(),gCt=x1(),mCt=w0();function yCt(e,t){var r=e._fullLayout,i=t._xA=fM.getFromId(e,t.xaxis||"x","x"),n=t._yA=fM.getFromId(e,t.yaxis||"y","y"),a=i.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=P_e(t,i,"x",a),l=P_e(t,n,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,p=zj(t,r,i,n),v=!1,m,g,w,b,_,M;z_e(r,t);var x="x",T="y",A;if(p)Ij.pushUnique(p.traceIndices,t.index),m=p.orientation==="v",m?(T="s",A="x"):(x="s",A="y"),_=p.stackgaps==="interpolate";else{var y=R_e(t,f);I_e(e,t,i,n,u,c,y)}var E=!!t.xperiodalignment,S=!!t.yperiodalignment;for(g=0;gg&&h[b].gap;)b--;for(M=h[b].s,w=h.length-1;w>b;w--)h[w].s=M;for(;g{"use strict";O_e.exports=hF;var xCt=it().distinctVals;function hF(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),n=[],a=0;a{"use strict";U_e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var b_=W((bIr,j_e)=>{"use strict";var Ad=sn(),{isArrayOrTypedArray:Ug}=it(),{BADNUM:Vw}=Kn(),_Ct=yi(),hM=ji(),{getAxisGroup:bCt}=v_(),dF=N_e(),{TEXTPAD:wCt}=Uy(),{LINE_SPACING:TCt}=Hl(),{BR_TAG_ALL:ACt}=uo();function MCt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!Ad(s))}for(var c=0;ci(a))):i(e.text);let n=e.outsidetextfont.size*TCt*r+wCt;return{ppadplus:t.some(a=>a.s<0)?n:0,ppadminus:t.some(a=>a.s>=0)?n:0}}return{ppadplus:void 0,ppadminus:void 0}}function RCt(e,t,r,i){for(var n=Gw(i),a=0;a{"use strict";var $_e=Td(),W_e=b_().setGroupPositions;function BCt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;uy[c]&&c{"use strict";var OCt=Ji(),Q_e=Kn(),dM=Q_e.BADNUM,ebe=Q_e.LOG_CLIP,Z_e=ebe+.5,K_e=ebe-.5,pF=it(),NCt=pF.segmentsIntersect,J_e=pF.constrain,Gj=v1();tbe.exports=function(t,r){var i=r.trace||{},n=r.xaxis,a=r.yaxis,o=n.type==="log",s=a.type==="log",l=n._length,u=a._length,c=r.backoff,f=i.marker,h=r.connectGaps,d=r.baseTolerance,p=r.shape,v=p==="linear",m=i.fill&&i.fill!=="none",g=[],w=Gj.minTolerance,b=t.length,_=new Array(b),M=0,x,T,A,y,E,S,C,k,D,F,P,R,L,I,B,O;function $(Xe){var mt=t[Xe];if(!mt)return!1;var bt=r.linearized?n.l2p(mt.x):n.c2p(mt.x),Ne=r.linearized?a.l2p(mt.y):a.c2p(mt.y);if(bt===dM){if(o&&(bt=n.c2p(mt.x,!0)),bt===dM)return!1;s&&Ne===dM&&(bt*=Math.abs(n._m*u*(n._m>0?Z_e:K_e)/(a._m*l*(a._m>0?Z_e:K_e)))),bt*=1e3}if(Ne===dM){if(s&&(Ne=a.c2p(mt.y,!0)),Ne===dM)return!1;Ne*=1e3}return[bt,Ne]}function Y(Xe,mt,bt,Ne){var Ue=bt-Xe,Ge=Ne-mt,je=.5-Xe,Re=.5-mt,Ve=Ue*Ue+Ge*Ge,ct=Ue*je+Ge*Re;if(ct>0&&ct1||Math.abs(je.y-bt[0][1])>1)&&(je=[je.x,je.y],Ne&&J(je,Xe)X||Xe[1]G)return[J_e(Xe[0],V,X),J_e(Xe[1],H,G)]}function ye(Xe,mt){if(Xe[0]===mt[0]&&(Xe[0]===V||Xe[0]===X)||Xe[1]===mt[1]&&(Xe[1]===H||Xe[1]===G))return!0}function ue(Xe,mt){var bt=[],Ne=Ee(Xe),Ue=Ee(mt);return Ne&&Ue&&ye(Ne,Ue)||(Ne&&bt.push(Ne),Ue&&bt.push(Ue)),bt}function ee(Xe,mt,bt){return function(Ne,Ue){var Ge=Ee(Ne),je=Ee(Ue),Re=[];if(Ge&&je&&ye(Ge,je))return Re;Ge&&Re.push(Ge),je&&Re.push(je);var Ve=2*pF.constrain((Ne[Xe]+Ue[Xe])/2,mt,bt)-((Ge||Ne)[Xe]+(je||Ue)[Xe]);if(Ve){var ct;Ge&&je?ct=Ve>0==Ge[Xe]>je[Xe]?Ge:je:ct=Ge||je,ct[Xe]+=Ve}return Re}}var ae;p==="linear"||p==="spline"?ae=oe:p==="hv"||p==="vh"?ae=ue:p==="hvh"?ae=ee(0,V,X):p==="vhv"&&(ae=ee(1,H,G));function xe(Xe,mt){var bt=mt[0]-Xe[0],Ne=(mt[1]-Xe[1])/bt,Ue=(Xe[1]*mt[0]-mt[1]*Xe[0])/bt;return Ue>0?[Ne>0?V:X,G]:[Ne>0?X:V,H]}function re(Xe){var mt=Xe[0],bt=Xe[1],Ne=mt===_[M-1][0],Ue=bt===_[M-1][1];if(!(Ne&&Ue))if(M>1){var Ge=mt===_[M-2][0],je=bt===_[M-2][1];Ne&&(mt===V||mt===X)&&Ge?je?M--:_[M-1]=Xe:Ue&&(bt===H||bt===G)&&je?Ge?M--:_[M-1]=Xe:_[M++]=Xe}else _[M++]=Xe}function pe(Xe){_[M-1][0]!==Xe[0]&&_[M-1][1]!==Xe[1]&&re([ge,Ce]),re(Xe),be=null,ge=Ce=0}var we=pF.isArrayOrTypedArray(f);function Fe(Xe){if(Xe&&c&&(Xe.i=x,Xe.d=t,Xe.trace=i,Xe.marker=we?f[Xe.i]:f,Xe.backoff=c),K=Xe[0]/l,j=Xe[1]/u,te=Xe[0]X?X:0,ce=Xe[1]G?G:0,te||ce){if(!M)_[M++]=[te||Xe[0],ce||Xe[1]];else if(be){var mt=ae(be,Xe);mt.length>1&&(pe(mt[0]),_[M++]=mt[1])}else he=ae(_[M-1],Xe)[0],_[M++]=he;var bt=_[M-1];te&&ce&&(bt[0]!==te||bt[1]!==ce)?(be&&(ge!==te&&Ce!==ce?re(ge&&Ce?xe(be,Xe):[ge||te,Ce||ce]):ge&&Ce&&re([ge,Ce])),re([te,ce])):ge-te&&Ce-ce&&re([te||ge,ce||Ce]),be=Xe,ge=te,Ce=ce}else be&&pe(ae(be,Xe)[0]),_[M++]=Xe}for(x=0;xq(S,Se))break;A=S,L=D[0]*k[0]+D[1]*k[1],L>P?(P=L,y=S,C=!1):L=t.length||!S)break;Fe(S),T=S}}be&&re([ge||be[0],Ce||be[1]]),g.push(_.slice(0,M))}var ke=p.slice(p.length-1);if(c&&ke!=="h"&&ke!=="v"){for(var _e=!1,Ie=-1,Oe=[],Qe=0;Qe{"use strict";var rbe={tonextx:1,tonexty:1,tonext:1};ibe.exports=function(t,r,i){var n,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a=0?l=d:(l=d=h,h++),l{"use strict";var Yp=vi(),UCt=yi(),pM=it(),Hw=pM.ensureSingle,abe=pM.identity,hl=Ji(),jw=$o(),VCt=Hj(),GCt=jj(),vF=GA().tester;obe.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=GCt(t,r,i);if(s=n.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),HCt(t,s,r),c){o&&(l=o());var h=Yp.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){n.selectAll("g.trace").each(function(d,p){nbe(t,p,r,d,f,this,a)})})}else s.each(function(d,p){nbe(t,p,r,d,f,this,a)});u&&s.exit().remove(),n.selectAll("path:not([d])").remove()};function HCt(e,t,r){t.each(function(i){var n=Hw(Yp.select(this),"g","fills");hl.setClipUrl(n,r.layerClipId,e);var a=i[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=n.selectAll("g").data(o,abe);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=Hw(Yp.select(this),"path","js-fill")})})}function nbe(e,t,r,i,n,a,o){var s=e._context.staticPlot,l;jCt(e,t,r,i,n);var u=!!o&&o.duration>0;function c(ee){return u?ee.transition():ee}var f=r.xaxis,h=r.yaxis,d=i[0].trace,p=d.line,v=Yp.select(a),m=Hw(v,"g","errorbars"),g=Hw(v,"g","lines"),w=Hw(v,"g","points"),b=Hw(v,"g","text");if(UCt.getComponentMethod("errorbars","plot")(e,m,r,o),d.visible!==!0)return;c(v).style("opacity",d.opacity);var _,M,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var T,A;x==="y"?(T=1,A=h.c2p(0,!0)):x==="x"&&(T=0,A=f.c2p(0,!0)),i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=v;var y="",E=[],S=d._prevtrace,C=null,k=null;S&&(y=S._prevRevpath||"",M=S._nextFill,E=S._ownPolygons,C=S._fillsegments,k=S._fillElement);var D,F,P="",R="",L,I,B,O,$,Y,K=[];d._polygons=[];var j=[],q=[],J=pM.noop;if(_=d._ownFill,jw.hasLines(d)||d.fill!=="none"){M&&M.datum(i),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(L=hl.steps(p.shape),I=hl.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?L=I=function(ee){var ae=ee[ee.length-1];return ee.length>1&&ee[0][0]===ae[0]&&ee[0][1]===ae[1]?hl.smoothclosed(ee.slice(1),p.smoothing):hl.smoothopen(ee,p.smoothing)}:L=I=function(ee){return"M"+ee.join("L")},B=function(ee){return I(ee.reverse())},q=VCt(i,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),j=new Array(q.length);var U=0;for(l=0;l=s[0]&&v.x<=s[1]&&v.y>=l[0]&&v.y<=l[1]}),h=Math.ceil(f.length/c),d=0;n.forEach(function(v,m){var g=v[0].trace;jw.hasMarkers(g)&&g.marker.maxdisplayed>0&&m{"use strict";sbe.exports={container:"marker",min:"cmin",max:"cmax"}});var mF=W((EIr,lbe)=>{"use strict";var gF=ji();lbe.exports=function(t,r,i){var n={},a={_fullLayout:i},o=gF.getFromTrace(a,r,"x"),s=gF.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),n.xLabel=gF.tickText(o,o.c2l(l),!0).text,n.yLabel=gF.tickText(s,s.c2l(u),!0).text,n}});var th=W((kIr,ube)=>{"use strict";var $j=vi(),Ww=Ji(),$Ct=yi();function WCt(e){var t=$j.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var i=$j.select(this),n=r.trace||r[0].trace;Wj(i,n,e)}),t.selectAll("g.text").each(function(r){var i=$j.select(this),n=r.trace||r[0].trace;Yj(i,n,e)}),t.selectAll("g.trace path.js-line").call(Ww.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(Ww.fillGroupStyle,e,!1),$Ct.getComponentMethod("errorbars","style")(t)}function Wj(e,t,r){Ww.pointStyle(e.selectAll("path.point"),t,r)}function Yj(e,t,r){Ww.textPointStyle(e.selectAll("text"),t,r)}function YCt(e,t,r){var i=t[0].trace;i.selectedpoints?(Ww.selectedPointStyle(r.selectAll("path.point"),i),Ww.selectedTextStyle(r.selectAll("text"),i)):(Wj(r,i,e),Yj(r,i,e))}ube.exports={style:WCt,stylePoints:Wj,styleText:Yj,styleOnSelect:YCt}});var Xw=W((CIr,cbe)=>{"use strict";var Yw=ni(),XCt=$o();cbe.exports=function(t,r){var i,n;if(t.mode==="lines")return i=t.line.color,i&&Yw.opacity(i)?i:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||r.mc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return n=a&&Yw.opacity(a)?a:o&&Yw.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",n?Yw.opacity(n)<.3?Yw.addOpacity(n,.3):n:(i=(t.line||{}).color,i&&Yw.opacity(i)&&XCt.hasLines(t)&&t.line.width?i:t.fillcolor)}});var Zw=W((DIr,hbe)=>{"use strict";var yF=it(),fbe=Ds(),ZCt=yi(),KCt=Xw(),Xj=ni(),JCt=yF.fillText;hbe.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,v=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(R){if(p){var L=s.c2p(R.xStart),I=s.c2p(R.xEnd);return u>=Math.min(L,I)&&u<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(s.c2p(R.x)-u);return $=Math.min(L,I)&&c<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(l.c2p(R.y)-c);return $K!=G>=K&&(V=J[q-1][0],X=J[q][0],G-H&&(U=V+(X-V)*(K-H)/(G-H),B=Math.min(B,U),O=Math.max(O,U)));return B=Math.max(B,0),O=Math.min(O,s._length),{x0:B,x1:O,y0:K,y1:K}}if(h.indexOf("fills")!==-1&&o._fillElement){var D=C(o._fillElement)&&!C(o._fillExclusionElement);if(D){var F=k(o._polygons);F===null&&(F={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var P=Xj.defaultLine;return Xj.opacity(o.fillcolor)?P=o.fillcolor:Xj.opacity((o.line||{}).color)&&(P=o.line.color),yF.extendFlat(t,{distance:t.maxHoverDistance,x0:F.x0,x1:F.x1,y0:F.y0,y1:F.y1,color:P,hovertemplate:!1}),delete t.index,o.text&&!yF.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var w_=W((FIr,pbe)=>{"use strict";var dbe=$o();pbe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h=s.mode&&!dbe.hasMarkers(s)&&!dbe.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";vbe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Kj=W((PIr,xbe)=>{"use strict";var xF=yi().traceIs,Zj=bw();xbe.exports=function(t,r,i,n){i("autotypenumbers",n.autotypenumbersDflt);var a=i("type",(n.splomStash||{}).type);a==="-"&&(QCt(r,n.data),r.type==="-"?r.type="linear":t.type=r.type)};function QCt(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n;r.indexOf("scene")!==-1&&(r=i);var a=eDt(t,r,i);if(a){if(a.type==="histogram"&&i==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=i+"calendar",s=a[o],l={noMultiCategory:!xF(a,"cartesian")||xF(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&i==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,ybe(a,i)){var u=mbe(a),c=[];for(n=0;n0&&(n["_"+r+"axes"]||{})[t])return n;if((n[r+"axis"]||r)===t){if(ybe(n,r))return n;if((n[r]||[]).length||n[r+"0"])return n}}}function mbe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function ybe(e,t){var r=mbe(e),i=xF(e,"box-violin");return i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var _F=W((IIr,_be)=>{"use strict";var tDt=yc().isTypedArraySpec;function rDt(e,t){var r=t.dataAttr||e._id.charAt(0),i={},n,a,o;if(t.axData)n=t.axData;else for(n=[],a=0;a0||tDt(a),s;o&&(s="array");var l=i("categoryorder",s),u;l==="array"&&(u=i("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=rDt(r,n).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var vM=W((RIr,wbe)=>{"use strict";var bbe=ni(),iDt=Vl(),nDt=it();wbe.exports=function(t,r,i,n){n=n||{};var a=n.dfltColor;function o(A,y){return nDt.coerce2(t,r,n.attributes,A,y)}var s=o("linecolor",a),l=o("linewidth"),u=i("showline",n.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=bbe.mix(a,n.bgColor,n.blend||iDt.lightFraction),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),p=i("showgrid",n.showGrid||!!f||!!h||!!d);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),n.hasMinor){var v=bbe.mix(r.gridcolor,n.bgColor,67),m=o("minor.gridcolor",v),g=o("minor.gridwidth",r.gridwidth||1),w=o("minor.griddash",r.griddash||"solid"),b=i("minor.showgrid",!!m||!!g||!!w);b||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!n.noZeroLine){var _=o("zerolinelayer"),M=o("zerolinecolor",a),x=o("zerolinewidth"),T=i("zeroline",n.showGrid||!!M||!!x);T||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var mM=W((zIr,kbe)=>{"use strict";var Tbe=sn(),aDt=yi(),gM=it(),oDt=Da(),sDt=Xc(),Jj=ec(),Abe=Xx(),Mbe=vw(),lDt=wy(),uDt=Ty(),cDt=_F(),fDt=vM(),hDt=UG(),Sbe=i1(),bF=Gl().WEEKDAY_PATTERN,dDt=Gl().HOUR_PATTERN;kbe.exports=function(t,r,i,n,a){var o=n.letter,s=n.font||{},l=n.splomStash||{},u=i("visible",!n.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=aDt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",n.calendar),n.noTicklabelmode||(h=i("ticklabelmode"))}!n.noTicklabelindex&&(f==="date"||f==="linear")&&i("ticklabelindex");var p="";(!n.noTicklabelposition||f==="multicategory")&&(p=gM.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="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")),n.noTicklabeloverflow||i("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Sbe(r,a),hDt(t,r,i,n),cDt(t,r,i,n),n.noHover||(f!=="category"&&i("hoverformat"),n.noUnifiedhovertitle||i("unifiedhovertitle.text"));var v=i("color"),m=v!==Jj.color.dflt?v:s.color,g=l.label||a._dfltTitle[o];if(uDt(t,r,i,f,n),!u)return r;i("title.text",g),gM.coerceFont(i,"title.font",s,{overrideDflt:{size:gM.bigFont(s.size),color:m}}),Abe(t,r,i,f);var w=n.hasMinor;if(w&&(oDt.newContainer(r,"minor"),Abe(t,r,i,f,{isMinor:!0})),lDt(t,r,i,f,n),Mbe(t,r,i,n),w){var b=n.isMinor;n.isMinor=!0,Mbe(t,r,i,n),n.isMinor=b}fDt(t,r,i,{dfltColor:v,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:w,attributes:Jj}),w&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&i("mirror");var _=f==="multicategory";if(!n.noTickson&&(f==="category"||_)&&(r.ticks||r.showgrid)&&(_?(i("tickson","boundaries"),delete r.ticklabelposition):i("tickson")),_){var M=i("showdividers");M&&(i("dividercolor"),i("dividerwidth"))}if(f==="date")if(sDt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:pDt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=Ebe(a[s]),l){o=bF;break}}var u=i("pattern",o);if(u===bF)for(s=0;s<2;s++)l=Ebe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case bF:if(!Tbe(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case dDt:if(!Tbe(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]{"use strict";var gDt=sn(),wF=it();Cbe.exports=function(t,r,i,n){var a=n.counterAxes||[],o=n.overlayableAxes||[],s=n.letter,l=n.grid,u=n.overlayingDomain,c,f,h,d,p,v;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(gDt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,p=0,v=!1;var m=wF.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),g=wF.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(s==="y"){var w=i("autoshift");w&&(d=g==="left"?u[0]:u[1],v=r.automargin?r.automargin:!0,p=g==="left"?-3:3),i("shift",p)}i("position",d)}i("automargin",v);var b=!1;if(o.length&&(b=wF.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!b){var _=i("domain",f);_[0]>_[1]-1/4096&&(r.domain=f),wF.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return i("layer"),r}});var qbe=W((qIr,Bbe)=>{"use strict";var T_=it(),Dbe=ni(),mDt=Kf().isUnifiedHover,yDt=dH(),Fbe=Da(),xDt=ew(),Lbe=ec(),_Dt=Kj(),Pbe=mM(),bDt=v_(),Ibe=TF(),e$=Cs(),_1=e$.id2name,Rbe=e$.name2id,wDt=Gl().AX_ID_PATTERN,zbe=yi(),AF=zbe.traceIs,Qj=zbe.getComponentMethod;function MF(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}Bbe.exports=function(t,r,i){var n=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},p={},v,m;for(v=0;v{"use strict";var TDt=vi(),Obe=yi(),SF=it(),T0=Ji(),EF=ji();Nbe.exports=function(t,r,i,n){var a=t._fullLayout;if(r.length===0){EF.redrawComponents(t);return}function o(m){var g=m.xaxis,w=m.yaxis;a._defs.select("#"+m.clipId+"> rect").call(T0.setTranslate,0,0).call(T0.setScale,1,1),m.plot.call(T0.setTranslate,g._offset,w._offset).call(T0.setScale,1,1);var b=m.plot.selectAll(".scatterlayer .trace");b.selectAll(".point").call(T0.setPointGroupScale,1,1),b.selectAll(".textpoint").call(T0.setTextPointsScale,1,1),b.call(T0.hideOutsideRangePoints,m)}function s(m,g){var w=m.plotinfo,b=w.xaxis,_=w.yaxis,M=b._length,x=_._length,T=!!m.xr1,A=!!m.yr1,y=[];if(T){var E=SF.simpleMap(m.xr0,b.r2l),S=SF.simpleMap(m.xr1,b.r2l),C=E[1]-E[0],k=S[1]-S[0];y[0]=(E[0]*(1-g)+g*S[0]-E[0])/(E[1]-E[0])*M,y[2]=M*(1-g+g*k/C),b.range[0]=b.l2r(E[0]*(1-g)+g*S[0]),b.range[1]=b.l2r(E[1]*(1-g)+g*S[1])}else y[0]=0,y[2]=M;if(A){var D=SF.simpleMap(m.yr0,_.r2l),F=SF.simpleMap(m.yr1,_.r2l),P=D[1]-D[0],R=F[1]-F[0];y[1]=(D[1]*(1-g)+g*F[1]-D[1])/(D[0]-D[1])*x,y[3]=x*(1-g+g*R/P),_.range[0]=b.l2r(D[0]*(1-g)+g*F[0]),_.range[1]=_.l2r(D[1]*(1-g)+g*F[1])}else y[1]=0,y[3]=x;EF.drawOne(t,b,{skipTitle:!0}),EF.drawOne(t,_,{skipTitle:!0}),EF.redrawComponents(t,[b._id,_._id]);var L=T?M/y[2]:1,I=A?x/y[3]:1,B=T?y[0]:0,O=A?y[1]:0,$=T?y[0]/y[2]*M:0,Y=A?y[1]/y[3]*x:0,K=b._offset-$,j=_._offset-Y;w.clipRect.call(T0.setTranslate,B,O).call(T0.setScale,1/L,1/I),w.plot.call(T0.setTranslate,K,j).call(T0.setScale,L,I),T0.setPointGroupScale(w.zoomScalePts,1/L,1/I),T0.setTextPointsScale(w.zoomScaleTxt,1/L,1/I)}var l;n&&(l=n());function u(){for(var m={},g=0;gi.duration?(u(),d=window.cancelAnimationFrame(v)):d=window.requestAnimationFrame(v)}return f=Date.now(),d=window.requestAnimationFrame(v),Promise.resolve()}});var dl=W(Jc=>{"use strict";var CF=vi(),Vbe=yi(),A_=it(),ADt=Ko(),MDt=Ji(),Gbe=_c().getModuleCalcData,Vy=Cs(),Xp=Gl(),SDt=sd(),Za=A_.ensureSingle;function kF(e,t,r){return A_.ensureSingle(e,t,r,function(i){i.datum(r)})}var M_=Xp.zindexSeparator;Jc.name="cartesian";Jc.attr=["xaxis","yaxis"];Jc.idRoot=["x","y"];Jc.idRegex=Xp.idRegex;Jc.attrRegex=Xp.attrRegex;Jc.attributes=gbe();Jc.layoutAttributes=ec();Jc.supplyLayoutDefaults=qbe();Jc.transitionAxes=Ube();Jc.finalizeSubplots=function(e,t){var r=t._subplots,i=r.xaxis,n=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var d=h.id;if(d.indexOf(M_)!==-1)continue;d+=M_+(u+1),h=A_.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],v,m=0;m1&&(M+=M_+_),b.push(s+M),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=Za(i,"path","xlines-above"),t.ylines=Za(i,"path","ylines-above"),t.xaxislayer=Za(i,"g","xaxislayer-above"),t.yaxislayer=Za(i,"g","yaxislayer-above");else{if(!o){var h=Za(i,"g","layer-subplot");t.shapelayer=Za(h,"g","shapelayer"),t.imagelayer=Za(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=Za(i,"g","minor-gridlayer"),t.gridlayer=Za(i,"g","gridlayer"),t.zerolinelayer=Za(i,"g","zerolinelayer"));var d=Za(i,"g","layer-between");t.shapelayerBetween=Za(d,"g","shapelayer"),t.imagelayerBetween=Za(d,"g","imagelayer"),Za(i,"path","xlines-below"),Za(i,"path","ylines-below"),t.overlinesBelow=Za(i,"g","overlines-below"),Za(i,"g","xaxislayer-below"),Za(i,"g","yaxislayer-below"),t.overaxesBelow=Za(i,"g","overaxes-below")}t.overplot=Za(i,"g","overplot"),t.plot=Za(t.overplot,"g",n),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=Za(i,"g","zerolinelayer-above"),o||(t.xlines=Za(i,"path","xlines-above"),t.ylines=Za(i,"path","ylines-above"),t.overlinesAbove=Za(i,"g","overlines-above"),Za(i,"g","xaxislayer-above"),Za(i,"g","yaxislayer-above"),t.overaxesAbove=Za(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+s),t.ylines=i.select(".ylines-"+l),t.xaxislayer=i.select(".xaxislayer-"+s),t.yaxislayer=i.select(".yaxislayer-"+l))}else{var p=f.plotgroup,v=n+"-x",m=n+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,Za(f.overlinesBelow,"path",v),Za(f.overlinesBelow,"path",m),Za(f.overaxesBelow,"g",v),Za(f.overaxesBelow,"g",m),t.plot=Za(f.overplot,"g",n),Za(f.overlinesAbove,"path",v),Za(f.overlinesAbove,"path",m),Za(f.overaxesAbove,"g",v),Za(f.overaxesAbove,"g",m),t.xlines=p.select(".overlines-"+s).select("."+v),t.ylines=p.select(".overlines-"+l).select("."+m),t.xaxislayer=p.select(".overaxes-"+s).select("."+v),t.yaxislayer=p.select(".overaxes-"+l).select("."+m)}o||(u||(kF(t.minorGridlayer,"g",t.xaxis._id),kF(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(Vy.idSort),kF(t.gridlayer,"g",t.xaxis._id),kF(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(Vy.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function $be(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=CF.select(this);c.remove(),Wbe(u,t),r[u]=!0});for(var i in t._plots)for(var n=t._plots[i],a=n.overlays||[],o=0;o{"use strict";var DF=$o();Ybe.exports={hasLines:DF.hasLines,hasMarkers:DF.hasMarkers,hasText:DF.hasText,isBubble:DF.isBubble,attributes:Ns(),layoutAttributes:fD(),supplyDefaults:__e(),crossTraceDefaults:Dj(),supplyLayoutDefaults:A_e(),calc:Td().calc,crossTraceCalc:X_e(),arraysToCalcdata:x1(),plot:$w(),colorbar:Ac(),formatLabels:mF(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:Zw(),selectPoints:w_(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:dl(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Jbe=W((VIr,Kbe)=>{"use strict";var kDt=vi(),CDt=ni(),Zbe=rj(),t$=it(),DDt=t$.strScale,FDt=t$.strRotate,LDt=t$.strTranslate;Kbe.exports=function(t,r,i){var n=t.node(),a=Zbe[i.arrowhead||0],o=Zbe[i.startarrowhead||0],s=(i.arrowwidth||1)*(i.arrowsize||1),l=(i.arrowwidth||1)*(i.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+i.standoff,h=o.backoff*l+i.startstandoff,d,p,v,m;if(n.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var g=d.x-p.x,w=d.y-p.y;if(v=Math.atan2(w,g),m=v+Math.PI,f&&h&&f+h>Math.sqrt(g*g+w*w)){D();return}if(f){if(f*f>g*g+w*w){D();return}var b=f*Math.cos(v),_=f*Math.sin(v);p.x+=b,p.y+=_,t.attr({x2:p.x,y2:p.y})}if(h){if(h*h>g*g+w*w){D();return}var M=h*Math.cos(v),x=h*Math.sin(v);d.x-=M,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var T=n.getTotalLength(),A="";if(T{"use strict";var Qbe=vi(),r$=yi(),PDt=Ko(),Hy=it(),i$=Hy.strTranslate,xM=ji(),S_=ni(),Vg=Ji(),e3e=Ds(),n$=uo(),a$=Np(),yM=bf(),IDt=Da().arrayEditor,RDt=Jbe();i3e.exports={draw:zDt,drawOne:t3e,drawRaw:r3e};function zDt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Ue="right":Ue="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ue]}for(var H=!1,G=["x","y"],Q=0;Q1)&&(ge===ce?(Se=Ce.r2fraction(t["a"+te]),(Se<0||Se>1)&&(H=!0)):H=!0),ae=Ce._offset+Ce.r2p(t[te]),pe=.5}else{var ke=Fe==="domain";te==="x"?(re=t[te],ae=ke?Ce._offset+Ce._length*re:ae=s.l+s.w*re):(re=1-t[te],ae=ke?Ce._offset+Ce._length*re:ae=s.t+s.h*re),pe=t.showarrow?.5:re}if(t.showarrow){ee.head=ae;var _e=t["a"+te];if(we=he*X(.5,t.xanchor)-oe*X(.5,t.yanchor),ge===ce){var Ie=xM.getRefType(ge);Ie==="domain"?(te==="y"&&(_e=1-_e),ee.tail=Ce._offset+Ce._length*_e):Ie==="paper"?te==="y"?(_e=1-_e,ee.tail=s.t+s.h*_e):ee.tail=s.l+s.w*_e:ee.tail=Ce._offset+Ce.r2p(_e),xe=we}else ee.tail=ae+_e,xe=we+_e;ee.text=ee.tail+we;var Oe=o[te==="x"?"width":"height"];if(ce==="paper"&&(ee.head=Hy.constrain(ee.head,1,Oe-1)),ge==="pixel"){var Qe=-Math.max(ee.tail-3,ee.text),et=Math.min(ee.tail+3,ee.text)-Oe;Qe>0?(ee.tail+=Qe,ee.text+=Qe):et>0&&(ee.tail-=et,ee.text-=et)}ee.tail+=ue,ee.head+=ue}else we=Ee*X(pe,ye),xe=we,ee.text=ae+we;ee.text+=ue,we+=ue,xe+=ue,t["_"+te+"padplus"]=Ee/2+xe,t["_"+te+"padminus"]=Ee/2-xe,t["_"+te+"size"]=Ee,t["_"+te+"shift"]=we}if(H){T.remove();return}var _t=0,ut=0;if(t.align!=="left"&&(_t=(q-K)*(t.align==="center"?.5:1)),t.valign!=="top"&&(ut=(J-j)*(t.valign==="middle"?.5:1)),$)O.select("svg").attr({x:E+_t-1,y:E+ut}).call(Vg.setClipUrl,C?v:null,e);else{var vt=E+ut-Y.top,Xe=E+_t-Y.left;P.call(n$.positionText,Xe,vt).call(Vg.setClipUrl,C?v:null,e)}k.select("rect").call(Vg.setRect,E,E,q,J),S.call(Vg.setRect,A/2,A/2,U-A,V-A),T.call(Vg.setTranslate,Math.round(m.x.text-U/2),Math.round(m.y.text-V/2)),b.attr({transform:"rotate("+g+","+m.x.text+","+m.y.text+")"});var mt=function(Ne,Ue){w.selectAll(".annotation-arrow-g").remove();var Ge=m.x.head,je=m.y.head,Re=m.x.tail+Ne,Ve=m.y.tail+Ue,ct=m.x.text+Ne,Tt=m.y.text+Ue,Xt=Hy.rotationXYMatrix(g,ct,Tt),Vt=Hy.apply2DTransform(Xt),lr=Hy.apply2DTransform2(Xt),ur=+S.attr("width"),Bt=+S.attr("height"),Zt=ct-.5*ur,kr=Zt+ur,$e=Tt-.5*Bt,tt=$e+Bt,st=[[Zt,$e,Zt,tt],[Zt,tt,kr,tt],[kr,tt,kr,$e],[kr,$e,Zt,$e]].map(lr);if(!st.reduce(function(hn,ta){return hn^!!Hy.segmentsIntersect(Ge,je,Ge+1e6,je+1e6,ta[0],ta[1],ta[2],ta[3])},!1)){st.forEach(function(hn){var ta=Hy.segmentsIntersect(Re,Ve,Ge,je,hn[0],hn[1],hn[2],hn[3]);ta&&(Re=ta.x,Ve=ta.y)});var xt=t.arrowwidth,Je=t.arrowcolor,Ct=t.arrowside,ir=w.append("g").style({opacity:S_.opacity(Je)}).classed("annotation-arrow-g",!0),hr=ir.append("path").attr("d","M"+Re+","+Ve+"L"+Ge+","+je).style("stroke-width",xt+"px").call(S_.stroke,S_.rgb(Je));if(RDt(hr,Ct,t),l.annotationPosition&&hr.node().parentNode&&!i){var Ur=Ge,si=je;if(t.standoff){var ei=Math.sqrt(Math.pow(Ge-Re,2)+Math.pow(je-Ve,2));Ur+=t.standoff*(Re-Ge)/ei,si+=t.standoff*(Ve-je)/ei}var Lr=ir.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Re-Ur)+","+(Ve-si),transform:i$(Ur,si)}).style("stroke-width",xt+6+"px").call(S_.stroke,"rgba(0,0,0,0)").call(S_.fill,"rgba(0,0,0,0)"),$i,Tn;yM.init({element:Lr.node(),gd:e,prepFn:function(){var hn=Vg.getTranslate(T);$i=hn.x,Tn=hn.y,n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(hn,ta){var ca=Vt($i,Tn),dn=ca[0]+hn,Vn=ca[1]+ta;T.call(Vg.setTranslate,dn,Vn),d("x",Gy(n,hn,"x",s,t)),d("y",Gy(a,ta,"y",s,t)),t.axref===t.xref&&d("ax",Gy(n,hn,"ax",s,t)),t.ayref===t.yref&&d("ay",Gy(a,ta,"ay",s,t)),ir.attr("transform",i$(hn,ta)),b.attr({transform:"rotate("+g+","+dn+","+Vn+")"})},doneFn:function(){r$.call("_guiRelayout",e,p());var hn=document.querySelector(".js-notes-box-panel");hn&&hn.redraw(hn.selectedObj)}})}}};if(t.showarrow&&mt(0,0),_){var bt;yM.init({element:T.node(),gd:e,prepFn:function(){bt=b.attr("transform")},moveFn:function(Ne,Ue){var Ge="pointer";if(t.showarrow)t.axref===t.xref?d("ax",Gy(n,Ne,"ax",s,t)):d("ax",t.ax+Ne),t.ayref===t.yref?d("ay",Gy(a,Ue,"ay",s.w,t)):d("ay",t.ay+Ue),mt(Ne,Ue);else{if(i)return;var je,Re;if(n)je=Gy(n,Ne,"x",s,t);else{var Ve=t._xsize/s.w,ct=t.x+(t._xshift-t.xshift)/s.w-Ve/2;je=yM.align(ct+Ne/s.w,Ve,0,1,t.xanchor)}if(a)Re=Gy(a,Ue,"y",s,t);else{var Tt=t._ysize/s.h,Xt=t.y-(t._yshift+t.yshift)/s.h-Tt/2;Re=yM.align(Xt-Ue/s.h,Tt,0,1,t.yanchor)}d("x",je),d("y",Re),(!n||!a)&&(Ge=yM.getCursor(n?.5:je,a?.5:Re,t.xanchor,t.yanchor))}b.attr({transform:i$(Ne,Ue)+bt}),a$(T,Ge)},clickFn:function(Ne,Ue){t.captureevents&&e.emit("plotly_clickannotation",x(Ue))},doneFn:function(){a$(T),r$.call("_guiRelayout",e,p());var Ne=document.querySelector(".js-notes-box-panel");Ne&&Ne.redraw(Ne.selectedObj)}})}}l.annotationText?P.call(n$.makeEditable,{delegate:T,gd:e}).call(R).on("edit",function(I){t.text=I,this.call(R),d("text",I),n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),r$.call("_guiRelayout",e,p())}):P.call(R)}});var u3e=W((HIr,l3e)=>{"use strict";var n3e=it(),BDt=yi(),a3e=Da().arrayEditor;l3e.exports={hasClickToShow:qDt,onClick:ODt};function qDt(e,t){var r=s3e(e,t);return r.on.length>0||r.explicitOff.length>0}function ODt(e,t){var r=s3e(e,t),i=r.on,n=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(i.length||n.length){for(s=0;s{"use strict";var o$=it(),Kw=ni();c3e.exports=function(t,r,i,n){n("opacity");var a=n("bgcolor"),o=n("bordercolor"),s=Kw.opacity(o);n("borderpad");var l=n("borderwidth"),u=n("showarrow");n("text",u?" ":i._dfltTitle.annotation),n("textangle"),o$.coerceFont(n,"font",i.font),n("width"),n("align");var c=n("height");if(c&&n("valign"),u){var f=n("arrowside"),h,d;f.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),f.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",s?r.bordercolor:Kw.defaultLine),n("arrowwidth",(s&&l||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),v=i.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",v.bgcolor||(Kw.opacity(a)?Kw.rgb(a):Kw.defaultLine)),g=n("hoverlabel.bordercolor",v.bordercolor||Kw.contrast(m)),w=o$.extendFlat({},v.font);w.color||(w.color=g),o$.coerceFont(n,"hoverlabel.font",w)}n("captureevents",!!p)}});var h3e=W(($Ir,f3e)=>{"use strict";var l$=it(),E_=ji(),NDt=Xc(),UDt=s$(),VDt=qy();f3e.exports=function(t,r){NDt(t,r,{name:"annotations",handleItemDefaults:GDt})};function GDt(e,t,r){function i(b,_){return l$.coerce(e,t,VDt,b,_)}var n=i("visible"),a=i("clicktoshow");if(n||a){UDt(e,t,r,i);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=E_.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=E_.getFromId(u,h);d._annIndices.push(t._index)}if(E_.coercePosition(t,u,i,h,f,.5),o){var p="a"+f,v=E_.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);v!=="pixel"&&v!==h&&(v=t[p]="pixel");var m=v==="pixel"?l[c]:.4;E_.coercePosition(t,u,i,v,p,m)}i(f+"anchor"),i(f+"shift")}if(l$.noneOrAll(e,t,["x","y"]),o&&l$.noneOrAll(e,t,["ax","ay"]),a){var g=i("xclick"),w=i("yclick");t._xclick=g===void 0?t.x:E_.cleanPosition(g,u,t.xref),t._yclick=w===void 0?t.y:E_.cleanPosition(w,u,t.yref)}}}});var v3e=W((WIr,p3e)=>{"use strict";var u$=it(),k_=ji(),HDt=FF().draw;p3e.exports=function(t){var r=t._fullLayout,i=u$.filterVisible(r.annotations);if(i.length&&t._fullData.length)return u$.syncOrAsync([HDt,jDt],t)};function jDt(e){var t=e._fullLayout;u$.filterVisible(t.annotations).forEach(function(r){var i=k_.getFromId(e,r.xref),n=k_.getFromId(e,r.yref),a=k_.getRefType(r.xref),o=k_.getRefType(r.yref);r._extremes={},a==="range"&&d3e(r,i),o==="range"&&d3e(r,n)})}function d3e(e,t){var r=t._id,i=r.charAt(0),n=e[i],a=e["a"+i],o=e[i+"ref"],s=e["a"+i+"ref"],l=e["_"+i+"padplus"],u=e["_"+i+"padminus"],c={x:1,y:-1}[i]*e[i+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,p=3*e.startarrowsize*e.arrowwidth||0,v=p+c,m=p-c,g;if(s===o){var w=k_.findExtremes(t,[t.r2c(n)],{ppadplus:h,ppadminus:d}),b=k_.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v),ppadminus:Math.max(u,m)});g={min:[w.min[0],b.min[0]],max:[w.max[0],b.max[0]]}}else v=a?v+a:v,m=a?m-a:m,g=k_.findExtremes(t,[t.r2c(n)],{ppadplus:Math.max(l,h,v),ppadminus:Math.max(u,d,m)});e._extremes[r]=g}});var m3e=W((YIr,g3e)=>{"use strict";var $Dt=sn(),WDt=cC();g3e.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var p=u[d],v=null;a?v=WDt(p,r.range):v=Math.pow(10,p),$Dt(v)||(v=null),n(c+d,v)}for(var h=0;h{"use strict";var c$=FF(),y3e=u3e();x3e.exports={moduleType:"component",name:"annotations",layoutAttributes:qy(),supplyLayoutDefaults:h3e(),includeBasePlot:eM()("annotations"),calcAutorange:v3e(),draw:c$.draw,drawOne:c$.drawOne,drawRaw:c$.drawRaw,hasClickToShow:y3e.hasClickToShow,onClick:y3e.onClick,convertCoords:m3e()}});var LF=W((ZIr,b3e)=>{"use strict";var es=qy(),YDt=ls().overrideAll,XDt=Da().templatedArray;b3e.exports=YDt(XDt("annotation",{visible:es.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:es.xanchor,xshift:es.xshift,yanchor:es.yanchor,yshift:es.yshift,text:es.text,textangle:es.textangle,font:es.font,width:es.width,height:es.height,opacity:es.opacity,align:es.align,valign:es.valign,bgcolor:es.bgcolor,bordercolor:es.bordercolor,borderpad:es.borderpad,borderwidth:es.borderwidth,showarrow:es.showarrow,arrowcolor:es.arrowcolor,arrowhead:es.arrowhead,startarrowhead:es.startarrowhead,arrowside:es.arrowside,arrowsize:es.arrowsize,startarrowsize:es.startarrowsize,arrowwidth:es.arrowwidth,standoff:es.standoff,startstandoff:es.startstandoff,hovertext:es.hovertext,hoverlabel:es.hoverlabel,captureevents:es.captureevents}),"calc","from-root")});var T3e=W((KIr,w3e)=>{"use strict";var f$=it(),ZDt=ji(),KDt=Xc(),JDt=s$(),QDt=LF();w3e.exports=function(t,r,i){KDt(t,r,{name:"annotations",handleItemDefaults:e7t,fullLayout:i.fullLayout})};function e7t(e,t,r,i){function n(s,l){return f$.coerce(e,t,QDt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ZDt.coercePosition(t,u,n,s,s,.5)}var o=n("visible");o&&(JDt(e,t,i.fullLayout,n),a("x"),a("y"),a("z"),f$.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",n("ax",-10),n("ay",-30),f$.noneOrAll(e,t,["ax","ay"])))}});var E3e=W((JIr,S3e)=>{"use strict";var A3e=it(),M3e=ji();S3e.exports=function(t){for(var r=t.fullSceneLayout,i=r.annotations,n=0;n{"use strict";function h$(e,t){var r=[0,0,0,0],i,n;for(i=0;i<4;++i)for(n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}function r7t(e,t){var r=h$(e.projection,h$(e.view,h$(e.model,[t[0],t[1],t[2],1])));return r}k3e.exports=r7t});var D3e=W((eRr,C3e)=>{"use strict";var i7t=FF().drawRaw,n7t=d$(),a7t=["x","y","z"];C3e.exports=function(t){for(var r=t.fullSceneLayout,i=t.dataScale,n=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=n7t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*i[0],r.yaxis.r2l(o.y)*i[1],r.zaxis.r2l(o.z)*i[2]]),i7t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var P3e=W((tRr,L3e)=>{"use strict";var o7t=yi(),F3e=it();L3e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:LF()}}},layoutAttributes:LF(),handleDefaults:T3e(),includeBasePlot:s7t,convert:E3e(),draw:D3e()};function s7t(e,t){var r=o7t.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,n=Object.keys(e),a=0;a{"use strict";var rRr=Gl(),I3e=Ho(),R3e=Ns().line,l7t=Du().dash,Zp=tn().extendFlat,u7t=Da().templatedArray,iRr=JA(),Jw=Wa(),z3e=qy(),{shapeTexttemplateAttrs:c7t,templatefallbackAttrs:f7t}=Ga(),h7t=GC();B3e.exports=u7t("shape",{visible:Zp({},Jw.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Zp({},Jw.legend,{editType:"calc+arraydraw"}),legendgroup:Zp({},Jw.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Zp({},Jw.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:I3e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Zp({},Jw.legendrank,{editType:"calc+arraydraw"}),legendwidth:Zp({},Jw.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:Zp({},z3e.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:Zp({},z3e.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:Zp({},R3e.color,{editType:"arraydraw"}),width:Zp({},R3e.width,{editType:"calc+arraydraw"}),dash:Zp({},l7t,{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:c7t({},{keys:Object.keys(h7t)}),texttemplatefallback:f7t({editType:"arraydraw"}),font:I3e({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 O3e=W((aRr,q3e)=>{"use strict";var Qw=it(),A0=ji(),d7t=Xc(),p7t=p$(),_M=zy();q3e.exports=function(t,r){d7t(t,r,{name:"shapes",handleItemDefaults:g7t})};function v7t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function g7t(e,t,r){function i(b,_){return Qw.coerce(e,t,p7t,b,_)}t._isShape=!0;var n=i("visible");if(!n)return;var a=i("showlegend");i("legend"),i("legendgroup"),a&&(i("legendwidth"),i("legendgrouptitle.text"),Qw.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var o=i("path"),s=o?"path":"rect",l=i("type",s),u=l!=="path";u&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var c=i("line.width");c&&(i("line.color"),i("line.dash"));var f=i("xsizemode"),h=i("ysizemode");let d=[.25,.75],p=[0,10];["x","y"].forEach(b=>{var _=b+"anchor",M=b==="x"?f:h,x={_fullLayout:r},T,A,y,E;let S=b+"ref",C=e[S];if(Array.isArray(C)&&C.length>0){let k=_M.countDefiningCoords(l,o,b);E=A0.coerceRefArray(e,t,x,b,void 0,"paper",k),t["_"+b+"refArray"]=!0}else E=A0.coerceRef(e,t,x,b,void 0,"paper");if(Array.isArray(E))E.forEach(function(k){A0.getRefType(k)==="range"&&(T=A0.getFromId(x,k),T&&T._shapeIndices.indexOf(t._index)===-1&&T._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(k){let D=E[k];A0.getRefType(D)==="range"?(T=A0.getFromId(x,D),A=_M.shapePositionToRange(T),y=_M.rangeToShapePosition(T),(T.type==="category"||T.type==="multicategory")&&i(b+k+"shift")):A=y=Qw.identity;let P=b+k,R=e[P];if(e[P]=A(e[P],!0),M==="pixel"?i(P,p[k]):A0.coercePosition(t,x,i,D,P,d[k]),t[P]=y(t[P]),e[P]=R,k===0&&M==="pixel"){let L=e[_];e[_]=A(e[_],!0),A0.coercePosition(t,x,i,D,_,.25),t[_]=y(t[_]),e[_]=L}});else{if(A0.getRefType(E)==="range"?(T=A0.getFromId(x,E),T._shapeIndices.push(t._index),y=_M.rangeToShapePosition(T),A=_M.shapePositionToRange(T),u&&(T.type==="category"||T.type==="multicategory")&&(i(b+"0shift"),i(b+"1shift"))):A=y=Qw.identity,u){let D=b+"0",F=b+"1",P=e[D],R=e[F];e[D]=A(e[D],!0),e[F]=A(e[F],!0),M==="pixel"?(i(D,p[0]),i(F,p[1])):(A0.coercePosition(t,x,i,E,D,d[0]),A0.coercePosition(t,x,i,E,F,d[1])),t[D]=y(t[D]),t[F]=y(t[F]),e[D]=P,e[F]=R}if(M==="pixel"){let D=e[_];e[_]=A(e[_],!0),A0.coercePosition(t,x,i,E,_,.25),t[_]=y(t[_]),e[_]=D}}}),u&&Qw.noneOrAll(e,t,["x0","x1","y0","y1"]);var v=l==="line",m,g;if(u&&(m=i("label.texttemplate"),i("label.texttemplatefallback")),m||(g=i("label.text")),g||m){i("label.textangle");var w=i("label.textposition",v?"middle":"middle center");i("label.xanchor"),i("label.yanchor",v7t(v,w)),i("label.padding"),Qw.coerceFont(i,"label.font",r.font)}}});var V3e=W((oRr,U3e)=>{"use strict";var m7t=ni(),N3e=it();function y7t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}U3e.exports=function(t,r,i){i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),N3e.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity");var n=i("newshape.line.width");if(n){var a=(t||{}).plot_bgcolor||"#FFF";i("newshape.line.color",m7t.contrast(a)),i("newshape.line.dash")}var o=t.dragmode==="drawline",s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var u=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",y7t(o,u)),i("newshape.label.padding"),N3e.coerceFont(i,"newshape.label.font",r.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}});var X3e=W((sRr,Y3e)=>{"use strict";var v$=it(),Md=ji(),b1=FA(),g$=zy();Y3e.exports=function(t){var r=t._fullLayout,i=v$.filterVisible(r.shapes);if(!(!i.length||!t._fullData.length))for(var n=0;n{o=Md.getFromId(t,f),a._extremes[o._id]=Md.findExtremes(o,h,H3e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=Md.getFromId(t,a.xref),s=$3e(o,a,b1.paramIsX),s&&(a._extremes[o._id]=Md.findExtremes(o,s,H3e(a))));if(u==="array"){let c=G3e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=Md.getFromId(t,f),a._extremes[o._id]=Md.findExtremes(o,h,j3e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=Md.getFromId(t,a.yref),s=$3e(o,a,b1.paramIsY),s&&(a._extremes[o._id]=Md.findExtremes(o,s,j3e(a))))}};function G3e(e,t,r){let i=t[r+"ref"],n=r==="x"?b1.paramIsX:b1.paramIsY;function a(f,h){f==="paper"||Md.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(b1.segmentRE)||[];for(var s=0,l=0;lp&&(a(i[s],v[p]),s++)}}else a(i[0],t[r+"0"]),a(i[1],t[r+"1"]);let u={};for(let f in o){let h=Md.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=g$.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function H3e(e){return W3e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function j3e(e){return W3e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function W3e(e,t,r,i,n,a){var o=e/2,s=a;if(t==="pixel"){var l=n?g$.extractPathCoords(n,a?b1.paramIsY:b1.paramIsX):[r,i],u=v$.aggNums(Math.max,null,l),c=v$.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function $3e(e,t,r){var i=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=n?e.r2c:e.d2c,c=t[i+"sizemode"]==="scaled";if(c?(a=t[i+"0"],o=t[i+"1"],n&&(s=t[i+"0shift"],l=t[i+"1shift"])):(a=t[i+"anchor"],o=t[i+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(b1.segmentRE),p,v,m,g,w;for(e.type==="date"&&(u=g$.decodeDate(u)),p=0;ph&&(h=w)));if(h>=f)return[f,h]}}});var J3e=W((lRr,K3e)=>{"use strict";var Z3e=b7();K3e.exports={moduleType:"component",name:"shapes",layoutAttributes:p$(),supplyLayoutDefaults:O3e(),supplyDrawNewShapeDefaults:V3e(),includeBasePlot:eM()("shapes"),calcAutorange:X3e(),draw:Z3e.draw,drawOne:Z3e.drawOne}});var m$=W((cRr,ewe)=>{"use strict";var Q3e=Gl(),x7t=Da().templatedArray,uRr=JA();ewe.exports=x7t("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",Q3e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Q3e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var rwe=W((fRr,twe)=>{"use strict";var _7t=it(),y$=ji(),b7t=Xc(),w7t=m$(),T7t="images";twe.exports=function(t,r){var i={name:T7t,handleItemDefaults:A7t};b7t(t,r,i)};function A7t(e,t,r){function i(h,d){return _7t.coerce(e,t,w7t,h,d)}var n=i("source"),a=i("visible",!!n);if(!a)return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=y$.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=y$.getFromId(o,c);f._imgIndices.push(t._index)}y$.coercePosition(t,o,i,c,u,0)}return t}});var owe=W((hRr,awe)=>{"use strict";var iwe=vi(),M7t=Ji(),e5=ji(),nwe=Cs(),S7t=sd();awe.exports=function(t){var r=t._fullLayout,i=[],n={},a=[],o,s;for(s=0;s{"use strict";var swe=sn(),E7t=cC();lwe.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";cwe.exports={moduleType:"component",name:"images",layoutAttributes:m$(),supplyLayoutDefaults:rwe(),includeBasePlot:eM()("images"),draw:owe(),convertCoords:uwe()}});var PF=W((vRr,hwe)=>{"use strict";hwe.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 x$=W((gRr,pwe)=>{"use strict";var k7t=Ho(),C7t=Vl(),D7t=tn().extendFlat,F7t=ls().overrideAll,L7t=HC(),dwe=Da().templatedArray,P7t=dwe("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}});pwe.exports=F7t(dwe("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:P7t,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:D7t(L7t({editType:"arraydraw"}),{}),font:k7t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C7t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var ywe=W((mRr,mwe)=>{"use strict";var IF=it(),vwe=Xc(),gwe=x$(),I7t=PF(),R7t=I7t.name,z7t=gwe.buttons;mwe.exports=function(t,r){var i={name:R7t,handleItemDefaults:B7t};vwe(t,r,i)};function B7t(e,t,r){function i(o,s){return IF.coerce(e,t,gwe,o,s)}var n=vwe(e,t,{name:"buttons",handleItemDefaults:q7t}),a=i("visible",n.length>0);a&&(i("active"),i("direction"),i("type"),i("showactive"),i("x"),i("y"),IF.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),IF.coerceFont(i,"font",r.font),i("bgcolor",r.paper_bgcolor),i("bordercolor"),i("borderwidth"))}function q7t(e,t){function r(n,a){return IF.coerce(e,t,z7t,n,a)}var i=r("visible",e.method==="skip"||Array.isArray(e.args));i&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var bwe=W((yRr,_we)=>{"use strict";_we.exports=Us;var Kp=vi(),xwe=ni(),t5=Ji(),RF=it();function Us(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})}Us.barWidth=2;Us.barLength=20;Us.barRadius=2;Us.barPad=1;Us.barColor="#808BA4";Us.prototype.enable=function(t,r,i){var n=this.gd._fullLayout,a=n.width,o=n.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,h=f==="down",d=f==="left",p=f==="right",v=f==="up",m=l,g=c,w,b,_,M;!h&&!d&&!p&&!v&&(this.position.direction="down",h=!0);var x=h||v;x?(w=s,b=w+m,h?(_=u,M=Math.min(_+g,o),g=M-_):(M=u+g,_=Math.max(M-g,0),g=M-_)):(_=u,M=_+g,d?(b=s+m,w=Math.max(b-m,0),m=b-w):(w=s,b=Math.min(w+m,a),m=b-w)),this._box={l:w,t:_,w:m,h:g};var T=l>m,A=Us.barLength+2*Us.barPad,y=Us.barWidth+2*Us.barPad,E=s,S=u+c;S+y>o&&(S=o-y);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(xwe.fill,Us.barColor),T?(this.hbar=C.attr({rx:Us.barRadius,ry:Us.barRadius,x:E,y:S,width:A,height:y}),this._hbarXMin=E+A/2,this._hbarTranslateMax=m-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=c>g,D=Us.barWidth+2*Us.barPad,F=Us.barLength+2*Us.barPad,P=s+l,R=u;P+D>a&&(P=a-D);var L=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(xwe.fill,Us.barColor),k?(this.vbar=L.attr({rx:Us.barRadius,ry:Us.barRadius,x:P,y:R,width:D,height:F}),this._vbarYMin=R+F/2,this._vbarTranslateMax=g-F):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,B=w-.5,O=k?b+D+.5:b+.5,$=_-.5,Y=T?M+y+.5:M+.5,K=n._topdefs.selectAll("#"+I).data(T||k?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",I).append("rect"),T||k?(this._clipRect=K.select("rect").attr({x:Math.floor(B),y:Math.floor($),width:Math.ceil(O)-Math.floor(B),height:Math.ceil(Y)-Math.floor($)}),this.container.call(t5.setClipUrl,I,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(t5.setClipUrl,null),delete this._clipRect),T||k){var j=Kp.behavior.drag().on("dragstart",function(){Kp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(j);var q=Kp.behavior.drag().on("dragstart",function(){Kp.event.sourceEvent.preventDefault(),Kp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),k&&this.vbar.on(".drag",null).call(q)}this.setTranslate(r,i)};Us.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t5.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)};Us.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Kp.event.dx),this.vbar&&(r-=Kp.event.dy),this.setTranslate(t,r)};Us.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Kp.event.deltaY),this.vbar&&(r+=Kp.event.deltaY),this.setTranslate(t,r)};Us.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var i=t+this._hbarXMin,n=i+this._hbarTranslateMax,a=RF.constrain(Kp.event.x,i,n),o=(a-i)/(n-i),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=RF.constrain(Kp.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Us.prototype.setTranslate=function(t,r){var i=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=RF.constrain(t||0,0,i),r=RF.constrain(r||0,0,n),this.translateX=t,this.translateY=r,this.container.call(t5.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 a=t/i;this.hbar.call(t5.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/n;this.vbar.call(t5.setTranslate,t,r+o*this._vbarTranslateMax)}}});var Fwe=W((xRr,Dwe)=>{"use strict";var r5=vi(),bM=Ko(),wM=ni(),i5=Ji(),M0=it(),zF=uo(),O7t=Da().arrayEditor,Twe=Hl().LINE_SPACING,Cn=PF(),N7t=bwe();Dwe.exports=function(t){var r=t._fullLayout,i=M0.filterVisible(r[Cn.name]);function n(h){bM.autoMargin(t,kwe(h))}var a=r._menulayer.selectAll("g."+Cn.containerClassName).data(i.length>0?[0]:[]);if(a.enter().append("g").classed(Cn.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){r5.select(this).selectAll("g."+Cn.headerGroupClassName).each(n)}).remove(),i.length!==0){var o=a.selectAll("g."+Cn.headerGroupClassName).data(i,U7t);o.enter().append("g").classed(Cn.headerGroupClassName,!0);for(var s=M0.ensureSingle(a,"g",Cn.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var Y7t=PF();Lwe.exports={moduleType:"component",name:Y7t.name,layoutAttributes:x$(),supplyLayoutDefaults:ywe(),draw:Fwe()}});var AM=W((bRr,Iwe)=>{"use strict";Iwe.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 T$=W((wRr,Bwe)=>{"use strict";var Rwe=Ho(),X7t=HC(),Z7t=tn().extendDeepAll,K7t=ls().overrideAll,J7t=J6(),zwe=Da().templatedArray,C_=AM(),Q7t=zwe("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}});Bwe.exports=K7t(zwe("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Q7t,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:Z7t(X7t({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:J7t.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:Rwe({})},font:Rwe({}),activebgcolor:{valType:"color",dflt:C_.gripBgActiveColor},bgcolor:{valType:"color",dflt:C_.railBgColor},bordercolor:{valType:"color",dflt:C_.railBorderColor},borderwidth:{valType:"number",min:0,dflt:C_.railBorderWidth},ticklen:{valType:"number",min:0,dflt:C_.tickLength},tickcolor:{valType:"color",dflt:C_.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:C_.minorTickLength}}),"arraydraw","from-root")});var Uwe=W((TRr,Nwe)=>{"use strict";var n5=it(),qwe=Xc(),Owe=T$(),eFt=AM(),tFt=eFt.name,rFt=Owe.steps;Nwe.exports=function(t,r){qwe(t,r,{name:tFt,handleItemDefaults:iFt})};function iFt(e,t,r){function i(f,h){return n5.coerce(e,t,Owe,f,h)}for(var n=qwe(e,t,{name:"steps",handleItemDefaults:nFt}),a=0,o=0;o{"use strict";var Jp=vi(),BF=Ko(),jy=ni(),Qp=Ji(),S0=it(),aFt=S0.strTranslate,MM=uo(),oFt=Da().arrayEditor,Qn=AM(),S$=Hl(),Hwe=S$.LINE_SPACING,A$=S$.FROM_TL,M$=S$.FROM_BR;Zwe.exports=function(t){var r=t._context.staticPlot,i=t._fullLayout,n=sFt(i,t),a=i._infolayer.selectAll("g."+Qn.containerClassName).data(n.length>0?[0]:[]);a.enter().append("g").classed(Qn.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),BF.autoMargin(t,jwe(c))}if(a.exit().each(function(){Jp.select(this).selectAll("g."+Qn.groupClassName).each(o)}).remove(),n.length!==0){var s=a.selectAll("g."+Qn.groupClassName).data(n,lFt);s.enter().append("g").classed(Qn.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",aFt(o-Qn.gripWidth*.5,t._dims.currentValueTotalHeight))}}function E$(e,t){var r=e._dims;return r.inputAreaStart+Qn.stepInset+(r.inputAreaLength-2*Qn.stepInset)*Math.min(1,Math.max(0,t))}function Gwe(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Qn.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Qn.stepInset-2*r.inputAreaStart)))}function vFt(e,t,r){var i=r._dims,n=S0.ensureSingle(e,"rect",Qn.railTouchRectClass,function(a){a.call(Ywe,t,e,r).style("pointer-events","all")});n.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,Qn.tickOffset+r.ticklen+i.labelHeight)}).call(jy.fill,r.bgcolor).attr("opacity",0),Qp.setTranslate(n,0,i.currentValueTotalHeight)}function gFt(e,t){var r=t._dims,i=r.inputAreaLength-Qn.railInset*2,n=S0.ensureSingle(e,"rect",Qn.railRectClass);n.attr({width:i,height:Qn.railWidth,rx:Qn.railRadius,ry:Qn.railRadius,"shape-rendering":"crispEdges"}).call(jy.stroke,t.bordercolor).call(jy.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Qp.setTranslate(n,Qn.railInset,(r.inputAreaWidth-Qn.railWidth)*.5+r.currentValueTotalHeight)}});var Qwe=W((MRr,Jwe)=>{"use strict";var mFt=AM();Jwe.exports={moduleType:"component",name:mFt.name,layoutAttributes:T$(),supplyLayoutDefaults:Uwe(),draw:Kwe()}});var OF=W((SRr,t5e)=>{"use strict";var e5e=Vl();t5e.exports={bgcolor:{valType:"color",dflt:e5e.background,editType:"plot"},bordercolor:{valType:"color",dflt:e5e.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 k$=W((ERr,r5e)=>{"use strict";r5e.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 NF=W((kRr,i5e)=>{"use strict";i5e.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 o5e=W(VF=>{"use strict";var yFt=Cs(),xFt=uo(),n5e=NF(),_Ft=Hl().LINE_SPACING,UF=n5e.name;function a5e(e){var t=e&&e[UF];return t&&t.visible}VF.isVisible=a5e;VF.makeData=function(e){for(var t=yFt.list({_fullLayout:e},"x",!0),r=e.margin,i=[],n=0;n{"use strict";var GF=it(),s5e=Da(),l5e=Cs(),bFt=OF(),wFt=k$();u5e.exports=function(t,r,i){var n=t[i],a=r[i];if(!(n.rangeslider||r._requestRangeslider[a._id]))return;GF.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,s=s5e.newContainer(a,"rangeslider");function l(M,x){return GF.coerce(o,s,bFt,M,x)}var u,c;function f(M,x){return GF.coerce(u,c,wFt,M,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var p=d.cartesian.filter(function(M){return M.slice(0,Math.max(0,M.indexOf("y")))===l5e.name2id(i)}).map(function(M){return M.slice(M.indexOf("y"),M.length)}),v=GF.simpleMap(p,l5e.id2name),m=0;m{"use strict";var TFt=Cs().list,AFt=Op().getAutoRange,MFt=NF();f5e.exports=function(t){for(var r=TFt(t,"x",!0),i=0;i{"use strict";var HF=vi(),SFt=yi(),EFt=Ko(),pl=it(),jF=pl.strTranslate,p5e=Ji(),$y=ni(),kFt=e_(),CFt=dl(),C$=Cs(),DFt=bf(),FFt=Np(),xa=NF();v5e.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i=L.max)P=S[R+1];else if(F=L.pmax)P=S[R+1];else if(F0?e.touches[0].clientX:0}function LFt(e,t,r,i){if(t._context.staticPlot)return;var n=e.select("rect."+xa.slideBoxClassName).node(),a=e.select("rect."+xa.grabAreaMinClassName).node(),o=e.select("rect."+xa.grabAreaMaxClassName).node();function s(){var l=HF.event,u=l.target,c=d5e(l),f=c-e.node().getBoundingClientRect().left,h=i.d2p(r._rl[0]),d=i.d2p(r._rl[1]),p=DFt.coverSlip();this.addEventListener("touchmove",v),this.addEventListener("touchend",m),p.addEventListener("mousemove",v),p.addEventListener("mouseup",m);function v(g){var w=d5e(g),b=+w-c,_,M,x;switch(u){case n:if(x="ew-resize",h+b>r._length||d+b<0)return;_=h+b,M=d+b;break;case a:if(x="col-resize",h+b>r._length)return;_=h+b,M=d;break;case o:if(x="col-resize",d+b<0)return;_=h,M=d+b;break;default:x="ew-resize",_=f,M=f+b;break}if(M<_){var T=M;M=_,_=T}i._pixelMin=_,i._pixelMax=M,FFt(HF.select(p),x),PFt(e,t,r,i)}function m(){p.removeEventListener("mousemove",v),p.removeEventListener("mouseup",m),this.removeEventListener("touchmove",v),this.removeEventListener("touchend",m),pl.removeElement(p)}}e.on("mousedown",s),e.on("touchstart",s)}function PFt(e,t,r,i){function n(s){return r.l2r(pl.constrain(s,i._rl[0],i._rl[1]))}var a=n(i.p2d(i._pixelMin)),o=n(i.p2d(i._pixelMax));window.requestAnimationFrame(function(){SFt.call("_guiRelayout",t,r._name+".range",[a,o])})}function IFt(e,t,r,i,n,a){var o=xa.handleWidth/2;function s(g){return pl.constrain(g,0,i._width)}function l(g){return pl.constrain(g,0,i._height)}function u(g){return pl.constrain(g,-o,i._width+o)}var c=s(i.d2p(r._rl[0])),f=s(i.d2p(r._rl[1]));if(e.select("rect."+xa.slideBoxClassName).attr("x",c).attr("width",f-c),e.select("rect."+xa.maskMinClassName).attr("width",c),e.select("rect."+xa.maskMaxClassName).attr("x",f).attr("width",i._width-f),a.rangemode!=="match"){var h=i._height-l(i.d2pOppAxis(n._rl[1])),d=i._height-l(i.d2pOppAxis(n._rl[0]));e.select("rect."+xa.maskMinOppAxisClassName).attr("x",c).attr("height",h).attr("width",f-c),e.select("rect."+xa.maskMaxOppAxisClassName).attr("x",c).attr("y",d).attr("height",i._height-d).attr("width",f-c),e.select("rect."+xa.slideBoxClassName).attr("y",h).attr("height",d-h)}var p=.5,v=Math.round(u(c-o))-p,m=Math.round(u(f-o))+p;e.select("g."+xa.grabberMinClassName).attr("transform",jF(v,p)),e.select("g."+xa.grabberMaxClassName).attr("transform",jF(m,p))}function RFt(e,t,r,i){var n=pl.ensureSingle(e,"rect",xa.bgClassName,function(l){l.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),a=i.borderwidth%2===0?i.borderwidth:i.borderwidth-1,o=-i._offsetShift,s=p5e.crispRound(t,i.borderwidth);n.attr({width:i._width+a,height:i._height+a,transform:jF(o,o),"stroke-width":s}).call($y.stroke,i.bordercolor).call($y.fill,i.bgcolor)}function zFt(e,t,r,i){var n=t._fullLayout,a=pl.ensureSingleById(n._topdefs,"clipPath",i._clipId,function(o){o.append("rect").attr({x:0,y:0})});a.select("rect").attr({width:i._width,height:i._height})}function BFt(e,t,r,i){var n=t.calcdata,a=e.selectAll("g."+xa.rangePlotClassName).data(r._subplotsWith,pl.identity);a.enter().append("g").attr("class",function(s){return xa.rangePlotClassName+" "+s}).call(p5e.setClipUrl,i._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,l){var u=HF.select(this),c=l===0,f=C$.getFromId(t,s,"y"),h=f._name,d=i[h],p={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(p.layout.xaxis.rangebreaks=r.rangebreaks),p.layout[h]={type:f.type,domain:[0,1],range:d.rangemode!=="match"?d.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(p.layout[h].rangebreaks=f.rangebreaks),EFt.supplyDefaults(p);var v=p._fullLayout.xaxis,m=p._fullLayout[h];v.clearCalc(),v.setScale(),m.clearCalc(),m.setScale();var g={id:s,plotgroup:u,xaxis:v,yaxis:m,isRangePlot:!0};c?o=g:(g.mainplot="xy",g.mainplotinfo=o),CFt.rangePlot(t,g,qFt(n,s))})}function qFt(e,t){for(var r=[],i=0;i{"use strict";var VFt=it(),GFt=OF(),HFt=k$(),D$=o5e();m5e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:VFt.extendFlat({},GFt,{yaxis:HFt})}}},layoutAttributes:OF(),handleDefaults:c5e(),calcAutorange:h5e(),draw:g5e(),isVisible:D$.isVisible,makeData:D$.makeData,autoMarginOpts:D$.autoMarginOpts}});var $F=W((IRr,_5e)=>{"use strict";var jFt=Ho(),x5e=Vl(),$Ft=Da().templatedArray,WFt=$Ft("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"});_5e.exports={visible:{valType:"boolean",editType:"plot"},buttons:WFt,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:jFt({editType:"plot"}),bgcolor:{valType:"color",dflt:x5e.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x5e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var F$=W((RRr,b5e)=>{"use strict";b5e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var A5e=W((zRr,T5e)=>{"use strict";var WF=it(),YFt=ni(),XFt=Da(),ZFt=Xc(),w5e=$F(),L$=F$();T5e.exports=function(t,r,i,n,a){var o=t.rangeselector||{},s=XFt.newContainer(r,"rangeselector");function l(d,p){return WF.coerce(o,s,w5e,d,p)}var u=ZFt(o,s,{name:"buttons",handleItemDefaults:KFt,calendar:a}),c=l("visible",u.length>0);if(c){var f=JFt(r,i,n);l("x",f[0]),l("y",f[1]),WF.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),WF.coerceFont(l,"font",i.font);var h=l("bgcolor");l("activecolor",YFt.contrast(h,L$.lightAmount,L$.darkAmount)),l("bordercolor"),l("borderwidth")}};function KFt(e,t,r,i){var n=i.calendar;function a(l,u){return WF.coerce(e,t,w5e.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(n&&n!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function JFt(e,t,r){for(var i=r.filter(function(s){return t[s].anchor===e._id}),n=0,a=0;a{"use strict";var QFt=vN(),eLt=it().titleCase;M5e.exports=function(t,r){var i=t._name,n={};if(r.step==="all")n[i+".autorange"]=!0;else{var a=tLt(t,r);n[i+".range[0]"]=a[0],n[i+".range[1]"]=a[1]}return n};function tLt(e,t){var r=e.range,i=new Date(e.r2l(r[1])),n=t.step,a=QFt["utc"+eLt(n)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(i,-o));break;case"todate":var l=a.offset(i,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var I5e=W((qRr,P5e)=>{"use strict";var XF=vi(),rLt=yi(),iLt=Ko(),E5e=ni(),L5e=Ji(),Gg=it(),k5e=Gg.strTranslate,YF=uo(),nLt=Cs(),R$=Hl(),C5e=R$.LINE_SPACING,D5e=R$.FROM_TL,F5e=R$.FROM_BR,I$=F$(),aLt=S5e();P5e.exports=function(t){var r=t._fullLayout,i=r._infolayer.selectAll(".rangeselector").data(oLt(t),sLt);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(n){var a=XF.select(this),o=n,s=o.rangeselector,l=a.selectAll("g.button").data(Gg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=XF.select(this),f=aLt(o,u);u._isActive=lLt(o,u,f),c.call(P$,s,u),c.call(cLt,s,u,t),c.on("click",function(){t._dragged||rLt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(P$,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(P$,s,u)})}),hLt(t,l,s,o._name,a)})};function oLt(e){for(var t=nLt.list(e,"x",!0),r=[],i=0;i{"use strict";R5e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:$F()}}},layoutAttributes:$F(),handleDefaults:A5e(),draw:I5e()}});var us=W(z$=>{"use strict";var B5e=tn().extendFlat;z$.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]},i=e.name?e.name+" ":"",n=e.trace?"trace":"subplot",a=t.description?" "+t.description:"",o={x:B5e({},r,{}),y:B5e({},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};z$.defaults=function(e,t,r,i){var n=i&&i.x||[0,1],a=i&&i.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var dLt=it(),pLt=(K3(),Go(Z3)).counter,vLt=us().attributes,q5e=Gl().idRegex,gLt=Da(),B$={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:[pLt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[q5e.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[q5e.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:vLt({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 ZF(e,t,r){var i=t[r+"axes"],n=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(i))return i;if(n.length)return n}function mLt(e,t){var r=e.grid||{},i=ZF(t,r,"x"),n=ZF(t,r,"y");if(!e.grid&&!i&&!n)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(i),s=Array.isArray(n),l=o&&i!==r.xaxes&&s&&n!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=n.length),o&&(c=i.length));var f=gLt.newContainer(t,"grid");function h(x,T){return dLt.coerce(r,f,B$,x,T)}var d=h("rows",u),p=h("columns",c);if(!(d*p>1)){delete t.grid;return}if(!a&&!o&&!s){var v=h("pattern")==="independent";v&&(a=!0)}f._hasSubplotGrid=a;var m=h("roworder"),g=m==="top to bottom",w=a?.2:.1,b=a?.3:.1,_,M;l&&t._splomGridDflt&&(_=t._splomGridDflt.xside,M=t._splomGridDflt.yside),f._domains={x:O5e("x",h,w,_,p),y:O5e("y",h,b,M,d,g)}}function O5e(e,t,r,i,n,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",i);for(var l=new Array(n),u=s[0],c=(s[1]-u)/(n-o),f=c*(1-o),h=0;h{"use strict";V5e.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 j5e=W((GRr,H5e)=>{"use strict";var G5e=sn(),xLt=yi(),_Lt=it(),bLt=Da(),wLt=O$();H5e.exports=function(e,t,r,i){var n="error_"+i.axis,a=bLt.newContainer(t,n),o=e[n]||{};function s(p,v){return _Lt.coerce(o,a,wLt,p,v)}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 h="copy_"+i.inherit+"style";if(i.inherit){var d=t["error_"+i.inherit];(d||{}).visible&&s(h,!(o.color||G5e(o.thickness)||G5e(o.width)))}(!i.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",xLt.traceIs(t,"gl3d")?0:4))}}});var N$=W((HRr,W5e)=>{"use strict";W5e.exports=function(t){var r=t.type,i=t.symmetric;if(r==="data"){var n=t.array||[];if(i)return function(u,c){var f=+n[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+n[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=$5e(r,t.value),s=$5e(r,t.valueminus);return i||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function $5e(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 Z5e=W((jRr,X5e)=>{"use strict";var U$=sn(),TLt=yi(),V$=ji(),ALt=it(),MLt=N$();X5e.exports=function(t){for(var r=t.calcdata,i=0;i{"use strict";var K5e=vi(),Wy=sn(),SLt=Ji(),ELt=$o();J5e.exports=function(t,r,i,n){var a,o=i.xaxis,s=i.yaxis,l=n&&n.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},p;f.ids&&(p=function(w){return w.id});var v=ELt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var m=K5e.select(this).selectAll("g.errorbar").data(c,p);if(m.exit().remove(),!!c.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),SLt.setClipUrl(m,i.layerClipId,t),m.each(function(w){var b=K5e.select(this),_=kLt(w,o,s);if(!(v&&!w.vis)){var M,x=b.select("path.yerror");if(d.visible&&Wy(_.x)&&Wy(_.yh)&&Wy(_.ys)){var T=d.width;M="M"+(_.x-T)+","+_.yh+"h"+2*T+"m-"+T+",0V"+_.ys,_.noYS||(M+="m-"+T+",0h"+2*T),a=!x.size(),a?x=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(n.duration).ease(n.easing)),x.attr("d",M)}else x.remove();var A=b.select("path.xerror");if(h.visible&&Wy(_.y)&&Wy(_.xh)&&Wy(_.xs)){var y=(h.copy_ystyle?d:h).width;M="M"+_.xh+","+(_.y-y)+"v"+2*y+"m0,-"+y+"H"+_.xs,_.noXS||(M+="m0,-"+y+"v"+2*y),a=!A.size(),a?A=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(A=A.transition().duration(n.duration).ease(n.easing)),A.attr("d",M)}else A.remove()}})}})};function kLt(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),Wy(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),Wy(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}});var r4e=W((WRr,t4e)=>{"use strict";var CLt=vi(),e4e=ni();t4e.exports=function(t){t.each(function(r){var i=r[0].trace,n=i.error_y||{},a=i.error_x||{},o=CLt.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(e4e.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(e4e.stroke,a.color)})}});var a4e=W((YRr,n4e)=>{"use strict";var SM=it(),i4e=ls().overrideAll,EM=O$(),D_={error_x:SM.extendFlat({},EM),error_y:SM.extendFlat({},EM)};delete D_.error_x.copy_zstyle;delete D_.error_y.copy_zstyle;delete D_.error_y.copy_ystyle;var kM={error_x:SM.extendFlat({},EM),error_y:SM.extendFlat({},EM),error_z:SM.extendFlat({},EM)};delete kM.error_x.copy_ystyle;delete kM.error_y.copy_ystyle;delete kM.error_z.copy_ystyle;delete kM.error_z.copy_zstyle;n4e.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:D_,bar:D_,histogram:D_,scatter3d:i4e(kM,"calc","nested"),scattergl:i4e(D_,"calc","nested")}},supplyDefaults:j5e(),calc:Z5e(),makeComputeError:N$(),plot:Q5e(),style:r4e(),hoverInfo:DLt};function DLt(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 s4e=W((XRr,o4e)=>{"use strict";o4e.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 v4e=W((ZRr,p4e)=>{"use strict";var Yy=vi(),JF=Ko(),l4e=yi(),Hg=ji(),KF=bf(),Sd=it(),tv=Sd.strTranslate,d4e=tn().extendFlat,G$=Np(),ev=Ji(),a5=ni(),FLt=e_(),LLt=uo(),PLt=bc().flipScale,ILt=mM(),RLt=TF(),zLt=ec(),j$=Hl(),u4e=j$.LINE_SPACING,c4e=j$.FROM_TL,f4e=j$.FROM_BR,Fs=s4e().cn;function BLt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Fs.colorbar).data(qLt(e),function(i){return i._id});r.enter().append("g").attr("class",function(i){return i._id}).classed(Fs.colorbar,!0),r.each(function(i){var n=Yy.select(this);Sd.ensureSingle(n,"rect",Fs.cbbg),Sd.ensureSingle(n,"g",Fs.cbfills),Sd.ensureSingle(n,"g",Fs.cblines),Sd.ensureSingle(n,"g",Fs.cbaxis,function(o){o.classed(Fs.crisp,!0)}),Sd.ensureSingle(n,"g",Fs.cbtitleunshift,function(o){o.append("g").classed(Fs.cbtitle,!0)}),Sd.ensureSingle(n,"rect",Fs.cboutline);var a=OLt(n,i,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&NLt(n,i,e)}),r.exit().each(function(i){JF.autoMargin(e,i._id)}).remove(),r.order()}function qLt(e){var t=e._fullLayout,r=e.calcdata,i=[],n,a,o,s;function l(b){return d4e(b,{_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,n):(n._fillgradient=a.reversescale?PLt(a.colorscale):a.colorscale,n._zrange=[a[s.min],a[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],h4e=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function OLt(e,t,r){var i=t.orientation==="v",n=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,d=t.xpad,p=t.ypad,v=t.x,m=i?t.y:1-t.y,g=t.yref==="paper",w=t.xref==="paper",b=r._fullLayout,_=b._size,M=t._fillcolor,x=t._line,T=t.title,A=T.side,y=t._zrange||Yy.extent((typeof M=="function"?M:x.color).domain()),E=typeof x.color=="function"?x.color:function(){return x.color},S=typeof M=="function"?M:function(){return M},C=t._levels,k=ULt(r,t,y),D=k.fill,F=k.line,P=Math.round(o*(s==="fraction"?i?_.w:_.h:1)),R=P/(i?_.w:_.h),L=Math.round(n*(a==="fraction"?i?_.h:_.w:1)),I=L/(i?_.h:_.w),B=w?_.w:r._fullLayout.width,O=g?_.h:r._fullLayout.height,$=Math.round(i?v*B+d:m*O+p),Y={center:.5,right:1}[f]||0,K={top:1,middle:.5}[h]||0,j=i?v-Y*R:m-K*R,q=i?m-K*I:v-Y*I,J=Math.round(i?O*(1-q):B*q);t._lenFrac=I,t._thickFrac=R,t._uFrac=j,t._vFrac=q;var U=t._axis=VLt(r,t,y);U.position=R+(i?v+d/_.w:m+p/_.h);var V=["top","bottom"].indexOf(A)!==-1;if(i&&V&&(U.title.side=A,U.titlex=v+d/_.w,U.titley=q+(T.side==="top"?I-p/_.h:p/_.h)),!i&&!V&&(U.title.side=A,U.titley=m+p/_.h,U.titlex=q+d/_.w),x.color&&t.tickmode==="auto"){U.tickmode="linear",U.tick0=C.start;var X=C.size,H=Sd.constrain(L/50,4,15)+1,G=(y[1]-y[0])/((t.nticks||H)*X);if(G>1){var Q=Math.pow(10,Math.floor(Math.log(G)/Math.LN10));X*=Q*Sd.roundUp(G/Q,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(U.tick0=0)}U.dtick=X}var te=i?p/_.h:d/_.w;U.domain=h4e(H$([q,q+I],te),te),U.setScale(),e.attr("transform",tv(Math.round(_.l),Math.round(_.t)));var ce=e.select("."+Fs.cbtitleunshift).attr("transform",tv(-Math.round(_.l),-Math.round(_.t))),ge=U.ticklabelposition,Ce=U.title.font.size,be=e.select("."+Fs.cbaxis),he,oe=0,Ee=0;function ye(re,pe){var we={propContainer:U,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:b._dfltTitle.colorbar,containerGroup:e.select("."+Fs.cbtitle)},Fe=re.charAt(0)==="h"?re.slice(1):"h"+re;e.selectAll("."+Fe+",."+Fe+"-math-group").remove(),FLt.draw(r,re,d4e(we,pe||{}))}function ue(){if(i&&V||!i&&!V){var re,pe;A==="top"&&(re=d+_.l+B*v,pe=p+_.t+O*(1-q-I)+3+Ce*.75),A==="bottom"&&(re=d+_.l+B*v,pe=p+_.t+O*(1-q)-3-Ce*.25),A==="right"&&(pe=p+_.t+O*m+3+Ce*.75,re=d+_.l+B*q),ye(U._id+"title",{attributes:{x:re,y:pe,"text-anchor":i?"start":"middle"}})}}function ee(){if(i&&!V||!i&&V){var re=U.position||0,pe=U._offset+U._length/2,we,Fe;if(A==="right")Fe=pe,we=_.l+B*re+10+Ce*(U.showticklabels?1:.5);else if(we=pe,A==="bottom"&&(Fe=_.t+O*re+10+(ge.indexOf("inside")===-1?U.tickfont.size:0)+(U.ticks!=="inside"&&t.ticklen||0)),A==="top"){var Se=T.text.split("
").length;Fe=_.t+O*re+10-P-u4e*Ce*Se}ye((i?"h":"v")+U._id+"title",{avoid:{selection:Yy.select(r).selectAll("g."+U._id+"tick"),side:A,offsetTop:i?0:_.t,offsetLeft:i?_.l:0,maxShift:i?b.width:b.height},attributes:{x:we,y:Fe,"text-anchor":"middle"},transform:{rotate:i?-90:0,offset:0}})}}function ae(){if(!i&&!V||i&&V){var re=e.select("."+Fs.cbtitle),pe=re.select("text"),we=[-l/2,l/2],Fe=re.select(".h"+U._id+"title-math-group").node(),Se=15.6;pe.node()&&(Se=parseInt(pe.node().style.fontSize,10)*u4e);var ke;if(Fe?(ke=ev.bBox(Fe),Ee=ke.width,oe=ke.height,oe>Se&&(we[1]-=(oe-Se)/2)):pe.node()&&!pe.classed(Fs.jsPlaceholder)&&(ke=ev.bBox(pe.node()),Ee=ke.width,oe=ke.height),i){if(oe){if(oe+=5,A==="top")U.domain=h4e(U.domain,oe/_.h),we[1]*=-1;else{U.domain=H$(U.domain,oe/_.h);var _e=LLt.lineCount(pe);we[1]+=(1-_e)*Se}re.attr("transform",tv(we[0],we[1])),U.setScale()}}else Ee&&(A==="right"&&(U.domain=H$(U.domain,(Ee+Ce/2)/_.w)),re.attr("transform",tv(we[0],we[1])),U.setScale())}e.selectAll("."+Fs.cbfills+",."+Fs.cblines).attr("transform",i?tv(0,Math.round(_.h*(1-U.domain[1]))):tv(Math.round(_.w*U.domain[0]),0)),be.attr("transform",i?tv(0,Math.round(-_.t)):tv(Math.round(-_.l),0));var Ie=e.select("."+Fs.cbfills).selectAll("rect."+Fs.cbfill).attr("style","").data(D);Ie.enter().append("rect").classed(Fs.cbfill,!0).attr("style",""),Ie.exit().remove();var Oe=y.map(U.c2p).map(Math.round).sort(function(vt,Xe){return vt-Xe});Ie.each(function(vt,Xe){var mt=[Xe===0?y[0]:(D[Xe]+D[Xe-1])/2,Xe===D.length-1?y[1]:(D[Xe]+D[Xe+1])/2].map(U.c2p).map(Math.round);i&&(mt[1]=Sd.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Oe[0],Oe[1]));var bt=Yy.select(this).attr(i?"x":"y",$).attr(i?"y":"x",Yy.min(mt)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(Yy.max(mt)-Yy.min(mt),2));if(t._fillgradient)ev.gradient(bt,r,t._id,i?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ne=S(vt).replace("e-","");bt.attr("fill",a5.hexString(Ne))}});var Qe=e.select("."+Fs.cblines).selectAll("path."+Fs.cbline).data(x.color&&x.width?F:[]);Qe.enter().append("path").classed(Fs.cbline,!0),Qe.exit().remove(),Qe.each(function(vt){var Xe=$,mt=Math.round(U.c2p(vt))+x.width/2%1;Yy.select(this).attr("d","M"+(i?Xe+","+mt:mt+","+Xe)+(i?"h":"v")+P).call(ev.lineGroupStyle,x.width,E(vt),x.dash)}),be.selectAll("g."+U._id+"tick,path").remove();var et=$+P+(l||0)/2-(t.ticks==="outside"?1:0),_t=Hg.calcTicks(U),ut=Hg.getTickSigns(U)[2];return Hg.drawTicks(r,U,{vals:U.ticks==="inside"?Hg.clipEnds(U,_t):_t,layer:be,path:Hg.makeTickPath(U,et,ut),transFn:Hg.makeTransTickFn(U)}),Hg.drawLabels(r,U,{vals:_t,layer:be,transFn:Hg.makeTransTickLabelFn(U),labelFns:Hg.makeLabelFns(U,et)})}function xe(){var re,pe=P+l/2;ge.indexOf("inside")===-1&&(re=ev.bBox(be.node()),pe+=i?re.width:re.height),he=ce.select("text");var we=0,Fe=i&&A==="top",Se=!i&&A==="right",ke=0;if(he.node()&&!he.classed(Fs.jsPlaceholder)){var _e,Ie=ce.select(".h"+U._id+"title-math-group").node();Ie&&(i&&V||!i&&!V)?(re=ev.bBox(Ie),we=re.width,_e=re.height):(re=ev.bBox(ce.node()),we=re.right-_.l-(i?$:J),_e=re.bottom-_.t-(i?J:$),!i&&A==="top"&&(pe+=re.height,ke=re.height)),Se&&(he.attr("transform",tv(we/2+Ce/2,0)),we*=2),pe=Math.max(pe,i?we:_e)}var Oe=(i?d:p)*2+pe+u+l/2,Qe=0;!i&&T.text&&h==="bottom"&&m<=0&&(Qe=Oe/2,Oe+=Qe,ke+=Qe),b._hColorbarMoveTitle=Qe,b._hColorbarMoveCBTitle=ke;var et=u+l,_t=(i?$:J)-et/2-(i?d:0),ut=(i?J:$)-(i?L:p+ke-Qe);e.select("."+Fs.cbbg).attr("x",_t).attr("y",ut).attr(i?"width":"height",Math.max(Oe-Qe,2)).attr(i?"height":"width",Math.max(L+et,2)).call(a5.fill,c).call(a5.stroke,t.bordercolor).style("stroke-width",u);var vt=Se?Math.max(we-10,0):0;e.selectAll("."+Fs.cboutline).attr("x",(i?$:J+d)+vt).attr("y",(i?J+p-L:$)+(Fe?oe:0)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(L-(i?2*p+oe:2*d+vt),2)).call(a5.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Xe=i?Y*Oe:0,mt=i?0:(1-K)*Oe-ke;if(Xe=w?_.l-Xe:-Xe,mt=g?_.t-mt:-mt,e.attr("transform",tv(Xe,mt)),!i&&(u||a5.opacity(c)&&!a5.equals(b.paper_bgcolor,c))){var bt=be.selectAll("text"),Ne=bt[0].length,Ue=e.select("."+Fs.cbbg).node(),Ge=ev.bBox(Ue),je=ev.getTranslate(e),Re=2;bt.each(function(kr,$e){var tt=0,st=Ne-1;if($e===tt||$e===st){var xt=ev.bBox(this),Je=ev.getTranslate(this),Ct;if($e===st){var ir=xt.right+Je.x,hr=Ge.right+je.x+J-u-Re+v;Ct=hr-ir,Ct>0&&(Ct=0)}else if($e===tt){var Ur=xt.left+Je.x,si=Ge.left+je.x+J+u+Re;Ct=si-Ur,Ct<0&&(Ct=0)}Ct&&(Ne<3?this.setAttribute("transform","translate("+Ct+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ve={},ct=c4e[f],Tt=f4e[f],Xt=c4e[h],Vt=f4e[h],lr=Oe-P;i?(a==="pixels"?(Ve.y=m,Ve.t=L*Xt,Ve.b=L*Vt):(Ve.t=Ve.b=0,Ve.yt=m+n*Xt,Ve.yb=m-n*Vt),s==="pixels"?(Ve.x=v,Ve.l=Oe*ct,Ve.r=Oe*Tt):(Ve.l=lr*ct,Ve.r=lr*Tt,Ve.xl=v-o*ct,Ve.xr=v+o*Tt)):(a==="pixels"?(Ve.x=v,Ve.l=L*ct,Ve.r=L*Tt):(Ve.l=Ve.r=0,Ve.xl=v+n*ct,Ve.xr=v-n*Tt),s==="pixels"?(Ve.y=1-m,Ve.t=Oe*Xt,Ve.b=Oe*Vt):(Ve.t=lr*Xt,Ve.b=lr*Vt,Ve.yt=m-o*Xt,Ve.yb=m+o*Vt));var ur=t.y<.5?"b":"t",Bt=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zt={r:b.width-_t-Xe,l:_t+Ve.r,b:b.height-ut-mt,t:ut+Ve.b};w&&g?JF.autoMargin(r,t._id,Ve):w?r._fullLayout._reservedMargin[t._id][ur]=Zt[ur]:g||i?r._fullLayout._reservedMargin[t._id][Bt]=Zt[Bt]:r._fullLayout._reservedMargin[t._id][ur]=Zt[ur]}return Sd.syncOrAsync([JF.previousPromises,ue,ae,ee,JF.previousPromises,xe],r)}function NLt(e,t,r){var i=t.orientation==="v",n=r._fullLayout,a=n._size,o,s,l;KF.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),G$(e)},moveFn:function(u,c){e.attr("transform",o+tv(u,c)),s=KF.align((i?t._uFrac:t._vFrac)+u/a.w,i?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=KF.align((i?t._vFrac:1-t._uFrac)-c/a.h,i?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=KF.getCursor(s,l,t.xanchor,t.yanchor);G$(e,f)},doneFn:function(){if(G$(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?l4e.call("_guiRestyle",r,u,t._traceIndex):l4e.call("_guiRelayout",r,u)}}})}function ULt(e,t,r){var i=t._levels,n=[],a=[],o,s,l=i.end+i.size/100,u=i.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=i.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";g4e.exports={moduleType:"component",name:"colorbar",attributes:yD(),supplyDefaults:JV(),draw:v4e().draw,hasColorbar:jV()}});var x4e=W((JRr,y4e)=>{"use strict";y4e.exports={moduleType:"component",name:"legend",layoutAttributes:$G(),supplyLayoutDefaults:YG(),draw:lH(),style:nH()}});var b4e=W((QRr,_4e)=>{"use strict";_4e.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 T4e=W((ezr,w4e)=>{"use strict";w4e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var W$=W((tzr,E4e)=>{"use strict";var GLt=yi(),S4e=it(),$$=S4e.extendFlat,A4e=S4e.extendDeep;function M4e(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 HLt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}E4e.exports=function(t,r){var i,n=t.data,a=t.layout,o=A4e([],n),s=A4e({},a,M4e(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(i=0;i{"use strict";var jLt=Vx().EventEmitter,$Lt=yi(),WLt=it(),k4e=Ng(),YLt=W$(),XLt=iF(),ZLt=nF();function KLt(e,t){var r=new jLt,i=YLt(e,{format:"png"}),n=i.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function a(){var s=k4e.getDelay(n._fullLayout);setTimeout(function(){var l=XLt(n),u=document.createElement("canvas");u.id=WLt.randstr(),r=ZLt({format:t.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){n&&document.body.removeChild(n)}},s)}var o=k4e.getRedrawFunc(n);return $Lt.call("_doPlot",n,i.data,i.layout,i.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}C4e.exports=KLt});var P4e=W((izr,L4e)=>{"use strict";var F4e=Ng(),JLt={getDelay:F4e.getDelay,getRedrawFunc:F4e.getRedrawFunc,clone:W$(),toSVG:iF(),svgToImg:nF(),toImage:D4e(),downloadImage:Ej()};L4e.exports=JLt});var R4e=W(jg=>{"use strict";jg.version=E6().version;Yse();z0e();var QLt=yi(),CM=jg.register=QLt.register,X$=e_e(),I4e=Object.keys(X$);for(QF=0;QF{"use strict";z4e.exports=R4e()});var w1=W((ozr,V4e)=>{"use strict";var il=Ns(),q4e=_s().axisHoverFormat,{hovertemplateAttrs:e9t,texttemplateAttrs:t9t,templatefallbackAttrs:O4e}=Ga(),U4e=Eo(),r9t=Ho(),N4e=Uy(),i9t=Du().pattern,F_=tn().extendFlat,Z$=r9t({editType:"calc",arrayOk:!0,colorEditType:"style"}),n9t=il.marker,a9t=n9t.line,o9t=F_({},a9t.width,{dflt:0}),s9t=F_({width:o9t,editType:"calc"},U4e("marker.line")),l9t=F_({line:s9t,editType:"calc"},U4e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:i9t,cornerradius:{valType:"any",editType:"calc"}});V4e.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:q4e("x"),yhoverformat:q4e("y"),text:il.text,texttemplate:t9t({editType:"plot"},{keys:N4e.eventDataKeys}),texttemplatefallback:O4e({editType:"plot"}),hovertext:il.hovertext,hovertemplate:e9t({},{keys:N4e.eventDataKeys}),hovertemplatefallback:O4e(),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:F_({},Z$,{}),insidetextfont:F_({},Z$,{}),outsidetextfont:F_({},Z$,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:F_({},il.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:l9t,offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,selected:{marker:{opacity:il.selected.marker.opacity,color:il.selected.marker.color,editType:"style"},textfont:il.selected.textfont,editType:"style"},unselected:{marker:{opacity:il.unselected.marker.opacity,color:il.unselected.marker.color,editType:"style"},textfont:il.unselected.textfont,editType:"style"},zorder:il.zorder}});var tL=W((szr,G4e)=>{"use strict";G4e.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 rL=W((lzr,$4e)=>{"use strict";var u9t=ni(),H4e=bc().hasColorscale,j4e=Fu(),c9t=it().coercePattern;$4e.exports=function(t,r,i,n,a){var o=i("marker.color",n),s=H4e(t,"marker");s&&j4e(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("marker.line.color",u9t.defaultLine),H4e(t,"marker.line")&&j4e(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width"),i("marker.opacity"),c9t(i,"marker.pattern",o,s),i("selected.marker.color"),i("unselected.marker.color")}});var E0=W((uzr,J4e)=>{"use strict";var W4e=sn(),s5=it(),Y4e=ni(),f9t=yi(),h9t=x_(),d9t=Hp(),p9t=rL(),v9t=__(),X4e=w1(),iL=s5.coerceFont;function g9t(e,t,r,i){function n(u,c){return s5.coerce(e,t,X4e,u,c)}var a=h9t(e,t,i,n);if(!a){t.visible=!1;return}d9t(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");K4e(e,t,i,n,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p9t(e,t,n,r,i);var s=(t.marker.line||{}).color,l=f9t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||Y4e.defaultLine,{axis:"y"}),l(e,t,s||Y4e.defaultLine,{axis:"x",inherit:"y"}),s5.coerceSelectionMarkerOpacity(t,n)}function m9t(e,t){var r,i;function n(s,l){return s5.coerce(i._input,i,X4e,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&W4e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function K4e(e,t,r,i,n,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",v=d||n==="outside";if(p||v){var m=iL(i,"textfont",r.font),g=s5.extendFlat({},m),w=e.textfont&&e.textfont.color,b=!w;if(b&&delete g.color,iL(i,"insidetextfont",g),h){var _=s5.extendFlat({},m);b&&delete _.color,iL(i,"pathbar.textfont",_)}v&&iL(i,"outsidetextfont",m),o&&i("selected.textfont.color"),s&&i("unselected.textfont.color"),l&&i("constraintext"),u&&i("cliponaxis"),c&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}p&&f&&i("insidetextanchor")}J4e.exports={supplyDefaults:g9t,crossTraceDefaults:m9t,handleText:K4e,validateCornerradius:Z4e}});var K$=W((czr,Q4e)=>{"use strict";var y9t=yi(),x9t=ji(),_9t=it(),b9t=tL(),w9t=E0().validateCornerradius;Q4e.exports=function(e,t,r){function i(v,m){return _9t.coerce(e,t,b9t,v,m)}for(var n=!1,a=!1,o=!1,s={},l=i("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=x9t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!n){delete t.barmode;return}l!=="overlay"&&i("barnorm"),i("bargap",a&&!o?0:.2),i("bargroupgap");var p=i("barcornerradius");t.barcornerradius=w9t(p)}});var DM=W((fzr,eTe)=>{"use strict";var l5=it();eTe.exports=function(t,r){for(var i=0;i{"use strict";var tTe=ji(),rTe=Wp(),iTe=bc().hasColorscale,nTe=Zc(),T9t=DM(),A9t=w0();aTe.exports=function(t,r){var i=tTe.getFromId(t,r.xaxis||"x"),n=tTe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=i.makeCalcdata(r,"x",f),s=n.makeCalcdata(r,"y"),l=rTe(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y",f),s=i.makeCalcdata(r,"x"),l=rTe(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),p=0;p{"use strict";var M9t=vi(),S9t=it();function E9t(e,t,r){var i=e._fullLayout,n=i["_"+r+"Text_minsize"];if(n){var a=i.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=a&&l.hide?0:n/l.fontSize;var u=M9t.select(this).select("text");S9t.setTransormAndDisplay(u,l)}})}}function k9t(e,t,r){if(r.uniformtext.mode){var i=sTe(e),n=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var D9t=ni(),F9t=sn(),uTe=it().isArrayOrTypedArray;L_.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};L_.coerceNumber=function(e,t,r){if(F9t(t)){t=+t;var i=e.min,n=e.max,a=i!==void 0&&tn;if(!a)return t}return r!==void 0?r:e.dflt};L_.coerceColor=function(e,t,r){return D9t.isValid(t)?t:r!==void 0?r:e.dflt};L_.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};L_.getValue=function(e,t){var r;return uTe(e)?t{"use strict";var FM=vi(),L9t=ni(),LM=Ji(),cTe=it(),fTe=yi(),hTe=Qc().resizeText,J$=w1(),P9t=J$.textfont,I9t=J$.insidetextfont,R9t=J$.outsidetextfont,Mc=nL();function z9t(e){var t=FM.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");hTe(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(i.barmode==="stack"&&r>1||i.bargap===0&&i.bargroupgap===0&&!n[0].trace.marker.line.width)&&FM.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(n){var a=FM.select(this),o=n[0].trace;dTe(a,o,e)}),fTe.getComponentMethod("errorbars","style")(t)}function dTe(e,t,r){LM.pointStyle(e.selectAll("path"),t,r),pTe(e,t,r)}function pTe(e,t,r){e.selectAll("text").each(function(i){var n=FM.select(this),a=cTe.ensureUniformFontSize(r,vTe(n,i,t,r));LM.font(n,a)})}function B9t(e,t,r){var i=t[0].trace;i.selectedpoints?q9t(r,i,e):(dTe(r,i,e),fTe.getComponentMethod("errorbars","style")(r))}function q9t(e,t,r){LM.selectedPointStyle(e.selectAll("path"),t),O9t(e.selectAll("text"),t,r)}function O9t(e,t,r){e.each(function(i){var n=FM.select(this),a;if(i.selected){a=cTe.ensureUniformFontSize(r,vTe(n,i,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),LM.font(n,a)}else LM.selectedTextStyle(n,t)})}function vTe(e,t,r,i){var n=i._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=xTe(t,r);a=mTe(r,t.i,n,o)}else e.classed("bartext-outside")&&(a=yTe(r,t.i,n));return a}function gTe(e,t,r){return Q$(P9t,e.textfont,t,r)}function mTe(e,t,r,i){var n=gTe(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(n={color:L9t.contrast(i),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),Q$(I9t,e.insidetextfont,t,n)}function yTe(e,t,r){var i=gTe(e,t,r);return Q$(R9t,e.outsidetextfont,t,i)}function Q$(e,t,r,i){t=t||{};var n=Mc.getValue(t.family,r),a=Mc.getValue(t.size,r),o=Mc.getValue(t.color,r),s=Mc.getValue(t.weight,r),l=Mc.getValue(t.style,r),u=Mc.getValue(t.variant,r),c=Mc.getValue(t.textcase,r),f=Mc.getValue(t.lineposition,r),h=Mc.getValue(t.shadow,r);return{family:Mc.coerceString(e.family,n,i.family),size:Mc.coerceNumber(e.size,a,i.size),color:Mc.coerceColor(e.color,o,i.color),weight:Mc.coerceString(e.weight,s,i.weight),style:Mc.coerceString(e.style,l,i.style),variant:Mc.coerceString(e.variant,u,i.variant),textcase:Mc.coerceString(e.variant,c,i.textcase),lineposition:Mc.coerceString(e.variant,f,i.lineposition),shadow:Mc.coerceString(e.variant,h,i.shadow)}}function xTe(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}_Te.exports={style:z9t,styleTextPoints:pTe,styleOnSelect:B9t,getInsideTextFont:mTe,getOutsideTextFont:yTe,getBarColor:xTe,resizeText:hTe}});var I_=W((gzr,kTe)=>{"use strict";var aL=vi(),oL=sn(),rc=it(),N9t=uo(),U9t=ni(),Xy=Ji(),V9t=yi(),sL=ji().tickText,bTe=Qc(),G9t=bTe.recordMinTextSize,H9t=bTe.clearMinTextSize,eW=Ed(),u5=nL(),j9t=Uy(),wTe=w1(),$9t=wTe.text,W9t=wTe.textposition,Y9t=Kf().appendArrayPointValue,Ef=j9t.TEXTPAD;function X9t(e){return e.id}function Z9t(e){if(e.ids)return X9t}function tW(e){return(e>0)-(e<0)}function rv(e,t){return e0}function J9t(e,t,r,i,n,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;n||(n={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},H9t("bar",l));var c=rc.makeTraceGroups(i,r,"trace bars").each(function(f){var h=aL.select(this),d=f[0].trace,p=f[0].t,v=d.type==="waterfall",m=d.type==="funnel",g=d.type==="histogram",w=d.type==="bar",b=w||m,_=0;v&&d.connector.visible&&d.connector.mode==="between"&&(_=d.connector.line.width/2);var M=d.orientation==="h",x=ATe(n),T=rc.ensureSingle(h,"g","points"),A=Z9t(d),y=T.selectAll("g.point").data(rc.identity,A);y.enter().append("g").classed("point",!0),y.exit().remove(),y.each(function(S,C){var k=aL.select(this),D=K9t(S,o,s,M),F=D[0][0],P=D[0][1],R=D[1][0],L=D[1][1],I=(M?P-F:L-R)===0;I&&b&&u5.getLineWidth(d,S)&&(I=!1),I||(I=!oL(F)||!oL(P)||!oL(R)||!oL(L)),S.isBlank=I,I&&(M?P=F:L=R),_&&!I&&(M?(F-=rv(F,P)*_,P+=rv(F,P)*_):(R-=rv(R,L)*_,L+=rv(R,L)*_));var B,O;if(d.type==="waterfall"){if(!I){var $=d[S.dir].marker;B=$.line.width,O=$.color}}else B=u5.getLineWidth(d,S),O=S.mc||d.marker.color;function Y(re){var pe=aL.round(B/2%1,2);return n.gap===0&&n.groupgap===0?aL.round(Math.round(re)-pe,2):re}function K(re,pe,we){return we&&re===pe?re:Math.abs(re-pe)>=2?Y(re):re>pe?Math.ceil(re):Math.floor(re)}var j=U9t.opacity(O),q=j<1||B>.01?Y:K;e._context.staticPlot||(F=q(F,P,M),P=q(P,F,M),R=q(R,L,!M),L=q(L,R,!M));var J=M?o.c2p:s.c2p,U;S.s0>0?U=S._sMax:S.s0<0?U=S._sMin:U=S.s1>0?S._sMax:S._sMin;function V(re,pe){if(!re)return 0;var we=Math.abs(M?L-R:P-F),Fe=Math.abs(M?P-F:L-R),Se=q(Math.abs(J(U,!0)-J(0,!0))),ke=S.hasB?Math.min(we/2,Fe/2):Math.min(we/2,Se),_e;if(pe==="%"){var Ie=Math.min(50,re);_e=we*(Ie/100)}else _e=re;return q(Math.max(Math.min(_e,ke),0))}var X=w||g?V(p.cornerradiusvalue,p.cornerradiusform):0,H,G,Q="M"+F+","+R+"V"+L+"H"+P+"V"+R+"Z",te=0;if(X&&S.s){var ce=tW(S.s0)===0||tW(S.s)===tW(S.s0)?S.s1:S.s0;if(te=q(S.hasB?0:Math.abs(J(U,!0)-J(ce,!0))),te0?Math.sqrt(te*(2*X-te)):0,Ee=ge>0?Math.max:Math.min;H="M"+F+","+R+"V"+(L-he*Ce)+"H"+Ee(P-(X-te)*ge,F)+"A "+X+","+X+" 0 0 "+be+" "+P+","+(L-X*Ce-oe)+"V"+(R+X*Ce+oe)+"A "+X+","+X+" 0 0 "+be+" "+Ee(P-(X-te)*ge,F)+","+(R+he*Ce)+"Z"}else if(S.hasB)H="M"+(F+X*ge)+","+R+"A "+X+","+X+" 0 0 "+be+" "+F+","+(R+X*Ce)+"V"+(L-X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(F+X*ge)+","+L+"H"+(P-X*ge)+"A "+X+","+X+" 0 0 "+be+" "+P+","+(L-X*Ce)+"V"+(R+X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(P-X*ge)+","+R+"Z";else{G=Math.abs(L-R)+te;var ye=G0?Math.sqrt(te*(2*X-te)):0,ee=Ce>0?Math.max:Math.min;H="M"+(F+ye*ge)+","+R+"V"+ee(L-(X-te)*Ce,R)+"A "+X+","+X+" 0 0 "+be+" "+(F+X*ge-ue)+","+L+"H"+(P-X*ge+ue)+"A "+X+","+X+" 0 0 "+be+" "+(P-ye*ge)+","+ee(L-(X-te)*Ce,R)+"V"+R+"Z"}}else H=Q}else H=Q;var ae=TTe(rc.ensureSingle(k,"path"),l,n,a);if(ae.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((P-F)*(L-R))||I&&e._context.staticPlot?"M0,0Z":H).call(Xy.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var xe=Xy.makePointStyleFns(d);Xy.singlePointStyle(S,ae,d,xe,e)}Q9t(e,t,k,f,C,F,P,R,L,X,te,n,a),t.layerClipId&&Xy.hideOutsideRangePoint(S,k.select("text"),o,s,d.xcalendar,d.ycalendar)});var E=d.cliponaxis===!1;Xy.setClipUrl(h,E?null:t.layerClipId,e)});V9t.getComponentMethod("errorbars","plot")(e,c,t,n)}function Q9t(e,t,r,i,n,a,o,s,l,u,c,f,h){var d=t.xaxis,p=t.yaxis,v=e._fullLayout,m;function g(Q,te,ce){var ge=rc.ensureSingle(Q,"text").text(te).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(Xy.font,ce).call(N9t.convertToTspans,e);return ge}var w=i[0].trace,b=w.orientation==="h",_=nPt(i,b,d,p),M=rPt(v,i,n,d,p);m=iPt(w,n);var x=f.mode==="stack"||f.mode==="relative",T=i[n],A=!x||T._outmost,y=T.hasB,E=u&&u-c>Ef;if(!M||m==="none"||(T.isBlank||a===o||s===l)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var S=v.font,C=eW.getBarColor(i[n],w),k=eW.getInsideTextFont(w,n,S,C),D=eW.getOutsideTextFont(w,n,S),F=w.insidetextanchor||"end",P=r.datum();b?d.type==="log"&&P.s0<=0&&(d.range[0]0&&K>0,J;E?y?J=P_(I-2*u,B,Y,K,b)||P_(I,B-2*u,Y,K,b):b?J=P_(I-(u-c),B,Y,K,b)||P_(I,B-2*(u-c),Y,K,b):J=P_(I,B-(u-c),Y,K,b)||P_(I-2*(u-c),B,Y,K,b):J=P_(I,B,Y,K,b),q&&J?m="inside":(m="outside",O.remove(),O=null)}else m="inside";if(!O){j=rc.ensureUniformFontSize(e,m==="outside"?D:k),O=g(r,M,j);var U=O.attr("transform");if(O.attr("transform",""),$=Xy.bBox(O.node()),Y=$.width,K=$.height,O.attr("transform",U),Y<=0||K<=0){O.remove();return}}var V=w.textangle,X,H;m==="outside"?(H=w.constraintext==="both"||w.constraintext==="outside",X=tPt(a,o,s,l,$,{isHorizontal:b,constrained:H,angle:V,zeroBarDir:_})):(H=w.constraintext==="both"||w.constraintext==="inside",X=ETe(a,o,s,l,$,{isHorizontal:b,constrained:H,angle:V,anchor:F,hasB:y,r:u,overhead:c})),X.fontSize=j.size,G9t(w.type==="histogram"?"bar":w.type,X,v),T.transform=X;var G=TTe(O,v,f,h);rc.setTransormAndDisplay(G,X)}function P_(e,t,r,i,n){if(e<0||t<0)return!1;var a=r<=e&&i<=t,o=r<=t&&i<=e,s=n?e>=r*(t/i):t>=i*(e/r);return a||o||s}function MTe(e){return e==="auto"?0:e}function STe(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 ETe(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,p=1-d,v=a.hasB,m=a.r,g=a.overhead,w=n.width,b=n.height,_=Math.abs(t-e),M=Math.abs(i-r),x=_>2*Ef&&M>2*Ef?Ef:0;_-=2*x,M-=2*x;var T=MTe(l);l==="auto"&&!(w<=_&&b<=M)&&(w>_||b>M)&&(!(w>M||b>_)||wEf){var S=ePt(e,t,r,i,A,m,g,o,v);y=S.scale,E=S.pad}else y=1,s&&(y=Math.min(1,_/A.x,M/A.y)),E=0;var C=n.left*p+n.right*d,k=(n.top+n.bottom)/2,D=(e+Ef)*p+(t-Ef)*d,F=(r+i)/2,P=0,R=0;if(f||c){var L=(o?A.x:A.y)/2;m&&(c||v)&&(x+=E);var I=o?rv(e,t):rv(r,i);o?f?(D=e+I*x,P=-I*L):(D=t-I*x,P=I*L):f?(F=r+I*x,R=-I*L):(F=i-I*x,R=I*L)}return{textX:C,textY:k,targetX:D,targetY:F,anchorX:P,anchorY:R,scale:y,rotate:T}}function ePt(e,t,r,i,n,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Ef),c=Math.max(0,Math.abs(i-r)-2*Ef),f=a-Ef,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,p=l?f*2:s?2*h:f-o,v,m,g,w,b;return n.y/n.x>=c/(u-d)?w=c/n.y:n.y/n.x<=(c-p)/u?w=u/n.x:!l&&s?(v=n.x*n.x+n.y*n.y/4,m=-2*n.x*(u-f)-n.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):l?(v=(n.x*n.x+n.y*n.y)/4,m=-n.x*(u/2-f)-n.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):(v=n.x*n.x/4+n.y*n.y,m=-n.x*(u/2-f)-2*n.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)),w=Math.min(1,w),s?b=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-n.y*w)/2)*(f-(c-n.y*w)/2)))-o):b=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-n.x*w)/2)*(f-(u-n.x*w)/2)))-o),{scale:w,pad:b}}function tPt(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=n.width,c=n.height,f=Math.abs(t-e),h=Math.abs(i-r),d;o?d=h>2*Ef?Ef:0:d=f>2*Ef?Ef:0;var p=1;s&&(p=o?Math.min(1,h/c):Math.min(1,f/u));var v=MTe(l),m=STe(n,v),g=(o?m.x:m.y)/2,w=(n.left+n.right)/2,b=(n.top+n.bottom)/2,_=(e+t)/2,M=(r+i)/2,x=0,T=0,A;return(o?e===t:r===i)&&a.zeroBarDir?A=a.zeroBarDir:A=o?rv(t,e):rv(r,i),o?(_=t-A*d,x=A*g):(M=i+A*d,T=-A*g),{textX:w,textY:b,targetX:_,targetY:M,anchorX:x,anchorY:T,scale:p,rotate:v}}function rPt(e,t,r,i,n){var a=t[0].trace,o=a.texttemplate,s;return o?s=aPt(e,t,r,i,n):a.textinfo?s=oPt(t,r,i,n):s=u5.getValue(a.text,r),u5.coerceString($9t,s)}function iPt(e,t){var r=u5.getValue(e.textposition,t);return u5.coerceEnumerated(W9t,r)}function nPt(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,u=-rv(l.range[0],l.range[1]);return a?n?0:-u:u}function aPt(e,t,r,i,n){var a=t[0].trace,o=rc.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,p;c?(f="y",h=n,d="x",p=i):(f="x",h=i,d="y",p=n);function v(x){return sL(h,h.c2l(x),!0).text}function m(x){return sL(p,p.c2l(x),!0).text}var g=t[r],w={};w.label=g.p,w.labelLabel=w[f+"Label"]=v(g.p);var b=rc.castOption(a,g.i,"text");(b===0||b)&&(w.text=b),w.value=g.s,w.valueLabel=w[d+"Label"]=m(g.s);var _={};Y9t(_,a,g.i),(s||_.x===void 0)&&(_.x=c?w.value:w.label),(s||_.y===void 0)&&(_.y=c?w.label:w.value),(s||_.xLabel===void 0)&&(_.xLabel=c?w.valueLabel:w.labelLabel),(s||_.yLabel===void 0)&&(_.yLabel=c?w.labelLabel:w.valueLabel),l&&(w.delta=+g.rawS||g.s,w.deltaLabel=m(w.delta),w.final=g.v,w.finalLabel=m(w.final),w.initial=w.final-w.delta,w.initialLabel=m(w.initial)),u&&(w.value=g.s,w.valueLabel=m(w.value),w.percentInitial=g.begR,w.percentInitialLabel=rc.formatPercent(g.begR),w.percentPrevious=g.difR,w.percentPreviousLabel=rc.formatPercent(g.difR),w.percentTotal=g.sumR,w.percenTotalLabel=rc.formatPercent(g.sumR));var M=rc.castOption(a,g.i,"customdata");return M&&(w.customdata=M),rc.texttemplateString({data:[_,w,a._meta],fallback:a.texttemplatefallback,labels:w,locale:e._d3locale,template:o})}function oPt(e,t,r,i){var n=e[0].trace,a=n.orientation==="h",o=n.type==="waterfall",s=n.type==="funnel";function l(M){var x=a?i:r;return sL(x,M,!0).text}function u(M){var x=a?r:i;return sL(x,+M,!0).text}var c=n.textinfo,f=e[t],h=c.split("+"),d=[],p,v=function(M){return h.indexOf(M)!==-1};if(v("label")&&d.push(l(e[t].p)),v("text")&&(p=rc.castOption(n,f.i,"text"),(p===0||p)&&d.push(p)),o){var m=+f.rawS||f.s,g=f.v,w=g-m;v("initial")&&d.push(u(w)),v("delta")&&d.push(u(m)),v("final")&&d.push(u(g))}if(s){v("value")&&d.push(u(f.s));var b=0;v("percent initial")&&b++,v("percent previous")&&b++,v("percent total")&&b++;var _=b>1;v("percent initial")&&(p=rc.formatPercent(f.begR),_&&(p+=" of initial"),d.push(p)),v("percent previous")&&(p=rc.formatPercent(f.difR),_&&(p+=" of previous"),d.push(p)),v("percent total")&&(p=rc.formatPercent(f.sumR),_&&(p+=" of total"),d.push(p))}return d.join("
")}kTe.exports={plot:J9t,toMoveInsideBar:ETe}});var c5=W((mzr,LTe)=>{"use strict";var PM=Ds(),sPt=yi(),CTe=ni(),lPt=it().fillText,uPt=nL().getLineWidth,rW=ji().hoverLabelText,cPt=Kn().BADNUM;function fPt(e,t,r,i,n){var a=DTe(e,t,r,i,n);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=FTe(s,l),sPt.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function DTe(e,t,r,i,n){var a=e.cd,o=a[0].trace,s=a[0].t,l=i==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,p,v,m,g,w;o.orientation==="h"?(h=r,d=t,p="y",v="x",m=F,g=C):(h=t,d=r,p="x",v="y",g=F,m=C);var b=o[p+"period"],_=l||b;function M(q){return T(q,-1)}function x(q){return T(q,1)}function T(q,J){var U=q.w;return q[p]+J*U/2}function A(q){return q[p+"End"]-q[p+"Start"]}var y=l?M:b?function(q){return q.p-A(q)/2}:function(q){return Math.min(M(q),q.p-s.bardelta/2)},E=l?x:b?function(q){return q.p+A(q)/2}:function(q){return Math.max(x(q),q.p+s.bardelta/2)};function S(q,J,U){return n.finiteRange&&(U=0),PM.inbox(q-h,J-h,U+Math.min(1,Math.abs(J-q)/w)-1)}function C(q){return S(y(q),E(q),c)}function k(q){return S(M(q),x(q),f)}function D(q){var J=q[v];if(u){var U=Math.abs(q.rawS)||0;d>0?J+=U:d<0&&(J-=U)}return J}function F(q){var J=d,U=q.b,V=D(q);return PM.inbox(U-J,V-J,c+(V-J)/(V-U)-1)}function P(q){var J=d,U=q.b,V=D(q);return PM.inbox(U-J,V-J,f+(V-J)/(V-U)-1)}var R=e[p+"a"],L=e[v+"a"];w=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function I(q){return(m(q)+g(q))/2}var B=PM.getDistanceFunction(i,m,g,I);if(PM.getClosest(a,B,e),e.index!==!1&&a[e.index].p!==cPt){_||(y=function(q){return Math.min(M(q),q.p-s.bargroupwidth/2)},E=function(q){return Math.max(x(q),q.p+s.bargroupwidth/2)});var O=e.index,$=a[O],Y=o.base?$.b+$.s:$.s;e[v+"0"]=e[v+"1"]=L.c2p($[v],!0),e[v+"LabelVal"]=Y;var K=s.extents[s.extents.round($.p)];e[p+"0"]=R.c2p(l?y($):K[0],!0),e[p+"1"]=R.c2p(l?E($):K[1],!0);var j=$.orig_p!==void 0;return e[p+"LabelVal"]=j?$.orig_p:$.p,e.labelLabel=rW(R,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=rW(L,e[v+"LabelVal"],o[v+"hoverformat"]),e.baseLabel=rW(L,$.b,o[v+"hoverformat"]),e.spikeDistance=(P($)+k($))/2,e[p+"Spike"]=R.c2p($.p,!0),lPt($,o,e),e.hovertemplate=o.hovertemplate,e}}function FTe(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,n=uPt(e,t);if(CTe.opacity(r))return r;if(CTe.opacity(i)&&n)return i}LTe.exports={hoverPoints:fPt,hoverOnBars:DTe,getTraceColor:FTe}});var ITe=W((yzr,PTe)=>{"use strict";PTe.exports=function(t,r,i){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),i.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var f5=W((xzr,RTe)=>{"use strict";RTe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=i[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";zTe.exports={attributes:w1(),layoutAttributes:tL(),supplyDefaults:E0().supplyDefaults,crossTraceDefaults:E0().crossTraceDefaults,supplyLayoutDefaults:K$(),calc:oTe(),crossTraceCalc:b_().crossTraceCalc,colorbar:Ac(),arraysToCalcdata:DM(),plot:I_().plot,style:Ed().style,styleOnSelect:Ed().styleOnSelect,hoverPoints:c5().hoverPoints,eventData:ITe(),selectPoints:f5(),moduleType:"trace",name:"bar",basePlotModule:dl(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var OTe=W((bzr,qTe)=>{"use strict";qTe.exports=BTe()});var IM=W((wzr,GTe)=>{"use strict";var dPt=g1(),kd=Ns(),NTe=w1(),pPt=Vl(),UTe=_s().axisHoverFormat,{hovertemplateAttrs:vPt,templatefallbackAttrs:gPt}=Ga(),$g=tn().extendFlat,h5=kd.marker,VTe=h5.line;GTe.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:kd.xperiod,yperiod:kd.yperiod,xperiod0:kd.xperiod0,yperiod0:kd.yperiod0,xperiodalignment:kd.xperiodalignment,yperiodalignment:kd.yperiodalignment,xhoverformat:UTe("x"),yhoverformat:UTe("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:$g({},h5.symbol,{arrayOk:!1,editType:"plot"}),opacity:$g({},h5.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:$g({},h5.angle,{arrayOk:!1,editType:"calc"}),size:$g({},h5.size,{arrayOk:!1,editType:"calc"}),color:$g({},h5.color,{arrayOk:!1,editType:"style"}),line:{color:$g({},VTe.color,{arrayOk:!1,dflt:pPt.defaultLine,editType:"style"}),width:$g({},VTe.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:dPt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:NTe.offsetgroup,alignmentgroup:NTe.alignmentgroup,selected:{marker:kd.selected.marker,editType:"style"},unselected:{marker:kd.unselected.marker,editType:"style"},text:$g({},kd.text,{}),hovertext:$g({},kd.hovertext,{}),hovertemplate:vPt({}),hovertemplatefallback:gPt(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:kd.zorder}});var RM=W((Tzr,HTe)=>{"use strict";HTe.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 BM=W((Azr,YTe)=>{"use strict";var Cd=it(),mPt=yi(),yPt=ni(),xPt=Hp(),_Pt=__(),jTe=bw(),zM=IM();function bPt(e,t,r,i){function n(p,v){return Cd.coerce(e,t,zM,p,v)}if($Te(e,t,n,i),t.visible!==!1){xPt(e,t,i,n),n("xhoverformat"),n("yhoverformat");var a=t._hasPreCompStats;a&&(n("lowerfence"),n("upperfence")),n("line.color",(e.marker||{}).color||r),n("line.width"),n("fillcolor",yPt.addOpacity(t.line.color,.5));var o=!1;if(a){var s=n("mean"),l=n("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}n("whiskerwidth");var u=n("sizemode"),c;u==="quartiles"&&(c=n("boxmean",o)),n("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&n("sdmultiple"),n("width"),n("quartilemethod");var f=!1;if(a){var h=n("notchspan");h&&h.length&&(f=!0)}else Cd.validate(e.notchwidth,zM.notchwidth)&&(f=!0);var d=n("notched",f);d&&n("notchwidth"),WTe(e,t,n,{prefix:"box"}),n("zorder")}}function $Te(e,t,r,i){function n(E){var S=0;return E&&E.length&&(S+=1,Cd.isArrayOrTypedArray(E[0])&&E[0].length&&(S+=1)),S}function a(E){return Cd.validate(e[E],zM[E])}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(Cd.minRowLength(u),Cd.minRowLength(c),Cd.minRowLength(f))}else t._hasPreCompStats=!1;var h=n(o),d=n(s),p=h&&Cd.minRowLength(o),v=d&&Cd.minRowLength(s),m=i.calendar,g={autotypenumbers:i.autotypenumbers},w,b;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var _=a("x0")||a("dx"),M=a("y0")||a("dy");M&&!_?w="h":w="v",b=l;break;case"10":w="v",b=Math.min(l,v);break;case"20":w="h",b=Math.min(l,s.length);break;case"01":w="h",b=Math.min(l,p);break;case"02":w="v",b=Math.min(l,o.length);break;case"12":w="v",b=Math.min(l,v,o.length);break;case"21":w="h",b=Math.min(l,s.length,p);break;case"11":b=0;break;case"22":var x=!1,T;for(T=0;T0?(w="v",d>0?b=Math.min(v,p):b=Math.min(p)):d>0?(w="h",b=Math.min(v)):b=0;if(!b){t.visible=!1;return}t._length=b;var A=r("orientation",w);t._hasPreCompStats?A==="v"&&d===0?(r("x0",0),r("dx",1)):A==="h"&&h===0&&(r("y0",0),r("dy",1)):A==="v"&&d===0?r("x0"):A==="h"&&h===0&&r("y0");var y=mPt.getComponentMethod("calendars","handleTraceDefaults");y(e,t,["x","y"],i)}function WTe(e,t,r,i){var n=i.prefix,a=Cd.coerce2(e,t,zM,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(n+"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")),Cd.coerceSelectionMarkerOpacity(t,r)}function wPt(e,t){var r,i;function n(l){return Cd.coerce(i._input,i,zM,l)}for(var a=0;a{"use strict";var TPt=yi(),APt=it(),MPt=RM();function XTe(e,t,r,i,n){for(var a=n+"Layout",o=!1,s=0;s{"use strict";var nW=sn(),uL=ji(),EPt=Wp(),Ll=it(),k0=Kn().BADNUM,Wg=Ll._;a6e.exports=function(t,r){var i=t._fullLayout,n=uL.getFromId(t,r.xaxis||"x"),a=uL.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,p;r.orientation==="h"?(c=n,f="x",h=a,d="y",p=!!r.yperiodalignment):(c=a,f="y",h=n,d="x",p=!!r.xperiodalignment);var v=kPt(r,d,h,i[s]),m=v[0],g=v[1],w=Ll.distinctVals(m,h),b=w.vals,_=w.minDiff/2,M,x,T,A,y,E,S=(r.boxpoints||r.points)==="all"?Ll.identity:function(be){return be.vM.uf};if(r._hasPreCompStats){var C=r[f],k=function(be){return c.d2c((r[be]||[])[l])},D=1/0,F=-1/0;for(l=0;l=M.q1&&M.q3>=M.med){var R=k("lowerfence");M.lf=R!==k0&&R<=M.q1?R:e6e(M,T,A);var L=k("upperfence");M.uf=L!==k0&&L>=M.q3?L:t6e(M,T,A);var I=k("mean");M.mean=I!==k0?I:A?Ll.mean(T,A):(M.q1+M.q3)/2;var B=k("sd");M.sd=I!==k0&&B>=0?B:A?Ll.stdev(T,A,M.mean):M.q3-M.q1,M.lo=r6e(M),M.uo=i6e(M);var O=k("notchspan");O=O!==k0&&O>0?O:n6e(M,A),M.ln=M.med-O,M.un=M.med+O;var $=M.lf,Y=M.uf;r.boxpoints&&T.length&&($=Math.min($,T[0]),Y=Math.max(Y,T[A-1])),r.notched&&($=Math.min($,M.ln),Y=Math.max(Y,M.un)),M.min=$,M.max=Y}else{Ll.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join(` `));var K;M.med!==k0?K=M.med:M.q1!==k0?M.q3!==k0?K=(M.q1+M.q3)/2:K=M.q1:M.q3!==k0?K=M.q3:K=0,M.med=K,M.q1=M.q3=K,M.lf=M.uf=K,M.mean=M.sd=K,M.ln=M.un=K,M.min=M.max=K}D=Math.min(D,M.min),F=Math.max(F,M.max),M.pts2=x.filter(S),o.push(M)}}r._extremes[c._id]=uL.findExtremes(c,[D,F],{padded:!0})}else{var j=c.makeCalcdata(r,f),q=CPt(b,_),J=b.length,U=DPt(J);for(l=0;l=0&&V0){if(M={},M.pos=M[d]=b[l],x=M.pts=U[l].sort(JTe),T=M[f]=x.map(QTe),A=T.length,M.min=T[0],M.max=T[A-1],M.mean=Ll.mean(T,A),M.sd=Ll.stdev(T,A,M.mean)*r.sdmultiple,M.med=Ll.interp(T,.5),A%2&&(Q||te)){var ce,ge;Q?(ce=T.slice(0,A/2),ge=T.slice(A/2+1)):te&&(ce=T.slice(0,A/2+1),ge=T.slice(A/2)),M.q1=Ll.interp(ce,.5),M.q3=Ll.interp(ge,.5)}else M.q1=Ll.interp(T,.25),M.q3=Ll.interp(T,.75);M.lf=e6e(M,T,A),M.uf=t6e(M,T,A),M.lo=r6e(M),M.uo=i6e(M);var Ce=n6e(M,A);M.ln=M.med-Ce,M.un=M.med+Ce,X=Math.min(X,M.ln),H=Math.max(H,M.un),M.pts2=x.filter(S),o.push(M)}r.notched&&Ll.isTypedArray(j)&&(j=Array.from(j)),r._extremes[c._id]=uL.findExtremes(c,r.notched?j.concat([X,H]):j,{padded:!0})}return FPt(o,r),o.length>0?(o[0].t={num:i[s],dPos:_,posLetter:d,valLetter:f,labels:{med:Wg(t,"median:"),min:Wg(t,"min:"),q1:Wg(t,"q1:"),q3:Wg(t,"q3:"),max:Wg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Wg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Wg(t,"mean:"),lf:Wg(t,"lower fence:"),uf:Wg(t,"upper fence:")}},i[s]++,o):[{t:{empty:!0}}]};function kPt(e,t,r,i){var n=t in e,a=t+"0"in e,o="d"+t in e;if(n||a&&o){var s=r.makeCalcdata(e,t),l=EPt(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||nW(e.name)&&["linear","log"].indexOf(r.type)!==-1||Ll.isDateTime(e.name)&&r.type==="date")?u=e.name:u=i;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d{"use strict";var o6e=ji(),LPt=it(),PPt=v_().getAxisGroup,s6e=["v","h"];function IPt(e,t){for(var r=e.calcdata,i=t.xaxis,n=t.yaxis,a=0;a1,w=1-a[e+"gap"],b=1-a[e+"groupgap"];for(l=0;l0;if(T==="positive"?(L=A*(x?1:.5),O=B,I=O=E):T==="negative"?(L=O=E,I=A*(x?1:.5),$=B):(L=I=A,O=$=B),U){var V=_.pointpos,X=_.jitter,H=_.marker.size/2,G=0;V+X>=0&&(G=B*(V+X),G>L?(J=!0,j=H,Y=G):G>O&&(j=H,Y=L)),G<=L&&(Y=L);var Q=0;V-X<=0&&(Q=-B*(V-X),Q>I?(J=!0,q=H,K=Q):Q>$&&(q=H,K=I)),Q<=I&&(K=I)}else Y=L,K=I;var te=new Array(c.length);for(u=0;u{"use strict";var d5=vi(),R_=it(),RPt=Ji(),c6e=5,zPt=.01;function BPt(e,t,r,i){var n=e._context.staticPlot,a=t.xaxis,o=t.yaxis;R_.makeTraceGroups(i,r,"trace boxes").each(function(s){var l=d5.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 h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),f6e(l,{pos:h,val:d},f,c,n),h6e(l,{x:a,y:o},f,c),d6e(l,{pos:h,val:d},f,c)})}function f6e(e,t,r,i,n){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=i.bPos,c=i.wdPos||0,f=i.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,p=r.notched||!1,v=p?1-2*r.notchwidth:1,m,g;Array.isArray(i.bdPos)?(m=i.bdPos[0],g=i.bdPos[1]):(m=i.bdPos,g=i.bdPos);var w=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?R_.identity:[]);w.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(b){if(b.empty)return d5.select(this).attr("d","M0,0Z");var _=s.c2l(b.pos+u,!0),M=s.l2p(_-m)+f,x=s.l2p(_+g)+f,T=l?(M+x)/2:s.l2p(_)+f,A=r.whiskerwidth,y=l?M*A+(1-A)*T:s.l2p(_-c)+f,E=l?x*A+(1-A)*T:s.l2p(_+c)+f,S=s.l2p(_-m*v)+f,C=s.l2p(_+g*v)+f,k=r.sizemode==="sd",D=o.c2p(k?b.mean-b.sd:b.q1,!0),F=k?o.c2p(b.mean+b.sd,!0):o.c2p(b.q3,!0),P=R_.constrain(k?o.c2p(b.mean,!0):o.c2p(b.med,!0),Math.min(D,F)+1,Math.max(D,F)-1),R=b.lf===void 0||r.boxpoints===!1||k,L=o.c2p(R?b.min:b.lf,!0),I=o.c2p(R?b.max:b.uf,!0),B=o.c2p(b.ln,!0),O=o.c2p(b.un,!0);a?d5.select(this).attr("d","M"+P+","+S+"V"+C+"M"+D+","+M+"V"+x+(p?"H"+B+"L"+P+","+C+"L"+O+","+x:"")+"H"+F+"V"+M+(p?"H"+O+"L"+P+","+S+"L"+B+","+M:"")+"Z"+(d?"M"+D+","+T+"H"+L+"M"+F+","+T+"H"+I+(h===0?"":"M"+L+","+y+"V"+E+"M"+I+","+y+"V"+E):"")):d5.select(this).attr("d","M"+S+","+P+"H"+C+"M"+M+","+D+"H"+x+(p?"V"+B+"L"+C+","+P+"L"+x+","+O:"")+"V"+F+"H"+M+(p?"V"+O+"L"+S+","+P+"L"+M+","+B:"")+"Z"+(d?"M"+T+","+D+"V"+L+"M"+T+","+F+"V"+I+(h===0?"":"M"+y+","+L+"H"+E+"M"+y+","+I+"H"+E):""))})}function h6e(e,t,r,i){var n=t.x,a=t.y,o=i.bdPos,s=i.bPos,l=r.boxpoints||r.points;R_.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=i,d.trace=r}),h},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(h){var d,p=h.pts2,v=Math.max((h.max-h.min)/10,h.q3-h.q1),m=v*1e-9,g=v*zPt,w=[],b=0,_;if(r.jitter){if(v===0)for(b=1,w=new Array(p.length),d=0;dh.lo&&(E.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(RPt.translatePoints,n,a)}function d6e(e,t,r,i){var n=t.val,a=t.pos,o=!!a.rangebreaks,s=i.bPos,l=i.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(i.bdPos)?(c=i.bdPos[0],f=i.bdPos[1]):(c=i.bdPos,f=i.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?R_.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=a.c2l(d.pos+s,!0),v=a.l2p(p-c)+l,m=a.l2p(p+f)+l,g=o?(v+m)/2:a.l2p(p)+l,w=n.c2p(d.mean,!0),b=n.c2p(d.mean-d.sd,!0),_=n.c2p(d.mean+d.sd,!0);r.orientation==="h"?d5.select(this).attr("d","M"+w+","+v+"V"+m+(u==="sd"?"m0,0L"+b+","+g+"L"+w+","+v+"L"+_+","+g+"Z":"")):d5.select(this).attr("d","M"+v+","+w+"H"+m+(u==="sd"?"m0,0L"+g+","+b+"L"+v+","+w+"L"+g+","+_+"Z":""))})}p6e.exports={plot:BPt,plotBoxAndWhiskers:f6e,plotPoints:h6e,plotBoxMean:d6e}});var hL=W((Czr,v6e)=>{"use strict";var oW=vi(),sW=ni(),lW=Ji();function qPt(e,t,r){var i=r||oW.select(e).selectAll("g.trace.boxes");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=oW.select(this),o=n[0].trace,s=o.line.width;function l(f,h,d,p){f.style("stroke-width",h+"px").call(sW.stroke,d).call(sW.fill,p)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=oW.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(sW.stroke,o.line.color);var c=a.selectAll("path.point");lW.pointStyle(c,o,e)}})}function OPt(e,t,r){var i=t[0].trace,n=r.selectAll("path.point");i.selectedpoints?lW.selectedPointStyle(n,i):lW.pointStyle(n,i,e)}v6e.exports={style:qPt,styleOnSelect:OPt}});var cW=W((Dzr,x6e)=>{"use strict";var NPt=ji(),uW=it(),Zy=Ds(),g6e=ni(),UPt=uW.fillText;function VPt(e,t,r,i){var n=e.cd,a=n[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(m6e(e,t,r,i))),o.indexOf("points")!==-1&&(l=y6e(e,t,r)),i==="closest"?l?[l]:s:(l&&s.push(l),s)}function m6e(e,t,r,i){var n=e.cd,a=e.xa,o=e.ya,s=n[0].trace,l=n[0].t,u=s.type==="violin",c,f,h,d,p,v,m,g,w,b,_,M=l.bdPos,x,T,A=l.wHover,y=function(H){return h.c2l(H.pos)+l.bPos-h.c2l(v)};u&&s.side!=="both"?(s.side==="positive"&&(w=function(H){var G=y(H);return Zy.inbox(G,G+A,b)},x=M,T=0),s.side==="negative"&&(w=function(H){var G=y(H);return Zy.inbox(G-A,G,b)},x=0,T=M)):(w=function(H){var G=y(H);return Zy.inbox(G-A,G+A,b)},x=T=M);var E;u?E=function(H){return Zy.inbox(H.span[0]-p,H.span[1]-p,b)}:E=function(H){return Zy.inbox(H.min-p,H.max-p,b)},s.orientation==="h"?(p=t,v=r,m=E,g=w,c="y",h=o,f="x",d=a):(p=r,v=t,m=w,g=E,c="x",h=a,f="y",d=o);var S=Math.min(1,M/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));b=e.maxHoverDistance-S,_=e.maxSpikeDistance-S;function C(H){return(m(H)+g(H))/2}var k=Zy.getDistanceFunction(i,m,g,C);if(Zy.getClosest(n,k,e),e.index===!1)return[];var D=n[e.index],F=s.line.color,P=(s.marker||{}).color;g6e.opacity(F)&&s.line.width?e.color=F:g6e.opacity(P)&&s.boxpoints?e.color=P:e.color=s.fillcolor,e[c+"0"]=h.c2p(D.pos+l.bPos-T,!0),e[c+"1"]=h.c2p(D.pos+l.bPos+x,!0),e[c+"LabelVal"]=D.orig_p!==void 0?D.orig_p:D.pos;var R=c+"Spike";e.spikeDistance=C(D)*_/b,e[R]=h.c2p(D.pos,!0);var L=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,I=s.boxpoints||s.points,B=I&&L?["max","uf","q3","med","mean","q1","lf","min"]:I&&!L?["max","uf","q3","med","q1","lf","min"]:!I&&L?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],O=d.range[1]{"use strict";_6e.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 fW=W((Lzr,w6e)=>{"use strict";w6e.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";T6e.exports={attributes:IM(),layoutAttributes:RM(),supplyDefaults:BM().supplyDefaults,crossTraceDefaults:BM().crossTraceDefaults,supplyLayoutDefaults:lL().supplyLayoutDefaults,calc:aW(),crossTraceCalc:cL().crossTraceCalc,plot:fL().plot,style:hL().style,styleOnSelect:hL().styleOnSelect,hoverPoints:cW().hoverPoints,eventData:b6e(),selectPoints:fW(),moduleType:"trace",name:"box",basePlotModule:dl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var S6e=W((Izr,M6e)=>{"use strict";M6e.exports=A6e()});var p5=W((Rzr,k6e)=>{"use strict";var GPt=Eo(),{extendFlat:Uh}=tn(),HPt=Wa(),{axisHoverFormat:hW}=_s(),jPt=Ho(),{hovertemplateAttrs:$Pt,templatefallbackAttrs:E6e,texttemplateAttrs:WPt}=Ga(),C0=Ns();k6e.exports=Uh({z:{valType:"data_array",editType:"calc"},x:Uh({},C0.x,{impliedEdits:{xtype:"array"}}),x0:Uh({},C0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Uh({},C0.dx,{impliedEdits:{xtype:"scaled"}}),y:Uh({},C0.y,{impliedEdits:{ytype:"array"}}),y0:Uh({},C0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Uh({},C0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Uh({},C0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Uh({},C0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Uh({},C0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Uh({},C0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Uh({},C0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Uh({},C0.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:hW("x"),yhoverformat:hW("y"),zhoverformat:hW("z",1),hovertemplate:$Pt(),hovertemplatefallback:E6e(),texttemplate:WPt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:E6e({editType:"plot"}),textfont:jPt({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Uh({},HPt.showlegend,{dflt:!1}),zorder:C0.zorder},GPt("",{cLetter:"z",autoColorDflt:!1}))});var pL=W((zzr,D6e)=>{"use strict";var YPt=sn(),dL=it(),XPt=yi();D6e.exports=function(t,r,i,n,a,o){var s=i("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(dL.isArray1D(s)){l=i(a),u=i(o);var c=dL.minRowLength(l),f=dL.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=C6e(a,i),u=C6e(o,i),!ZPt(s))return 0;i("transpose"),r._length=null}var h=XPt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],n),!0};function C6e(e,t){var r=t(e),i=r?t(e+"type","array"):"scaled";return i==="scaled"&&(t(e+"0"),t("d"+e)),r}function ZPt(e){for(var t=!0,r=!1,i=!1,n,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var F6e=it();L6e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var i=F6e.extendFlat({},r.font,{color:"auto",size:"auto"});F6e.coerceFont(t,"textfont",i)}});var dW=W((qzr,P6e)=>{"use strict";P6e.exports=function(t,r,i){var n=i("zsmooth");n===!1&&(i("xgap"),i("ygap")),i("zhoverformat")}});var z6e=W((Ozr,R6e)=>{"use strict";var I6e=it(),KPt=pL(),JPt=qM(),QPt=Hp(),eIt=dW(),tIt=Fu(),rIt=p5();R6e.exports=function(t,r,i,n){function a(s,l){return I6e.coerce(t,r,rIt,s,l)}var o=KPt(t,r,a,n);if(!o){r.visible=!1;return}QPt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),JPt(a,n),eIt(t,r,a,n),a("hoverongaps"),a("connectgaps",I6e.isArray1D(r.z)&&r.zsmooth!==!1),tIt(t,r,n,a,{prefix:"",cLetter:"z"}),a("zorder")}});var pW=W((Nzr,B6e)=>{"use strict";var v5=sn();B6e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,i){var n=i[t];return v5(n)?(n=Number(n),r[e]+=n,n):0},avg:function(e,t,r,i,n){var a=i[t];return v5(a)&&(a=Number(a),r[e]+=a,n[e]++),0},min:function(e,t,r,i){var n=i[t];if(v5(n))if(n=Number(n),v5(r[e])){if(r[e]>n){var a=n-r[e];return r[e]=n,a}}else return r[e]=n,n;return 0},max:function(e,t,r,i){var n=i[t];if(v5(n))if(n=Number(n),v5(r[e])){if(r[e]{"use strict";q6e.exports={percent:function(e,t){for(var r=e.length,i=100/t,n=0;n{"use strict";O6e.exports=function(t,r){for(var i=t.length,n=0,a=0;a{"use strict";var g5=Kn(),z_=g5.ONEAVGYEAR,N6e=g5.ONEAVGMONTH,gL=g5.ONEDAY,U6e=g5.ONEHOUR,V6e=g5.ONEMIN,G6e=g5.ONESEC,H6e=ji().tickIncrement;W6e.exports=function(t,r,i,n,a){var o=-1.1*r,s=-.1*r,l=t-s,u=i[0],c=i[1],f=Math.min(vL(u+s,u+l,n,a),vL(c+s,c+l,n,a)),h=Math.min(vL(u+o,u+s,n,a),vL(c+o,c+s,n,a)),d,p;if(f>h&&hgL){var v=d===z_?1:6,m=d===z_?"M12":"M1";return function(g,w){var b=n.c2d(g,z_,a),_=b.indexOf("-",v);_>0&&(b=b.slice(0,_));var M=n.d2c(b,0,a);if(MG6e?e>gL?e>z_*1.1?z_:e>N6e*1.1?N6e:gL:e>U6e?U6e:e>V6e?V6e:G6e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function iIt(e,t,r,i,n,a){if(i&&e>gL){var o=$6e(t,n,a),s=$6e(r,n,a),l=e===z_?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function $6e(e,t,r){var i=t.c2d(e,z_,r).split("-");return i[0]===""&&(i.unshift(),i[0]="-"+i[0]),i}});var _W=W((Hzr,J6e)=>{"use strict";var yW=sn(),kf=it(),Y6e=yi(),Dd=ji(),{hasColorscale:X6e}=bc(),Z6e=Zc(),nIt=DM(),K6e=pW(),aIt=vW(),oIt=gW(),sIt=mW();function lIt(e,t){var r=[],i=[],n=t.orientation==="h",a=Dd.getFromId(e,n?t.yaxis:t.xaxis),o=n?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=xW(e,t,a,o),h=f[0],d=f[1],p=typeof h.size=="string",v=[],m=p?v:h,g=[],w=[],b=[],_=0,M=t.histnorm,x=t.histfunc,T=M.indexOf("density")!==-1,A,y,E;u.enabled&&T&&(M=M.replace(/ ?density$/,""),T=!1);var S=x==="max"||x==="min",C=S?null:0,k=K6e.count,D=aIt[M],F=!1,P=function(G){return a.r2c(G,0,l)},R;for(kf.isArrayOrTypedArray(t[s])&&x!=="count"&&(R=t[s],F=x==="avg",k=K6e[x]),c=P(h.start),y=P(h.end)+(c-Dd.tickIncrement(c,h.size,!1,l))/1e6;c=0&&E=V;c--)if(i[c]){X=c;break}for(c=V;c<=X;c++)if(yW(r[c])&&yW(i[c])){var H={p:r[c],s:i[c],b:0};u.enabled||(H.pts=b[c],O?H.ph0=H.ph1=b[c].length?d[b[c][0]]:r[c]:(t._computePh=!0,H.ph0=q(v[c]),H.ph1=q(v[c+1],!0))),U.push(H)}return U.length===1&&(U[0].width1=Dd.tickIncrement(U[0].p,h.size,!1,l)-U[0].p),X6e(t,"marker")&&Z6e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),X6e(t,"marker.line")&&Z6e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),nIt(U,t),kf.isArrayOrTypedArray(t.selectedpoints)&&kf.tagSelected(U,t,K),U}function xW(e,t,r,i,n){var j;var a=i+"bins",o=e._fullLayout,s=t["_"+i+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,p,v,m,g=function(q){return r.r2c(q,0,d)},w=function(q){return r.c2r(q,0,d)},b=r.type==="date"?function(q){return q||q===0?kf.cleanDate(q,null,d):null}:function(q){return yW(q)?Number(q):null};function _(q,J,U){J[q+"Found"]?(J[q]=b(J[q]),J[q]===null&&(J[q]=U[q])):(v[q]=J[q]=U[q],kf.nestedProperty(f[0],a+"."+q).set(U[q]))}if(t["_"+i+"autoBinFinished"])delete t["_"+i+"autoBinFinished"];else{f=l.traces;var M=[],x=!0,T=!1,A=!1;for(c=0;cr.r2l(R)&&(I=Dd.tickIncrement(I,l.size,!0,d)),k.start=r.l2r(I),P||kf.nestedProperty(t,a+".start").set(k.start)}var B=l.end,O=r.r2l(C.end),$=O!==void 0;if((l.endFound||$)&&O!==r.r2l(B)){var Y=$?O:kf.aggNums(Math.max,null,p);k.end=r.l2r(Y),$||kf.nestedProperty(t,a+".start").set(k.end)}var K="autobin"+i;return t._input[K]===!1&&(t._input[a]=kf.extendFlat({},t[a]||{}),delete t._input[K],delete t[K]),[k,p]}function uIt(e,t,r,i,n){var a=e._fullLayout,o=cIt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;i--)s(i);else if(t==="increasing"){for(i=1;i=0;i--)e[i]+=e[i+1];r==="exclude"&&(e.push(0),e.shift())}}J6e.exports={calc:lIt,calcAllAutoBins:xW}});var oAe=W((jzr,aAe)=>{"use strict";var Q6e=it(),m5=ji(),eAe=pW(),hIt=vW(),dIt=gW(),pIt=mW(),tAe=_W().calcAllAutoBins;aAe.exports=function(t,r){var i=m5.getFromId(t,r.xaxis),n=m5.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(ke){return i.r2c(ke,0,a)},l=function(ke){return n.r2c(ke,0,o)},u=function(ke){return i.c2r(ke,0,a)},c=function(ke){return n.c2r(ke,0,o)},f,h,d,p,v=tAe(t,r,i,"x"),m=v[0],g=v[1],w=tAe(t,r,n,"y"),b=w[0],_=w[1],M=r._length;g.length>M&&g.splice(M,g.length-M),_.length>M&&_.splice(M,_.length-M);var x=[],T=[],A=[],y=typeof m.size=="string",E=typeof b.size=="string",S=[],C=[],k=y?S:m,D=E?C:b,F=0,P=[],R=[],L=r.histnorm,I=r.histfunc,B=L.indexOf("density")!==-1,O=I==="max"||I==="min",$=O?null:0,Y=eAe.count,K=hIt[L],j=!1,q=[],J=[],U="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";U&&I!=="count"&&(j=I==="avg",Y=eAe[I]);var V=m.size,X=s(m.start),H=s(m.end)+(X-m5.tickIncrement(X,V,!1,a))/1e6;for(f=X;f=0&&d=0&&p{"use strict";var T1=it(),sAe=Kn().BADNUM,lAe=Wp();uAe.exports=function(t,r,i,n,a,o){var s=t._length,l=r.makeCalcdata(t,n),u=i.makeCalcdata(t,a);l=lAe(t,r,n,l).vals,u=lAe(t,i,a,u).vals;var c=t.text,f=c!==void 0&&T1.isArray1D(c),h=t.hovertext,d=h!==void 0&&T1.isArray1D(h),p,v,m=T1.distinctVals(l),g=m.vals,w=T1.distinctVals(u),b=w.vals,_=[],M,x,T=b.length,A=g.length;for(p=0;p{"use strict";var vIt=sn(),gIt=it(),yL=Kn().BADNUM;cAe.exports=function(t,r,i,n){var a,o,s,l,u,c;function f(g){if(vIt(g))return+g}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var mIt=it(),fAe=.01,yIt=[[-1,0],[1,0],[0,-1],[0,1]];function xIt(e){return .5-.25*Math.min(1,e*.5)}dAe.exports=function(t,r){var i=1,n;for(hAe(t,r),n=0;nfAe;n++)i=hAe(t,r,xIt(i));return i>fAe&&mIt.log("interp2d didn't converge quickly",i),t};function hAe(e,t,r){var i=0,n,a,o,s,l,u,c,f,h,d,p,v,m;for(s=0;sv&&(i=Math.max(i,Math.abs(e[a][o]-p)/(m-v))))}return i}});var bL=W((Xzr,pAe)=>{"use strict";var _It=it().maxRowLength;pAe.exports=function(t){var r=[],i={},n=[],a=t[0],o=[],s=[0,0,0],l=_It(t),u,c,f,h,d,p,v,m;for(c=0;c=0;d--)h=n[d],c=h[0],f=h[1],p=((i[[c-1,f]]||s)[2]+(i[[c+1,f]]||s)[2]+(i[[c,f-1]]||s)[2]+(i[[c,f+1]]||s)[2])/20,p&&(v[h]=[c,f,p],n.splice(d,1),m=!0);if(!m)throw"findEmpties iterated with no new neighbors";for(h in v)i[h]=v[h],r.push(v[h])}return r.sort(function(g,w){return w[2]-g[2]})}});var bW=W((Zzr,mAe)=>{"use strict";var vAe=yi(),gAe=it().isArrayOrTypedArray;mAe.exports=function(t,r,i,n,a,o){var s=[],l=vAe.traceIs(t,"contour"),u=vAe.traceIs(t,"histogram"),c,f,h,d=gAe(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var p=r.length;if(p<=a){if(l)s=Array.from(r).slice(0,a);else if(a===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)],h=1;h{"use strict";var yAe=yi(),wW=it(),wL=ji(),xAe=Wp(),bIt=oAe(),wIt=Zc(),TIt=mL(),AIt=xL(),MIt=_L(),SIt=bL(),TL=bW(),TW=Kn().BADNUM;bAe.exports=function(t,r){var i=wL.getFromId(t,r.xaxis||"x"),n=wL.getFromId(t,r.yaxis||"y"),a=yAe.traceIs(r,"contour"),o=yAe.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,p,v,m,g,w;if(i._minDtick=0,n._minDtick=0,o)w=bIt(t,r),f=w.orig_x,l=w.x,u=w.x0,c=w.dx,v=w.orig_y,h=w.y,d=w.y0,p=w.dy,m=w.z;else{var b=r.z;wW.isArray1D(b)?(TIt(r,i,n,"x","y",["z"]),l=r._x,h=r._y,b=r._z):(f=r.x?i.makeCalcdata(r,"x"):[],v=r.y?n.makeCalcdata(r,"y"):[],l=xAe(r,i,"x",f).vals,h=xAe(r,n,"y",v).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,p=r.dy,m=AIt(b,r,i,n)}(i.rangebreaks||n.rangebreaks)&&(m=EIt(l,h,m),o||(l=_Ae(l),h=_Ae(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=SIt(m),MIt(m,r._emptypoints));function _(k){s=r._input.zsmooth=r.zsmooth=!1,wW.warn('cannot use zsmooth: "fast": '+k)}function M(k){if(k.length>1){var D=(k[k.length-1]-k[0])/(k.length-1),F=Math.abs(D/100);for(g=0;gF)return!1}return!0}r._islinear=!1,i.type==="log"||n.type==="log"?s==="fast"&&_("log axis found"):M(l)?M(h)?r._islinear=!0:s==="fast"&&_("y scale is not linear"):s==="fast"&&_("x scale is not linear");var x=wW.maxRowLength(m),T=r.xtype==="scaled"?"":l,A=TL(r,T,u,c,x,i),y=r.ytype==="scaled"?"":h,E=TL(r,y,d,p,m.length,n);r._extremes[i._id]=wL.findExtremes(i,A),r._extremes[n._id]=wL.findExtremes(n,E);var S={x:A,y:E,z:m,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(S.orig_x=f),r.yperiodalignment&&v&&(S.orig_y=v),T&&T.length===A.length-1&&(S.xCenter=T),y&&y.length===E.length-1&&(S.yCenter=y),o&&(S.xRanges=w.xRanges,S.yRanges=w.yRanges,S.pts=w.pts),a||wIt(t,r,{vals:m,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var C={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};S.xfill=TL(C,T,u,c,x,i),S.yfill=TL(C,y,d,p,m.length,n)}return[S]};function _Ae(e){for(var t=[],r=e.length,i=0;i{"use strict";ML.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"]];ML.STYLE=ML.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var MW=W((Qzr,TAe)=>{"use strict";var wAe=SL(),kIt=Ji(),AW=it(),y5=null;function CIt(){if(y5!==null)return y5;y5=!1;var e=AW.isSafari()||AW.isMacWKWebView()||AW.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(wAe.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")y5=t.some(function(o){return r.apply(null,o)});else{var i=kIt.tester.append("image").attr("style",wAe.STYLE),n=window.getComputedStyle(i.node()),a=n.imageRendering;y5=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),i.remove()}}return y5}TAe.exports=CIt});var EL=W((eBr,PAe)=>{"use strict";var AAe=vi(),DIt=yi(),FIt=Ji(),LIt=ji(),Fd=it(),MAe=uo(),PIt=mF(),SAe=ni(),IIt=Jo().extractOpts,RIt=Jo().makeColorScaleFuncFromTrace,zIt=sd(),BIt=Hl(),SW=BIt.LINE_SPACING,qIt=MW(),OIt=SL().STYLE,FAe="heatmap-label";function LAe(e){return e.selectAll("g."+FAe)}function EAe(e){LAe(e).remove()}PAe.exports=function(e,t,r,i){var n=t.xaxis,a=t.yaxis;Fd.makeTraceGroups(i,r,"hm").each(function(o){var s=AAe.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,p=l.y,v=l.xCenter,m=l.yCenter,g=DIt.traceIs(u,"contour"),w=g?"best":u.zsmooth,b=h.length,_=Fd.maxRowLength(h),M=!1,x=!1,T,A,y,E,S,C,k,D;for(C=0;T===void 0&&C0;)A=n.c2p(d[C]),C--;for(A0;)S=a.c2p(p[C]),C--;S=n._length||A<=0||E>=a._length||S<=0;if(I){var B=s.selectAll("image").data([]);B.exit().remove(),EAe(s);return}var O,$;F==="fast"?(O=_,$=b):(O=R,$=L);var Y=document.createElement("canvas");Y.width=O,Y.height=$;var K=Y.getContext("2d",{willReadFrequently:!0}),j=RIt(u,{noNumericCheck:!0,returnArray:!0}),q,J;F==="fast"?(q=M?function(dn){return _-1-dn}:Fd.identity,J=x?function(dn){return b-1-dn}:Fd.identity):(q=function(dn){return Fd.constrain(Math.round(n.c2p(d[dn])-T),0,R)},J=function(dn){return Fd.constrain(Math.round(a.c2p(p[dn])-E),0,L)});var U=J(0),V=[U,U],X=M?0:1,H=x?0:1,G=0,Q=0,te=0,ce=0,ge,Ce,be,he,oe;function Ee(dn,Vn=0){if(dn===void 0)return[0,0,0,0];var ra=j(dn);return ra[0]=Math.round(ra[0]),ra[1]=Math.round(ra[1]),ra[2]=Math.round(ra[2]),G+=Vn,Q+=ra[0]*Vn,te+=ra[1]*Vn,ce+=ra[2]*Vn,ra}function ye(dn,Vn,ra,ds){var mo=dn[ra.bin0];if(mo===void 0)return Ee(void 0,1);var Rs=dn[ra.bin1],ho=Vn[ra.bin0],ka=Vn[ra.bin1],ao=Rs-mo||0,zs=ho-mo||0,_a;return Rs===void 0?ka===void 0?_a=0:ho===void 0?_a=2*(ka-mo):_a=(2*ka-ho-mo)*2/3:ka===void 0?ho===void 0?_a=0:_a=(2*mo-Rs-ho)*2/3:ho===void 0?_a=(2*ka-Rs-mo)*2/3:_a=ka+mo-Rs-ho,Ee(mo+ra.frac*ao+ds.frac*(zs+ra.frac*_a))}if(F!=="default"){var ue=0,ee;try{ee=new Uint8Array(O*$*4)}catch(dn){ee=new Array(O*$*4)}if(F==="smooth"){var ae=v||d,xe=m||p,re=new Array(ae.length),pe=new Array(xe.length),we=new Array(R),Fe=v?CAe:kAe,Se=m?CAe:kAe,ke,_e,Ie;for(C=0;CXt||Xt>a._length))for(k=Re;klr||lr>n._length)){var ur=PIt({x:Vt,y:Tt},u,e._fullLayout);ur.x=Vt,ur.y=Tt;var Bt=l.z[C][k];Bt===void 0?(ur.z="",ur.zLabel=""):(ur.z=Bt,ur.zLabel=LIt.tickText(bt,Bt,"hover").text);var Zt=l.text&&l.text[C]&&l.text[C][k];(Zt===void 0||Zt===!1)&&(Zt=""),ur.text=Zt;var kr=Fd.texttemplateString({data:[ur,u._meta],fallback:u.texttemplatefallback,labels:ur,locale:e._fullLayout._d3locale,template:Xe});if(kr){var $e=kr.split("
"),tt=$e.length,st=0;for(D=0;D{"use strict";IAe.exports={min:"zmin",max:"zmax"}});var kL=W((rBr,RAe)=>{"use strict";var NIt=vi();RAe.exports=function(t){NIt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var DL=W((iBr,BAe)=>{"use strict";var zAe=Ds(),OM=it(),CL=OM.isArrayOrTypedArray,UIt=ji(),VIt=Jo().extractOpts;BAe.exports=function(t,r,i,n,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,p=s.xCenter,v=s.yCenter,m=s.zmask,g=l.zhoverformat,w=f,b=h,_,M,x,T;if(t.index!==!1){try{x=Math.round(t.index[1]),T=Math.round(t.index[0])}catch(B){OM.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||T<0||T>d.length)return}else{if(zAe.inbox(r-f[0],r-f[f.length-1],0)>0||zAe.inbox(i-h[0],i-h[h.length-1],0)>0)return;if(o){var A;for(w=[2*f[0]-f[1]],A=1;A{"use strict";qAe.exports={attributes:p5(),supplyDefaults:z6e(),calc:AL(),plot:EL(),colorbar:x5(),style:kL(),hoverPoints:DL(),moduleType:"trace",name:"heatmap",basePlotModule:dl(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var UAe=W((aBr,NAe)=>{"use strict";NAe.exports=OAe()});var EW=W((oBr,VAe)=>{"use strict";VAe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var HAe=W((sBr,GAe)=>{"use strict";GAe.exports={eventDataKeys:["binNumber"]}});var FL=W((lBr,YAe)=>{"use strict";var Vh=w1(),jAe=_s().axisHoverFormat,{hovertemplateAttrs:GIt,texttemplateAttrs:HIt,templatefallbackAttrs:$Ae}=Ga(),kW=Ho(),WAe=EW(),jIt=HAe(),CW=tn().extendFlat;YAe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:jAe("x"),yhoverformat:jAe("y"),text:CW({},Vh.text,{}),hovertext:CW({},Vh.hovertext,{}),orientation:Vh.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:WAe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:WAe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:GIt({},{keys:jIt.eventDataKeys}),hovertemplatefallback:$Ae(),texttemplate:HIt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:$Ae({editType:"plot"}),textposition:CW({},Vh.textposition,{arrayOk:!1}),textfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Vh.insidetextanchor,textangle:Vh.textangle,cliponaxis:Vh.cliponaxis,constraintext:Vh.constraintext,marker:Vh.marker,offsetgroup:Vh.offsetgroup,alignmentgroup:Vh.alignmentgroup,selected:Vh.selected,unselected:Vh.unselected,zorder:Vh.zorder}});var JAe=W((uBr,KAe)=>{"use strict";var XAe=yi(),NM=it(),ZAe=ni(),$It=E0().handleText,WIt=rL(),YIt=FL();KAe.exports=function(t,r,i,n){function a(w,b){return NM.coerce(t,r,YIt,w,b)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");$It(t,r,n,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(NM.minRowLength(o)&&NM.minRowLength(s)):NM.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var p=XAe.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],n);var v=r[h];v&&a("histfunc"),a("histnorm"),a("autobin"+f),WIt(t,r,a,i,n),NM.coerceSelectionMarkerOpacity(r,a);var m=(r.marker.line||{}).color,g=XAe.getComponentMethod("errorbars","supplyDefaults");g(t,r,m||ZAe.defaultLine,{axis:"y"}),g(t,r,m||ZAe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var PL=W((cBr,tMe)=>{"use strict";var UM=it(),XIt=Cs(),LL=yi().traceIs,ZIt=__(),KIt=E0().validateCornerradius,QAe=UM.nestedProperty,DW=v_().getAxisGroup,eMe=[{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"}],JIt=["x","y"];tMe.exports=function(t,r){var i=r._histogramBinOpts={},n=[],a={},o=[],s,l,u,c,f,h,d;function p(F,P){return UM.coerce(s._input,s,s._module.attributes,F,P)}function v(F){return F.orientation==="v"?"x":"y"}function m(F,P){var R=XIt.getFromTrace({_fullLayout:r},F,P);return R.type}function g(F,P,R){var L=F.uid+"__"+R;P||(P=L);var I=m(F,R),B=F[R+"calendar"]||"",O=i[P],$=!0;O&&(I===O.axType&&B===O.calendar?($=!1,O.traces.push(F),O.dirs.push(R)):(P=L,I!==O.axType&&UM.warn(["Attempted to group the bins of trace",F.index,"set on a","type:"+I,"axis","with bins on","type:"+O.axType,"axis."].join(" ")),B!==O.calendar&&UM.warn(["Attempted to group the bins of trace",F.index,"set with a",B,"calendar","with bins",O.calendar?"on a "+O.calendar+" calendar":"w/o a set calendar"].join(" ")))),$&&(i[P]={traces:[F],dirs:[R],axType:I,calendar:F[R+"calendar"]||""}),F["_"+R+"bingroup"]=P}for(f=0;f{"use strict";var QIt=c5().hoverPoints,eRt=ji().hoverLabelText;rMe.exports=function(t,r,i,n,a){var o=QIt(t,r,i,n,a);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"]=eRt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var FW=W((hBr,nMe)=>{"use strict";nMe.exports=function(t,r,i,n,a){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),!(i.cumulative||{}).enabled){var o=Array.isArray(a)?n[0].pts[a[0]][a[1]]:n[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var oMe=W((dBr,aMe)=>{"use strict";aMe.exports={attributes:FL(),layoutAttributes:tL(),supplyDefaults:JAe(),crossTraceDefaults:PL(),supplyLayoutDefaults:K$(),calc:_W().calc,crossTraceCalc:b_().crossTraceCalc,plot:I_().plot,layerName:"barlayer",style:Ed().style,styleOnSelect:Ed().styleOnSelect,colorbar:Ac(),hoverPoints:iMe(),selectPoints:f5(),eventData:FW(),moduleType:"trace",name:"histogram",basePlotModule:dl(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var lMe=W((pBr,sMe)=>{"use strict";sMe.exports=oMe()});var RL=W((vBr,fMe)=>{"use strict";var iv=FL(),uMe=EW(),IL=p5(),tRt=Wa(),LW=_s().axisHoverFormat,{hovertemplateAttrs:rRt,texttemplateAttrs:iRt,templatefallbackAttrs:cMe}=Ga(),nRt=Eo(),VM=tn().extendFlat;fMe.exports=VM({x:iv.x,y:iv.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:iv.histnorm,histfunc:iv.histfunc,nbinsx:iv.nbinsx,xbins:uMe("x"),nbinsy:iv.nbinsy,ybins:uMe("y"),autobinx:iv.autobinx,autobiny:iv.autobiny,bingroup:VM({},iv.bingroup,{}),xbingroup:VM({},iv.bingroup,{}),ybingroup:VM({},iv.bingroup,{}),xgap:IL.xgap,ygap:IL.ygap,zsmooth:IL.zsmooth,xhoverformat:LW("x"),yhoverformat:LW("y"),zhoverformat:LW("z",1),hovertemplate:rRt({},{keys:["z"]}),hovertemplatefallback:cMe(),texttemplate:iRt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:cMe({editType:"plot"}),textfont:IL.textfont,showlegend:VM({},tRt.showlegend,{dflt:!1})},nRt("",{cLetter:"z",autoColorDflt:!1}))});var PW=W((gBr,dMe)=>{"use strict";var aRt=yi(),hMe=it();dMe.exports=function(t,r,i,n){var a=i("x"),o=i("y"),s=hMe.minRowLength(a),l=hMe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=aRt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],n);var c=i("z")||i("marker.color");c&&i("histfunc"),i("histnorm"),i("autobinx"),i("autobiny")}});var vMe=W((mBr,pMe)=>{"use strict";var oRt=it(),sRt=PW(),lRt=dW(),uRt=Fu(),cRt=qM(),fRt=RL();pMe.exports=function(t,r,i,n){function a(o,s){return oRt.coerce(t,r,fRt,o,s)}sRt(t,r,a,n),r.visible!==!1&&(lRt(t,r,a,n),uRt(t,r,n,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),cRt(a,n),a("xhoverformat"),a("yhoverformat"))}});var yMe=W((yBr,mMe)=>{"use strict";var hRt=DL(),gMe=ji().hoverLabelText;mMe.exports=function(t,r,i,n,a){var o=hRt(t,r,i,n,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=gMe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=gMe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var _Me=W((xBr,xMe)=>{"use strict";xMe.exports={attributes:RL(),supplyDefaults:vMe(),crossTraceDefaults:PL(),calc:AL(),plot:EL(),layerName:"heatmaplayer",colorbar:x5(),style:kL(),hoverPoints:yMe(),eventData:FW(),moduleType:"trace",name:"histogram2d",basePlotModule:dl(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var wMe=W((_Br,bMe)=>{"use strict";bMe.exports=_Me()});var zL=W((bBr,TMe)=>{"use strict";TMe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var GM=W((wBr,EMe)=>{"use strict";var Pl=p5(),BL=Ns(),MMe=_s(),IW=MMe.axisHoverFormat,dRt=MMe.descriptionOnlyNumbers,pRt=Eo(),vRt=Du().dash,gRt=Ho(),_5=tn().extendFlat,SMe=zL(),mRt=SMe.COMPARISON_OPS2,yRt=SMe.INTERVAL_OPS,AMe=BL.line;EMe.exports=_5({z:Pl.z,x:Pl.x,x0:Pl.x0,dx:Pl.dx,y:Pl.y,y0:Pl.y0,dy:Pl.dy,xperiod:Pl.xperiod,yperiod:Pl.yperiod,xperiod0:BL.xperiod0,yperiod0:BL.yperiod0,xperiodalignment:Pl.xperiodalignment,yperiodalignment:Pl.yperiodalignment,text:Pl.text,hovertext:Pl.hovertext,transpose:Pl.transpose,xtype:Pl.xtype,ytype:Pl.ytype,xhoverformat:IW("x"),yhoverformat:IW("y"),zhoverformat:IW("z",1),hovertemplate:Pl.hovertemplate,hovertemplatefallback:Pl.hovertemplatefallback,texttemplate:_5({},Pl.texttemplate,{}),texttemplatefallback:Pl.texttemplatefallback,textfont:_5({},Pl.textfont,{}),hoverongaps:Pl.hoverongaps,connectgaps:_5({},Pl.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:gRt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:dRt("contour label")},operation:{valType:"enumerated",values:[].concat(mRt).concat(yRt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:_5({},AMe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:vRt,smoothing:_5({},AMe.smoothing,{}),editType:"plot"},zorder:BL.zorder},pRt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var zW=W((TBr,CMe)=>{"use strict";var ef=RL(),A1=GM(),xRt=Eo(),RW=_s().axisHoverFormat,kMe=tn().extendFlat;CMe.exports=kMe({x:ef.x,y:ef.y,z:ef.z,marker:ef.marker,histnorm:ef.histnorm,histfunc:ef.histfunc,nbinsx:ef.nbinsx,xbins:ef.xbins,nbinsy:ef.nbinsy,ybins:ef.ybins,autobinx:ef.autobinx,autobiny:ef.autobiny,bingroup:ef.bingroup,xbingroup:ef.xbingroup,ybingroup:ef.ybingroup,autocontour:A1.autocontour,ncontours:A1.ncontours,contours:A1.contours,line:{color:A1.line.color,width:kMe({},A1.line.width,{dflt:.5}),dash:A1.line.dash,smoothing:A1.line.smoothing,editType:"plot"},xhoverformat:RW("x"),yhoverformat:RW("y"),zhoverformat:RW("z",1),hovertemplate:ef.hovertemplate,hovertemplatefallback:ef.hovertemplatefallback,texttemplate:A1.texttemplate,texttemplatefallback:A1.texttemplatefallback,textfont:A1.textfont},xRt("",{cLetter:"z",editTypeOverride:"calc"}))});var qL=W((ABr,DMe)=>{"use strict";DMe.exports=function(t,r,i,n){var a=n("contours.start"),o=n("contours.end"),s=a===!1||o===!1,l=i("contours.size"),u;s?u=r.autocontour=!0:u=i("autocontour",!1),(u||!l)&&i("ncontours")}});var BW=W((MBr,FMe)=>{"use strict";var _Rt=it();FMe.exports=function(t,r,i,n){n||(n={});var a=t("contours.showlabels");if(a){var o=r.font;_Rt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:i}}),t("contours.labelformat")}n.hasHover!==!1&&t("zhoverformat")}});var OL=W((SBr,LMe)=>{"use strict";var bRt=Fu(),wRt=BW();LMe.exports=function(t,r,i,n,a){var o=i("contours.coloring"),s,l="";o==="fill"&&(s=i("contours.showlines")),s!==!1&&(o!=="lines"&&(l=i("line.color","#000")),i("line.width",.5),i("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,bRt(t,r,n,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),wRt(i,n,l,a)}});var zMe=W((EBr,RMe)=>{"use strict";var PMe=it(),TRt=PW(),ARt=qL(),MRt=OL(),SRt=qM(),IMe=zW();RMe.exports=function(t,r,i,n){function a(s,l){return PMe.coerce(t,r,IMe,s,l)}function o(s){return PMe.coerce2(t,r,IMe,s)}TRt(t,r,a,n),r.visible!==!1&&(ARt(t,r,a,o),MRt(t,r,a,n),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&SRt(a,n))}});var NW=W((kBr,qMe)=>{"use strict";var OW=ji(),qW=it();qMe.exports=function(t,r){var i=t.contours;if(t.autocontour){var n=t.zmin,a=t.zmax;(t.zauto||n===void 0)&&(n=qW.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=qW.aggNums(Math.max,null,r));var o=BMe(n,a,t.ncontours);i.size=o.dtick,i.start=OW.tickFirst(o),o.range.reverse(),i.end=OW.tickFirst(o),i.start===n&&(i.start+=i.size),i.end===a&&(i.end-=i.size),i.start>i.end&&(i.start=i.end=(i.start+i.end)/2),t._input.contours||(t._input.contours={}),qW.extendFlat(t._input.contours,{start:i.start,end:i.end,size:i.size}),t._input.autocontour=!0}else if(i.type!=="constraint"){var s=i.start,l=i.end,u=t._input.contours;if(s>l&&(i.start=u.start=l,l=i.end=u.end=s,s=i.start),!(i.size>0)){var c;s===l?c=1:c=BMe(s,l,t.ncontours).dtick,u.size=i.size=c}}};function BMe(e,t,r){var i={type:"linear",range:[e,t]};return OW.autoTicks(i,(t-e)/(r||15)),i}});var HM=W((CBr,OMe)=>{"use strict";OMe.exports=function(t){return t.end+t.size/1e6}});var UW=W((DBr,UMe)=>{"use strict";var NMe=Jo(),ERt=AL(),kRt=NW(),CRt=HM();UMe.exports=function(t,r){var i=ERt(t,r),n=i[0].z;kRt(r,n);var a=r.contours,o=NMe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=CRt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=n;return NMe.calc(t,r,{vals:s,cLetter:"z"}),i}});var jM=W((FBr,VMe)=>{"use strict";VMe.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 VW=W((LBr,GMe)=>{"use strict";var NL=jM();GMe.exports=function(t){var r=t[0].z,i=r.length,n=r[0].length,a=i===2||n===2,o,s,l,u,c,f,h,d,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 i=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>i?r===5?713:1114:r===5?104:208}return r===15?0:r}});var GW=W((PBr,$Me)=>{"use strict";var UL=it(),b5=jM();$Me.exports=function(t,r,i){var n,a,o,s,l;for(r=r||.01,i=i||.01,o=0;o20?(o=b5.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=b5.SADDLEREMAINDER[o]):delete e.crossings[a],s=b5.NEWDELTA[o],!s){UL.log("Found bad marching index:",o,t,e.level);break}l.push(jMe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),$M(l[l.length-1],l[l.length-2],i,n)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),v=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(v||r&&p)break;o=e.crossings[a]}d===1e4&&UL.log("Infinite loop in contour?");var m=$M(l[0],l[l.length-1],i,n),g=0,w=.2*e.smoothing,b=[],_=0,M,x,T,A,y,E,S,C,k,D,F;for(d=1;d=_;d--)if(M=b[d],M=_&&M+b[x]C&&k--,e.edgepaths[k]=F.concat(l,D));break}I||(e.edgepaths[C]=l.concat(D))}for(C=0;C20&&t?e===208||e===1114?i=r[0]===0?1:-1:n=r[1]===0?1:-1:b5.BOTTOMSTART.indexOf(e)!==-1?n=1:b5.LEFTSTART.indexOf(e)!==-1?i=1:b5.TOPSTART.indexOf(e)!==-1?n=-1:i=-1,[i,n]}function jMe(e,t,r){var i=t[0]+Math.max(r[0],0),n=t[1]+Math.max(r[1],0),a=e.z[n][i],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[n][i+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[i]):0)+(l!==0?l*o.c2l(e.x[i+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[n],!0),i+l,n]}else{var c=(e.level-a)/(e.z[n+1][i]-a),f=(c!==1?(1-c)*s.c2l(e.y[n]):0)+(c!==0?c*s.c2l(e.y[n+1]):0);return[o.c2p(e.x[i],!0),s.c2p(s.l2c(f),!0),i,n+c]}}});var ZMe=W((IBr,XMe)=>{"use strict";var HW=zL(),PRt=sn();XMe.exports={"[]":WMe("[]"),"][":WMe("]["),">":jW(">"),"<":jW("<"),"=":jW("=")};function YMe(e,t){var r=Array.isArray(t),i;function n(a){return PRt(a)?+a:null}return HW.COMPARISON_OPS2.indexOf(e)!==-1?i=n(r?t[0]:t):HW.INTERVAL_OPS.indexOf(e)!==-1?i=r?[n(t[0]),n(t[1])]:[n(t),n(t)]:HW.SET_OPS.indexOf(e)!==-1&&(i=r?t.map(n):[n(t)]),i}function WMe(e){return function(t){t=YMe(e,t);var r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return{start:r,end:i,size:i-r}}}function jW(e){return function(t){return t=YMe(e,t),{start:t,end:1/0,size:1/0}}}});var $W=W((RBr,JMe)=>{"use strict";var KMe=it(),IRt=ZMe(),RRt=HM();JMe.exports=function(t,r,i){for(var n=t.type==="constraint"?IRt[t._operation](t.value):t,a=n.size,o=[],s=RRt(n),l=i.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:i.a,y:i.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:i.x,y:i.y},c=n.start;c1e3){KMe.warn("Too many contours, clipping at 1000",t);break}return o}});var WW=W((zBr,eSe)=>{"use strict";var w5=it();eSe.exports=function(e,t){var r,i,n,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&w5.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r{"use strict";tSe.exports=function(e,t){var r=e[0],i=r.z,n;switch(t.type){case"levels":var a=Math.min(i[0][0],i[0][1]);for(n=0;no.level||o.starts.length&&a===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(n=0;n":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var VL=W(Cf=>{"use strict";var YM=vi(),ic=it(),Yg=Ji(),zRt=Jo(),nSe=uo(),rSe=ji(),iSe=i1(),BRt=EL(),aSe=VW(),oSe=GW(),qRt=$W(),ORt=WW(),sSe=YW(),WM=jM(),M1=WM.LABELOPTIMIZER;Cf.plot=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;ic.makeTraceGroups(n,i,"contour").each(function(s){var l=YM.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,p=qRt(d,r,u),v=ic.ensureSingle(l,"g","heatmapcoloring"),m=[];d.coloring==="heatmap"&&(m=[s]),BRt(t,r,m,v),aSe(p),oSe(p);var g=a.c2p(f[0],!0),w=a.c2p(f[f.length-1],!0),b=o.c2p(h[0],!0),_=o.c2p(h[h.length-1],!0),M=[[g,_],[w,_],[w,b],[g,b]],x=p;d.type==="constraint"&&(x=ORt(p,d._operation)),NRt(l,M,d),URt(l,x,M,d),VRt(l,p,t,u,d),HRt(l,r,t,u,M)})};function NRt(e,t,r){var i=ic.ensureSingle(e,"g","contourbg"),n=i.selectAll("path").data(r.coloring==="fill"?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function URt(e,t,r,i){var n=i.coloring==="fill"||i.type==="constraint"&&i._operation!=="=",a="M"+r.join("L")+"Z";n&&sSe(t,i);var o=ic.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(n?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+lSe(l,r);u?YM.select(this).attr("d",u).style("stroke","none"):YM.select(this).remove()})}function lSe(e,t){var r="",i=0,n=e.edgepaths.map(function(g,w){return w}),a=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function d(g){return Math.abs(g[1]-t[2][1])<.01}function p(g){return Math.abs(g[0]-t[0][0])<.01}function v(g){return Math.abs(g[0]-t[2][0])<.01}for(;n.length;){for(f=Yg.smoothopen(e.edgepaths[i],e.smoothing),r+=a?f:f.replace(/^M/,"L"),n.splice(n.indexOf(i),1),o=e.edgepaths[i][e.edgepaths[i].length-1],u=-1,l=0;l<4;l++){if(!o){ic.log("Missing end?",i,e);break}for(h(o)&&!v(o)?s=t[1]:p(o)?s=t[0]:d(o)?s=t[3]:v(o)&&(s=t[2]),c=0;c=0&&(s=m,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-m[1])<.01&&(m[0]-o[0])*(s[0]-m[0])>=0&&(s=m,u=c):ic.log("endpt to newendpt is not vert. or horz.",o,s,m)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){ic.log("unclosed perimeter path");break}i=u,a=n.indexOf(i)===-1,a&&(i=n[0],r+="Z")}for(i=0;iM1.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=M1.MAXCOST)return c};function GRt(e,t,r,i){var n=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*n,c=Math.sin(l)*n,f=(o>i.center?i.right-o:o-i.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>i.middle?i.bottom-s:s-i.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=M1.EDGECOST*(1/(f-1)+1/(h-1));d+=M1.ANGLECOST*l*l;for(var p=o-u,v=s-c,m=o+u,g=s+c,w=0;w{"use strict";var $Rt=vi(),XW=Jo(),WRt=HM();uSe.exports=function(t){var r=t.contours,i=r.start,n=WRt(r),a=r.size||1,o=Math.floor((n-i)/a)+1,s=r.coloring==="lines"?0:1,l=XW.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?XW.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,p,v=l.min,m=l.max;if(r.coloring==="heatmap"){for(p=0;p=m)&&(i<=v&&(i=v),n>=m&&(n=m),o=Math.floor((n-i)/a)+1,s=0),p=0;pv&&(f.unshift(v),h.unshift(h[0])),f[f.length-1]{"use strict";var GL=vi(),cSe=Ji(),YRt=kL(),XRt=ZW();fSe.exports=function(t){var r=GL.select(t).selectAll("g.contour");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=GL.select(this),a=i[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?XRt(a):null;n.selectAll("g.contourlevel").each(function(m){GL.select(this).selectAll("path").call(cSe.lineGroupStyle,s.width,f?d(m.level):s.color,s.dash)});var p=o.labelfont;if(n.selectAll("g.contourlabels text").each(function(m){cSe.font(GL.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?d(m.level):s.color)})}),c)n.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var v;n.selectAll("g.contourfill path").style("fill",function(m){return v===void 0&&(v=m.level),d(m.level+.5*l)}),v===void 0&&(v=u),n.selectAll("g.contourbg path").style("fill",d(v-.5*l))}}),YRt(t)}});var jL=W((UBr,dSe)=>{"use strict";var hSe=Jo(),ZRt=ZW(),KRt=HM();function JRt(e,t,r){var i=t.contours,n=t.line,a=i.size||1,o=i.coloring,s=ZRt(t,{isColorbar:!0});if(o==="heatmap"){var l=hSe.extractOpts(t);r._fillgradient=l.reversescale?hSe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:n.color,width:i.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:i.start,end:KRt(i),size:a}}dSe.exports={min:"zmin",max:"zmax",calc:JRt}});var KW=W((VBr,pSe)=>{"use strict";var $L=ni(),QRt=DL();pSe.exports=function(t,r,i,n,a){a||(a={}),a.isContour=!0;var o=QRt(t,r,i,n,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&$L.opacity(l.fillcolor)?s.color=$L.addOpacity(l.fillcolor,1):l.contours.showlines&&$L.opacity(l.line.color)&&(s.color=$L.addOpacity(l.line.color,1)))}),o}});var gSe=W((GBr,vSe)=>{"use strict";vSe.exports={attributes:zW(),supplyDefaults:zMe(),crossTraceDefaults:PL(),calc:UW(),plot:VL().plot,layerName:"contourlayer",style:HL(),colorbar:jL(),hoverPoints:KW(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:dl(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var ySe=W((HBr,mSe)=>{"use strict";mSe.exports=gSe()});var JW=W((jBr,ASe)=>{"use strict";var xSe=sn(),ezt=BW(),wSe=ni(),_Se=wSe.addOpacity,tzt=wSe.opacity,TSe=zL(),bSe=it().isArrayOrTypedArray,rzt=TSe.CONSTRAINT_REDUCTION,izt=TSe.COMPARISON_OPS2;ASe.exports=function(t,r,i,n,a,o){var s=r.contours,l,u,c,f=i("contours.operation");if(s._operation=rzt[f],nzt(i,s),f==="="?l=s.showlines=!0:(l=i("contours.showlines"),c=i("fillcolor",_Se((t.line||{}).color||a,.5))),l){var h=c&&tzt(c)?_Se(r.fillcolor,1):a;u=i("line.color",h),i("line.width",2),i("line.dash")}i("line.smoothing"),ezt(i,n,u,o)};function nzt(e,t){var r;izt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),bSe(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])]:xSe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),xSe(t.value)||(bSe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var ESe=W(($Br,SSe)=>{"use strict";var QW=it(),azt=pL(),ozt=Hp(),szt=JW(),lzt=qL(),uzt=OL(),czt=qM(),MSe=GM();SSe.exports=function(t,r,i,n){function a(u,c){return QW.coerce(t,r,MSe,u,c)}function o(u){return QW.coerce2(t,r,MSe,u)}var s=azt(t,r,a,n);if(!s){r.visible=!1;return}ozt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",QW.isArray1D(r.z)),l?szt(t,r,a,n,i):(lzt(t,r,a,o),uzt(t,r,a,n)),r.contours&&r.contours.coloring==="heatmap"&&czt(a,n),a("zorder")}});var CSe=W((WBr,kSe)=>{"use strict";kSe.exports={attributes:GM(),supplyDefaults:ESe(),calc:UW(),plot:VL().plot,style:HL(),colorbar:jL(),hoverPoints:KW(),moduleType:"trace",name:"contour",basePlotModule:dl(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var FSe=W((YBr,DSe)=>{"use strict";DSe.exports=CSe()});var eY=W((XBr,RSe)=>{"use strict";var{hovertemplateAttrs:fzt,texttemplateAttrs:hzt,templatefallbackAttrs:LSe}=Ga(),dzt=g1(),D0=Ns(),pzt=Wa(),PSe=Eo(),vzt=Du().dash,Ky=tn().extendFlat,Ld=D0.marker,XM=D0.line,ISe=Ld.line;RSe.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:Ky({},D0.mode,{dflt:"markers"}),text:Ky({},D0.text,{}),texttemplate:hzt({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:LSe({editType:"plot"}),hovertext:Ky({},D0.hovertext,{}),line:{color:XM.color,width:XM.width,dash:vzt,backoff:XM.backoff,shape:Ky({},XM.shape,{values:["linear","spline"]}),smoothing:XM.smoothing,editType:"calc"},connectgaps:D0.connectgaps,cliponaxis:D0.cliponaxis,fill:Ky({},D0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:dzt(),marker:Ky({symbol:Ld.symbol,opacity:Ld.opacity,angle:Ld.angle,angleref:Ld.angleref,standoff:Ld.standoff,maxdisplayed:Ld.maxdisplayed,size:Ld.size,sizeref:Ld.sizeref,sizemin:Ld.sizemin,sizemode:Ld.sizemode,line:Ky({width:ISe.width,dash:ISe.dash,editType:"calc"},PSe("marker.line")),gradient:Ld.gradient,editType:"calc"},PSe("marker")),textfont:D0.textfont,textposition:D0.textposition,selected:D0.selected,unselected:D0.unselected,hoverinfo:Ky({},pzt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:D0.hoveron,hovertemplate:fzt(),hovertemplatefallback:LSe()}});var OSe=W((ZBr,qSe)=>{"use strict";var zSe=it(),gzt=v1(),T5=$o(),mzt=bd(),yzt=jp(),BSe=Nw(),xzt=$p(),_zt=y1(),bzt=eY();qSe.exports=function(t,r,i,n){function a(h,d){return zSe.coerce(t,r,bzt,h,d)}var o=a("a"),s=a("b"),l=a("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,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var tY=ji();NSe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.aLabel=tY.tickText(a.aaxis,t.a,!0).text,n.bLabel=tY.tickText(a.baxis,t.b,!0).text,n.cLabel=tY.tickText(a.caxis,t.c,!0).text,n}});var jSe=W((JBr,HSe)=>{"use strict";var rY=sn(),wzt=wd(),Tzt=x1(),Azt=w0(),Mzt=Td().calcMarkerSize,VSe=["a","b","c"],GSe={a:["b","c"],b:["a","c"],c:["a","b"]};HSe.exports=function(t,r){var i=t._fullLayout[r.subplot],n=i.sum,a=r.sum||n,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l{"use strict";var Szt=$w();$Se.exports=function(t,r,i){var n=r.plotContainer;n.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:n,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var Ezt=Zw();YSe.exports=function(t,r,i,n){var a=Ezt(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[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),a}var f=o.cd[o.index],h=o.trace,d=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[h.subplot]={_subplot:d};var v=h._module.formatLabels(f,h,p);o.aLabel=v.aLabel,o.bLabel=v.bLabel,o.cLabel=v.cLabel;var m=f.hi||h.hoverinfo,g=[];function w(_,M){g.push(_._hovertitle+": "+M)}if(!h.hovertemplate){var b=m.split("+");b.indexOf("all")!==-1&&(b=["a","b","c"]),b.indexOf("a")!==-1&&w(d.aaxis,o.aLabel),b.indexOf("b")!==-1&&w(d.baxis,o.bLabel),b.indexOf("c")!==-1&&w(d.caxis,o.cLabel)}return o.extraText=g.join("
"),o.hovertemplate=h.hovertemplate,a}});var KSe=W((tqr,ZSe)=>{"use strict";ZSe.exports=function(t,r,i,n,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n[a]){var o=n[a];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 lEe=W((rqr,sEe)=>{"use strict";var iEe=vi(),iY=yi(),Xg=it(),S1=Xg.strTranslate,WL=Xg._,B_=ni(),YL=Ji(),ZM=i1(),nY=tn().extendFlat,kzt=Ko(),Jy=ji(),JSe=bf(),QSe=Ds(),nEe=u1(),eEe=nEe.freeMode,Czt=nEe.rectMode,aY=e_(),Dzt=cu().prepSelect,Fzt=cu().selectOnClick,Lzt=cu().clearOutline,Pzt=cu().clearSelectionsCache,aEe=Gl();function oEe(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}sEe.exports=oEe;var E1=oEe.prototype;E1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};E1.plot=function(e,t){var r=this,i=t[r.id],n=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aA5*u?(g=u,m=g*A5):(m=l,g=m/A5),w=o*m/l,b=s*g/u,p=t.l+t.w*n-m/2,v=t.t+t.h*(1-a)-g/2,r.x0=p,r.y0=v,r.w=m,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[n-w/2,n+w/2],_id:"x"},ZM(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(D){return D.a>=r.aaxis.range[0]&&D.a<=r.aaxis.range[1]&&D.b>=r.baxis.range[1]&&D.b<=r.baxis.range[0]&&D.c>=r.caxis.range[1]&&D.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-b/2,a+b/2],_id:"y"},ZM(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var _=r.yaxis.domain[0],M=r.aaxis=nY({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[_,_+b*A5],anchor:"free",position:0,_id:"y",_length:m});ZM(M,r.graphDiv._fullLayout),M.setScale();var x=r.baxis=nY({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:m});ZM(x,r.graphDiv._fullLayout),x.setScale();var T=r.caxis=nY({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[_,_+b*A5],anchor:"free",position:0,_id:"y",_length:m});ZM(T,r.graphDiv._fullLayout),T.setScale();var A="M"+p+","+(v+g)+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDef.select("path").attr("d",A),r.layers.plotbg.select("path").attr("d",A);var y="M0,"+g+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",y);var E=S1(p,v);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",E),r.clipDefRelative.select("path").attr("transform",null);var S=S1(p-x._offset,v+g);r.layers.baxis.attr("transform",S),r.layers.bgrid.attr("transform",S);var C=S1(p+m/2,v)+"rotate(30)"+S1(0,-M._offset);r.layers.aaxis.attr("transform",C),r.layers.agrid.attr("transform",C);var k=S1(p+m/2,v)+"rotate(-30)"+S1(0,-T._offset);r.layers.caxis.attr("transform",k),r.layers.cgrid.attr("transform",k),r.drawAxes(!0),r.layers.aline.select("path").attr("d",M.showline?"M"+p+","+(v+g)+"l"+m/2+",-"+g:"M0,0").call(B_.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+p+","+(v+g)+"h"+m:"M0,0").call(B_.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",T.showline?"M"+(p+m/2)+","+v+"l"+m/2+","+g:"M0,0").call(B_.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),YL.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};E1.drawAxes=function(e){var t=this,r=t.graphDiv,i=t.id.slice(7)+"title",n=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.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;n["a-title"]=aY.draw(r,"a"+i,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:WL(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=aY.draw(r,"b"+i,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:WL(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"}}),n["c-title"]=aY.draw(r,"c"+i,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:WL(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"}})}};E1.drawAx=function(e){var t=this,r=t.graphDiv,i=e._name,n=i.charAt(0),a=e._id,o=t.layers[i],s=30,l=n+"tickLayout",u=Izt(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=Jy.calcTicks(e),f=Jy.clipEnds(e,c),h=Jy.makeTransTickFn(e),d=Jy.getTickSigns(e)[2],p=Xg.deg2rad(s),v=d*(e.linewidth||1)/2,m=d*e.ticklen,g=t.w,w=t.h,b=n==="b"?"M0,"+v+"l"+Math.sin(p)*m+","+Math.cos(p)*m:"M"+v+",0l"+Math.cos(p)*m+","+-Math.sin(p)*m,_={a:"M0,0l"+w+",-"+g/2,b:"M0,0l-"+g/2+",-"+w,c:"M0,0l-"+w+","+g/2}[n];Jy.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:b,transFn:h,crisp:!1}),Jy.drawGrid(r,e,{vals:f,layer:t.layers[n+"grid"],path:_,transFn:h,crisp:!1}),Jy.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:Jy.makeLabelFns(e,0,s)})};function Izt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var zu=aEe.MINZOOM/2+.87,Rzt="m-0.87,.5h"+zu+"v3h-"+(zu+5.2)+"l"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l2.6,1.5l-"+zu/2+","+zu*.87+"Z",zzt="m0.87,.5h-"+zu+"v3h"+(zu+5.2)+"l-"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l-2.6,1.5l"+zu/2+","+zu*.87+"Z",Bzt="m0,1l"+zu/2+","+zu*.87+"l2.6,-1.5l-"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l-"+(zu/2+2.6)+","+(zu*.87+4.5)+"l2.6,1.5l"+zu/2+",-"+zu*.87+"Z",qzt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",tEe=!0;E1.clearOutline=function(){Pzt(this.dragOptions),Lzt(this.dragOptions.gd)};E1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,i=r._fullLayout._zoomlayer,n,a;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(S,C,k){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],n=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var D=e.dragOptions.dragmode=r._fullLayout.dragmode;eEe(D)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,D==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=g,e.dragOptions.doneFn=T,w(S,C,k)):D==="pan"?(e.dragOptions.moveFn=y,e.dragOptions.clickFn=g,e.dragOptions.doneFn=E,A(),e.clearOutline(r)):(Czt(D)||eEe(D))&&Dzt(S,C,k,e.dragOptions,D)}};var o,s,l,u,c,f,h,d,p,v;function m(S){var C={};return C[e.id+".aaxis.min"]=S.a,C[e.id+".baxis.min"]=S.b,C[e.id+".caxis.min"]=S.c,C}function g(S,C){var k=r._fullLayout.clickmode;rEe(r),S===2&&(r.emit("plotly_doubleclick",null),iY.call("_guiRelayout",r,m({a:0,b:0,c:0}))),k.indexOf("select")>-1&&S===1&&Fzt(C,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),k.indexOf("event")>-1&&QSe.click(r,C,e.id)}function w(S,C,k){var D=t.getBoundingClientRect();o=C-D.left,s=k-D.top,r._fullLayout._calcInverseTransform(r);var F=r._fullLayout._invTransform,P=Xg.apply3DTransform(F)(o,s);o=P[0],s=P[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=B_.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=i.append("path").attr("class","zoombox").attr("transform",S1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),v=i.append("path").attr("class","zoombox-corners").attr("transform",S1(e.x0,e.y0)).style({fill:B_.background,stroke:B_.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function b(S,C){return 1-C/e.h}function _(S,C){return 1-(S+(e.h-C)/Math.sqrt(3))/e.w}function M(S,C){return(S-(e.h-C)/Math.sqrt(3))/e.w}function x(S,C){var k=o+S*n,D=s+C*a,F=Math.max(0,Math.min(1,b(o,s),b(k,D))),P=Math.max(0,Math.min(1,_(o,s),_(k,D))),R=Math.max(0,Math.min(1,M(o,s),M(k,D))),L=(F/2+R)*e.w,I=(1-F/2-P)*e.w,B=(L+I)/2,O=I-L,$=(1-F)*e.h,Y=$-O/A5;O.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),v.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",m(c))}function T(){rEe(r),c!==l&&(iY.call("_guiRelayout",r,m(c)),tEe&&r.data&&r._context.showTips&&(Xg.notifier(WL(r,"Double-click to zoom back out"),"long",r),tEe=!1))}function A(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function y(S,C){var k=S/e.xaxis._m,D=C/e.yaxis._m;c={a:l.a-D,b:l.b+(k+D)/2,c:l.c-(k-D)/2};var F=[c.a,c.b,c.c].sort(Xg.sorterAsc),P={a:F.indexOf(c.a),b:F.indexOf(c.b),c:F.indexOf(c.c)};F[0]<0&&(F[1]+F[0]/2<0?(F[2]+=F[0]+F[1],F[0]=F[1]=0):(F[2]+=F[0]/2,F[1]+=F[0]/2,F[0]=0),c={a:F[P.a],b:F[P.b],c:F[P.c]},C=(l.a-c.a)*e.yaxis._m,S=(l.c-c.c-l.b+c.b)*e.xaxis._m);var R=S1(e.x0+S,e.y0+C);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",R);var L=S1(-S,-C);e.clipDefRelative.select("path").attr("transform",L),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(YL.hideOutsideRangePoints,e),r.emit("plotly_relayouting",m(c))}function E(){iY.call("_guiRelayout",r,m(c))}t.onmousemove=function(S){QSe.hover(r,S,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(S){r._dragging||JSe.unhover(r,S)},JSe.init(this.dragOptions)};function rEe(e){iEe.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var lY=W((iqr,uEe)=>{"use strict";var Ozt=Vl(),Nzt=us().attributes,eo=ec(),Uzt=ls().overrideAll,oY=tn().extendFlat,sY={title:{text:eo.title.text,font:eo.title.font},color:eo.color,tickmode:eo.minor.tickmode,nticks:oY({},eo.nticks,{dflt:6,min:1}),tick0:eo.tick0,dtick:eo.dtick,tickvals:eo.tickvals,ticktext:eo.ticktext,ticks:eo.ticks,ticklen:eo.ticklen,tickwidth:eo.tickwidth,tickcolor:eo.tickcolor,ticklabelstep:eo.ticklabelstep,showticklabels:eo.showticklabels,labelalias:eo.labelalias,showtickprefix:eo.showtickprefix,tickprefix:eo.tickprefix,showticksuffix:eo.showticksuffix,ticksuffix:eo.ticksuffix,showexponent:eo.showexponent,exponentformat:eo.exponentformat,minexponent:eo.minexponent,separatethousands:eo.separatethousands,tickfont:eo.tickfont,tickangle:eo.tickangle,tickformat:eo.tickformat,tickformatstops:eo.tickformatstops,hoverformat:eo.hoverformat,showline:oY({},eo.showline,{dflt:!0}),linecolor:eo.linecolor,linewidth:eo.linewidth,showgrid:oY({},eo.showgrid,{dflt:!0}),gridcolor:eo.gridcolor,gridwidth:eo.gridwidth,griddash:eo.griddash,layer:eo.layer,min:{valType:"number",dflt:0,min:0}},XL=uEe.exports=Uzt({domain:Nzt({name:"ternary"}),bgcolor:{valType:"color",dflt:Ozt.background},sum:{valType:"number",dflt:1,min:0},aaxis:sY,baxis:sY,caxis:sY},"plot","from-root");XL.uirevision={valType:"any",editType:"none"};XL.aaxis.uirevision=XL.baxis.uirevision=XL.caxis.uirevision={valType:"any",editType:"none"}});var q_=W((nqr,cEe)=>{"use strict";var Vzt=it(),Gzt=Da(),Hzt=us().defaults;cEe.exports=function(t,r,i,n){var a=n.type,o=n.attributes,s=n.handleDefaults,l=n.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function p(w,b){return Vzt.coerce(h,d,o,w,b)}for(var v=0;v{"use strict";var jzt=ni(),$zt=Da(),ZL=it(),Wzt=q_(),Yzt=wy(),Xzt=Ty(),Zzt=vw(),Kzt=Xx(),Jzt=vM(),hEe=lY(),fEe=["aaxis","baxis","caxis"];dEe.exports=function(t,r,i){Wzt(t,r,i,{type:"ternary",attributes:hEe,handleDefaults:Qzt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function Qzt(e,t,r,i){var n=r("bgcolor"),a=r("sum");i.bgColor=jzt.combine(n,i.paper_bgcolor);for(var o,s,l,u=0;u=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function eBt(e,t,r,i){var n=hEe[t._name];function a(d,p){return ZL.coerce(e,t,n,d,p)}a("uirevision",i.uirevision),t.type="linear";var o=a("color"),s=o!==n.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,ZL.coerceFont(a,"title.font",r.font,{overrideDflt:{size:ZL.bigFont(r.font.size),color:s}}),a("min"),Kzt(e,t,a,"linear"),Xzt(e,t,a,"linear"),Yzt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Zzt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(ZL.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),Jzt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),a("hoverformat"),a("layer")}});var vEe=W(Pd=>{"use strict";var tBt=lEe(),rBt=_c().getSubplotCalcData,iBt=it().counterRegex,M5="ternary";Pd.name=M5;var nBt=Pd.attr="subplot";Pd.idRoot=M5;Pd.idRegex=Pd.attrRegex=iBt(M5);var aBt=Pd.attributes={};aBt[nBt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Pd.layoutAttributes=lY();Pd.supplyLayoutDefaults=pEe();Pd.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[M5],a=0;a{"use strict";gEe.exports={attributes:eY(),supplyDefaults:OSe(),colorbar:Ac(),formatLabels:USe(),calc:jSe(),plot:WSe(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:XSe(),selectPoints:w_(),eventData:KSe(),moduleType:"trace",name:"scatterternary",basePlotModule:vEe(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var xEe=W((lqr,yEe)=>{"use strict";yEe.exports=mEe()});var uY=W((uqr,bEe)=>{"use strict";var Wl=IM(),S5=tn().extendFlat,_Ee=_s().axisHoverFormat;bEe.exports={y:Wl.y,x:Wl.x,x0:Wl.x0,y0:Wl.y0,xhoverformat:_Ee("x"),yhoverformat:_Ee("y"),name:S5({},Wl.name,{}),orientation:S5({},Wl.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:Wl.fillcolor,points:S5({},Wl.boxpoints,{}),jitter:S5({},Wl.jitter,{}),pointpos:S5({},Wl.pointpos,{}),width:S5({},Wl.width,{}),marker:Wl.marker,text:Wl.text,hovertext:Wl.hovertext,hovertemplate:Wl.hovertemplate,hovertemplatefallback:Wl.hovertemplatefallback,quartilemethod:Wl.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:Wl.offsetgroup,alignmentgroup:Wl.alignmentgroup,selected:Wl.selected,unselected:Wl.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Wl.zorder}});var hY=W((cqr,wEe)=>{"use strict";var cY=RM(),fY=it().extendFlat;wEe.exports={violinmode:fY({},cY.boxmode,{}),violingap:fY({},cY.boxgap,{}),violingroupgap:fY({},cY.boxgroupgap,{})}});var EEe=W((fqr,SEe)=>{"use strict";var TEe=it(),oBt=ni(),AEe=BM(),MEe=uY();SEe.exports=function(t,r,i,n){function a(M,x){return TEe.coerce(t,r,MEe,M,x)}function o(M,x){return TEe.coerce2(t,r,MEe,M,x)}if(AEe.handleSampleDefaults(t,r,a,n),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||i),f=a("line.width"),h=a("fillcolor",oBt.addOpacity(r.line.color,.5));AEe.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",h),v=o("box.line.color",c),m=o("box.line.width",f),g=a("box.visible",!!(d||p||v||m));g||(r.box={visible:!1});var w=o("meanline.color",c),b=o("meanline.width",f),_=a("meanline.visible",!!(w||b));_||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var CEe=W((hqr,kEe)=>{"use strict";var sBt=it(),lBt=hY(),uBt=lL();kEe.exports=function(t,r,i){function n(a,o){return sBt.coerce(t,r,lBt,a,o)}uBt._supply(t,r,i,n,"violin")}});var KL=W(O_=>{"use strict";var cBt=it(),fBt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};O_.makeKDE=function(e,t,r){var i=r.length,n=fBt.gaussian,a=e.bandwidth,o=1/(i*a);return function(s){for(var l=0,u=0;u{"use strict";var dY=it(),pY=ji(),hBt=aW(),DEe=KL(),dBt=Kn().BADNUM;FEe.exports=function(t,r){var i=hBt(t,r);if(i[0].t.empty)return i;for(var n=t._fullLayout,a=pY.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var mBt=cL().setPositionOffset,PEe=["v","h"];IEe.exports=function(t,r){for(var i=t.calcdata,n=r.xaxis,a=r.yaxis,o=0;o{"use strict";var vY=vi(),gY=it(),yBt=Ji(),mY=fL(),xBt=Hj(),_Bt=KL();zEe.exports=function(t,r,i,n){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=xBt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return yBt.smoothopen(h[0],1)}gY.makeTraceGroups(n,i,"trace violins").each(function(c){var f=vY.select(this),h=c[0],d=h.t,p=h.trace;if(p.visible!==!0||d.empty){f.remove();return}var v=d.bPos,m=d.bdPos,g=r[d.valLetter+"axis"],w=r[d.posLetter+"axis"],b=p.side==="both",_=b||p.side==="positive",M=b||p.side==="negative",x=f.selectAll("path.violin").data(gY.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(D){var F=vY.select(this),P=D.density,R=P.length,L=w.c2l(D.pos+v,!0),I=w.l2p(L),B;if(p.width)B=d.maxKDE/m;else{var O=o._violinScaleGroupStats[p.scalegroup];B=p.scalemode==="count"?O.maxKDE/m*(O.maxCount/D.pts.length):O.maxKDE/m}var $,Y,K,j,q,J,U;if(_){for(J=new Array(R),j=0;j{"use strict";var qEe=vi(),E5=ni(),bBt=th().stylePoints;OEe.exports=function(t){var r=qEe.select(t).selectAll("g.trace.violins");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=i[0].trace,a=qEe.select(this),o=n.box||{},s=o.line||{},l=n.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(E5.stroke,n.line.color).call(E5.fill,n.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(E5.stroke,s.color).call(E5.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(E5.stroke,l.color),a.selectAll("path.meanline").style(c).call(E5.stroke,l.color),bBt(a,n,t)})}});var HEe=W((yqr,GEe)=>{"use strict";var wBt=ni(),yY=it(),TBt=ji(),UEe=cW(),VEe=KL();GEe.exports=function(t,r,i,n,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,p;if(c||f){var v=UEe.hoverOnBoxes(t,r,i,n);if(f&&v.length>0){var m=t.xa,g=t.ya,w,b,_,M,x;l.orientation==="h"?(x=r,w="y",_=g,b="x",M=m):(x=i,w="x",_=m,b="y",M=g);var T=s[t.index];if(x>=T.span[0]&&x<=T.span[1]){var A=yY.extendFlat({},t),y=M.c2p(x,!0),E=VEe.getKdeValue(T,l,x),S=VEe.getPositionOnKdePath(T,l,y),C=_._offset,k=_._length;A[w+"0"]=S[0],A[w+"1"]=S[1],A[b+"0"]=A[b+"1"]=y,A[b+"Label"]=b+": "+TBt.hoverLabelText(M,x,l[b+"hoverformat"])+", "+s[0].t.labels.kde+" "+E.toFixed(3);for(var D=0,F=0;F{"use strict";jEe.exports={attributes:uY(),layoutAttributes:hY(),supplyDefaults:EEe(),crossTraceDefaults:BM().crossTraceDefaults,supplyLayoutDefaults:CEe(),calc:LEe(),crossTraceCalc:REe(),plot:BEe(),style:NEe(),styleOnSelect:th().styleOnSelect,hoverPoints:HEe(),selectPoints:fW(),moduleType:"trace",name:"violin",basePlotModule:dl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var YEe=W((_qr,WEe)=>{"use strict";WEe.exports=$Ee()});var ZEe=W((bqr,XEe)=>{"use strict";XEe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var _Y=W((wqr,eke)=>{"use strict";var cs=w1(),xY=Ns().line,ABt=Wa(),KEe=_s().axisHoverFormat,{hovertemplateAttrs:MBt,texttemplateAttrs:SBt,templatefallbackAttrs:JEe}=Ga(),QEe=ZEe(),Zg=tn().extendFlat,EBt=ni();eke.exports={x:cs.x,x0:cs.x0,dx:cs.dx,y:cs.y,y0:cs.y0,dy:cs.dy,xperiod:cs.xperiod,yperiod:cs.yperiod,xperiod0:cs.xperiod0,yperiod0:cs.yperiod0,xperiodalignment:cs.xperiodalignment,yperiodalignment:cs.yperiodalignment,xhoverformat:KEe("x"),yhoverformat:KEe("y"),hovertext:cs.hovertext,hovertemplate:MBt({},{keys:QEe.eventDataKeys}),hovertemplatefallback:JEe(),hoverinfo:Zg({},ABt.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:SBt({editType:"plot"},{keys:QEe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:JEe({editType:"plot"}),text:cs.text,textposition:cs.textposition,insidetextanchor:Zg({},cs.insidetextanchor,{dflt:"middle"}),textangle:Zg({},cs.textangle,{dflt:0}),textfont:cs.textfont,insidetextfont:cs.insidetextfont,outsidetextfont:cs.outsidetextfont,constraintext:cs.constraintext,cliponaxis:cs.cliponaxis,orientation:Zg({},cs.orientation,{}),offset:Zg({},cs.offset,{arrayOk:!1}),width:Zg({},cs.width,{arrayOk:!1}),marker:kBt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Zg({},xY.color,{dflt:EBt.defaultLine}),width:Zg({},xY.width,{dflt:0,editType:"plot"}),dash:xY.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:cs.offsetgroup,alignmentgroup:cs.alignmentgroup,zorder:cs.zorder};function kBt(){var e=Zg({},cs.marker);return delete e.pattern,delete e.cornerradius,e}});var bY=W((Tqr,tke)=>{"use strict";tke.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 TY=W((Aqr,ike)=>{"use strict";var JL=it(),CBt=__(),DBt=E0().handleText,FBt=x_(),LBt=Hp(),rke=_Y(),wY=ni();function PBt(e,t,r,i){function n(f,h){return JL.coerce(e,t,rke,f,h)}var a=FBt(e,t,i,n);if(!a){t.visible=!1;return}LBt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("orientation",t.y&&!t.x?"v":"h"),n("offset"),n("width");var o=n("text");n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var s=n("textposition");DBt(e,t,i,n,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&n("textinfo",JL.isArrayOrTypedArray(o)?"text+value":"value");var l=n("marker.color",r);n("marker.line.color",wY.defaultLine),n("marker.line.width");var u=n("connector.visible");if(u){n("connector.fillcolor",IBt(l));var c=n("connector.line.width");c&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function IBt(e){var t=JL.isArrayOrTypedArray(e)?"#000":e;return wY.addOpacity(t,.5*wY.opacity(t))}function RBt(e,t){var r,i;function n(o){return JL.coerce(i._input,i,rke,o)}for(var a=0;a{"use strict";var zBt=it(),BBt=bY();nke.exports=function(e,t,r){var i=!1;function n(s,l){return zBt.coerce(e,t,BBt,s,l)}for(var a=0;a{"use strict";var k5=it();oke.exports=function(t,r){for(var i=0;i{"use strict";var lke=ji(),uke=Wp(),qBt=ske(),OBt=w0(),KM=Kn().BADNUM;cke.exports=function(t,r){var i=lke.getFromId(t,r.xaxis||"x"),n=lke.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=uke(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=uke(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),p=new Array(d);for(r._base=[],f=0;f{"use strict";var hke=b_().setGroupPositions;dke.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var QL=vi(),e2=it(),vke=Ji(),Qy=Kn().BADNUM,NBt=I_(),UBt=Qc().clearMinTextSize;mke.exports=function(t,r,i,n){var a=t._fullLayout;UBt("funnel",a),VBt(t,r,i,n),GBt(t,r,i,n),NBt.plot(t,r,i,n,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function VBt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=QL.select(this),l=o[0].trace,u=e2.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(e2.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var v=gke(d,n,a,c),m=v[0],g=v[1],w="";m[0]!==Qy&&g[0]!==Qy&&m[1]!==Qy&&g[1]!==Qy&&m[2]!==Qy&&g[2]!==Qy&&m[3]!==Qy&&g[3]!==Qy&&(c?w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2]+"H"+m[3]+"L"+m[1]+","+g[1]+"Z":w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3]+"V"+g[2]+"L"+m[1]+","+g[0]+"Z"),w===""&&(w="M0,0Z"),e2.ensureSingle(QL.select(this),"path").attr("d",w).call(vke.setClipUrl,t.layerClipId,e)}})})}function GBt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=QL.select(this),l=o[0].trace,u=e2.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(e2.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var v=gke(d,n,a,c),m=v[0],g=v[1],w="";m[3]!==void 0&&g[3]!==void 0&&(c?(w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2],w+="M"+m[1]+","+g[1]+"L"+m[3]+","+g[2]):(w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3],w+="M"+m[1]+","+g[0]+"L"+m[2]+","+g[2])),w===""&&(w="M0,0Z"),e2.ensureSingle(QL.select(this),"path").attr("d",w).call(vke.setClipUrl,t.layerClipId,e)}})})}function gke(e,t,r,i){var n=[],a=[],o=i?t:r,s=i?r:t;return n[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),n[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),i?[n,a]:[a,n]}});var bke=W((Dqr,_ke)=>{"use strict";var JM=vi(),xke=Ji(),MY=ni(),HBt=kg().DESELECTDIM,jBt=Ed(),$Bt=Qc().resizeText,WBt=jBt.styleTextPoints;function YBt(e,t,r){var i=r||JM.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");$Bt(e,i,"funnel"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=JM.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;JM.select(this).call(MY.fill,s.mc||l.color).call(MY.stroke,s.mlc||l.line.color).call(xke.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?HBt:1)}}),WBt(a,o,e),a.selectAll(".regions").each(function(){JM.select(this).selectAll("path").style("stroke-width",0).call(MY.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;xke.lineGroupStyle(JM.select(this).selectAll("path"),s.width,s.color,s.dash)})})}_ke.exports={style:YBt}});var Ake=W((Fqr,Tke)=>{"use strict";var wke=ni().opacity,XBt=c5().hoverOnBars,SY=it().formatPercent;Tke.exports=function(t,r,i,n,a){var o=XBt(t,r,i,n,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=SY(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=SY(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=SY(f.sumR,1);var d=f.hi||l.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var v=d==="all",m=d.split("+"),g=function(w){return v||m.indexOf(w)!==-1};g("percent initial")&&p.push(o.percentInitialLabel+" of initial"),g("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),g("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=ZBt(l,f),[o]}};function ZBt(e,t){var r=e.marker,i=t.mc||r.color,n=t.mlc||r.line.color,a=t.mlw||r.line.width;if(wke(i))return i;if(wke(n)&&a)return n}});var Ske=W((Lqr,Mke)=>{"use strict";Mke.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 kke=W((Pqr,Eke)=>{"use strict";Eke.exports={attributes:_Y(),layoutAttributes:bY(),supplyDefaults:TY().supplyDefaults,crossTraceDefaults:TY().crossTraceDefaults,supplyLayoutDefaults:ake(),calc:fke(),crossTraceCalc:pke(),plot:yke(),style:bke().style,hoverPoints:Ake(),eventData:Ske(),selectPoints:f5(),moduleType:"trace",name:"funnel",basePlotModule:dl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Dke=W((Iqr,Cke)=>{"use strict";Cke.exports=kke()});var Lke=W((Rqr,Fke)=>{"use strict";Fke.exports={eventDataKeys:["initial","delta","final"]}});var CY=W((zqr,zke)=>{"use strict";var Yo=w1(),EY=Ns().line,KBt=Wa(),Pke=_s().axisHoverFormat,{hovertemplateAttrs:JBt,texttemplateAttrs:QBt,templatefallbackAttrs:Ike}=Ga(),Rke=Lke(),C5=tn().extendFlat,eqt=ni();function kY(e){return{marker:{color:C5({},Yo.marker.color,{arrayOk:!1,editType:"style"}),line:{color:C5({},Yo.marker.line.color,{arrayOk:!1,editType:"style"}),width:C5({},Yo.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}zke.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:Yo.x,x0:Yo.x0,dx:Yo.dx,y:Yo.y,y0:Yo.y0,dy:Yo.dy,xperiod:Yo.xperiod,yperiod:Yo.yperiod,xperiod0:Yo.xperiod0,yperiod0:Yo.yperiod0,xperiodalignment:Yo.xperiodalignment,yperiodalignment:Yo.yperiodalignment,xhoverformat:Pke("x"),yhoverformat:Pke("y"),hovertext:Yo.hovertext,hovertemplate:JBt({},{keys:Rke.eventDataKeys}),hovertemplatefallback:Ike(),hoverinfo:C5({},KBt.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:QBt({editType:"plot"},{keys:Rke.eventDataKeys.concat(["label"])}),texttemplatefallback:Ike({editType:"plot"}),text:Yo.text,textposition:Yo.textposition,insidetextanchor:Yo.insidetextanchor,textangle:Yo.textangle,textfont:Yo.textfont,insidetextfont:Yo.insidetextfont,outsidetextfont:Yo.outsidetextfont,constraintext:Yo.constraintext,cliponaxis:Yo.cliponaxis,orientation:Yo.orientation,offset:Yo.offset,width:Yo.width,increasing:kY("increasing"),decreasing:kY("decreasing"),totals:kY("intermediate sums and total"),connector:{line:{color:C5({},EY.color,{dflt:eqt.defaultLine}),width:C5({},EY.width,{editType:"plot"}),dash:EY.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Yo.offsetgroup,alignmentgroup:Yo.alignmentgroup,zorder:Yo.zorder}});var DY=W((Bqr,Bke)=>{"use strict";Bke.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 D5=W((qqr,qke)=>{"use strict";qke.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var LY=W((Oqr,Vke)=>{"use strict";var Oke=it(),tqt=__(),rqt=E0().handleText,iqt=x_(),nqt=Hp(),Nke=CY(),aqt=ni(),Uke=D5(),oqt=Uke.INCREASING.COLOR,sqt=Uke.DECREASING.COLOR,lqt="#4499FF";function FY(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",aqt.defaultLine),e(t+".marker.line.width")}function uqt(e,t,r,i){function n(u,c){return Oke.coerce(e,t,Nke,u,c)}var a=iqt(e,t,i,n);if(!a){t.visible=!1;return}nqt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");rqt(e,t,i,n,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(n("texttemplate"),n("texttemplatefallback"),t.texttemplate||n("textinfo")),FY(n,"increasing",oqt),FY(n,"decreasing",sqt),FY(n,"totals",lqt);var s=n("connector.visible");if(s){n("connector.mode");var l=n("connector.line.width");l&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function cqt(e,t){var r,i;function n(o){return Oke.coerce(i._input,i,Nke,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var fqt=it(),hqt=DY();Gke.exports=function(e,t,r){var i=!1;function n(s,l){return fqt.coerce(e,t,hqt,s,l)}for(var a=0;a{"use strict";var jke=ji(),$ke=Wp(),Wke=it().mergeArray,dqt=w0(),Yke=Kn().BADNUM;function PY(e){return e==="a"||e==="absolute"}function IY(e){return e==="t"||e==="total"}Xke.exports=function(t,r){var i=jke.getFromId(t,r.xaxis||"x"),n=jke.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=$ke(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=$ke(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,p,v=!1,m=0;m{"use strict";var Kke=b_().setGroupPositions;Jke.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var e8e=vi(),e9=it(),pqt=Ji(),F5=Kn().BADNUM,vqt=I_(),gqt=Qc().clearMinTextSize;t8e.exports=function(t,r,i,n){var a=t._fullLayout;gqt("waterfall",a),vqt.plot(t,r,i,n,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),mqt(t,r,i,n)};function mqt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e9.makeTraceGroups(i,r,"trace bars").each(function(o){var s=e8e.select(this),l=o[0].trace,u=e9.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(e9.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,v){if(!(v!==d-1&&!p.cNext)){var m=yqt(p,n,a,c),g=m[0],w=m[1],b="";g[0]!==F5&&w[0]!==F5&&g[1]!==F5&&w[1]!==F5&&(f==="spanning"&&!p.isSum&&v>0&&(c?b+="M"+g[0]+","+w[1]+"V"+w[0]:b+="M"+g[1]+","+w[0]+"H"+g[0]),f!=="between"&&(p.isSum||v{"use strict";var t9=vi(),i8e=Ji(),n8e=ni(),xqt=kg().DESELECTDIM,_qt=Ed(),bqt=Qc().resizeText,wqt=_qt.styleTextPoints;function Tqt(e,t,r){var i=r||t9.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");bqt(e,i,"waterfall"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=t9.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;t9.select(this).call(n8e.fill,l.color).call(n8e.stroke,l.line.color).call(i8e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?xqt:1)}}),wqt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;i8e.lineGroupStyle(t9.select(this).selectAll("path"),s.width,s.color,s.dash)})})}a8e.exports={style:Tqt}});var f8e=W((jqr,c8e)=>{"use strict";var Aqt=ji().hoverLabelText,s8e=ni().opacity,Mqt=c5().hoverOnBars,l8e=D5(),u8e={increasing:l8e.INCREASING.SYMBOL,decreasing:l8e.DECREASING.SYMBOL};c8e.exports=function(t,r,i,n,a){var o=Mqt(t,r,i,n,a);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 h(x){return Aqt(f,x,l[c+"hoverformat"])}var d=o.index,p=s[d],v=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-v,o.delta=v,o.final=o.initial+o.delta;var m=h(Math.abs(o.delta));o.deltaLabel=v<0?"("+m+")":m,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=p.hi||l.hoverinfo,w=[];if(g&&g!=="none"&&g!=="skip"){var b=g==="all",_=g.split("+"),M=function(x){return b||_.indexOf(x)!==-1};p.isSum||(M("final")&&(u?!M("x"):!M("y"))&&w.push(o.finalLabel),M("delta")&&(v<0?w.push(o.deltaLabel+" "+u8e.decreasing):w.push(o.deltaLabel+" "+u8e.increasing)),M("initial")&&w.push("Initial: "+o.initialLabel))}return w.length&&(o.extraText=w.join("
")),o.color=Sqt(l,p),[o]};function Sqt(e,t){var r=e[t.dir].marker,i=r.color,n=r.line.color,a=r.line.width;if(s8e(i))return i;if(s8e(n)&&a)return n}});var d8e=W(($qr,h8e)=>{"use strict";h8e.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 v8e=W((Wqr,p8e)=>{"use strict";p8e.exports={attributes:CY(),layoutAttributes:DY(),supplyDefaults:LY().supplyDefaults,crossTraceDefaults:LY().crossTraceDefaults,supplyLayoutDefaults:Hke(),calc:Zke(),crossTraceCalc:Qke(),plot:r8e(),style:o8e().style,hoverPoints:f8e(),eventData:d8e(),selectPoints:f5(),moduleType:"trace",name:"waterfall",basePlotModule:dl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var m8e=W((Yqr,g8e)=>{"use strict";g8e.exports=v8e()});var L5=W((Xqr,y8e)=>{"use strict";y8e.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 RY={};Fp(RY,{default:()=>kqt});var x8e,_8e,r9,b8e,w8e,T8e,A8e,M8e,Eqt,kqt,zY=Ea(()=>{"use strict";x8e=nd(tn()),_8e=nd(Wa()),r9=nd(Ga()),b8e=nd(Ns()),w8e=nd(L5()),T8e=["rgb","rgba","rgba256","hsl","hsla"],A8e=[],M8e=[];for(let e of T8e){let t=w8e.colormodel[e];A8e.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),M8e.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}Eqt={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:T8e,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.",A8e.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.",M8e.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,x8e.extendFlat)({},_8e.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,r9.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,r9.templatefallbackAttrs)(),zorder:b8e.zorder},kqt=Eqt});var k8e=W((Zqr,E8e)=>{"use strict";var Cqt=it(),Dqt=(zY(),Go(RY)).default,S8e=L5(),Fqt=Ng().IMAGE_URL_PREFIX;E8e.exports=function(t,r){function i(o,s){return Cqt.coerce(t,r,Dqt,o,s)}i("source"),r.source&&!r.source.match(Fqt)&&delete r.source,r._hasSource=!!r.source;var n=i("z");if(r._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}i("x0"),i("y0"),i("dx"),i("dy");var a;r._hasZ?(i("colormodel","rgb"),a=S8e.colormodel[r.colormodel],i("zmin",a.zminDflt||a.min),i("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=S8e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),i("zsmooth"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),r._length=null,i("zorder")}});var Kg=W((Kqr,BY)=>{typeof Object.create=="function"?BY.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:BY.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var qY=W((Jqr,C8e)=>{C8e.exports=Vx().EventEmitter});var L8e=W(i9=>{"use strict";i9.byteLength=Pqt;i9.toByteArray=Rqt;i9.fromByteArray=qqt;var k1=[],Id=[],Lqt=typeof Uint8Array!="undefined"?Uint8Array:Array,OY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N_=0,D8e=OY.length;N_0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function Pqt(e){var t=F8e(e),r=t[0],i=t[1];return(r+i)*3/4-i}function Iqt(e,t,r){return(t+r)*3/4-r}function Rqt(e){var t,r=F8e(e),i=r[0],n=r[1],a=new Lqt(Iqt(e,i,n)),o=0,s=n>0?i-4:i,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return n===2&&(t=Id[e.charCodeAt(l)]<<2|Id[e.charCodeAt(l+1)]>>4,a[o++]=t&255),n===1&&(t=Id[e.charCodeAt(l)]<<10|Id[e.charCodeAt(l+1)]<<4|Id[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function zqt(e){return k1[e>>18&63]+k1[e>>12&63]+k1[e>>6&63]+k1[e&63]}function Bqt(e,t,r){for(var i,n=[],a=t;as?s:o+a));return i===1?(t=e[r-1],n.push(k1[t>>2]+k1[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(k1[t>>10]+k1[t>>4&63]+k1[t<<2&63]+"=")),n.join("")}});var P8e=W(NY=>{NY.read=function(e,t,r,i,n){var a,o,s=n*8-i-1,l=(1<>1,c=-7,f=r?n-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,i),a=a-u}return(d?-1:1)*o*Math.pow(2,a-i)};NY.write=function(e,t,r,i,n,a){var o,s,l,u=a*8-n-1,c=(1<>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,p=i?1:-1,v=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+=h/l:t+=h*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,n),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;e[r+d]=s&255,d+=p,s/=256,n-=8);for(o=o<0;e[r+d]=o&255,d+=p,o/=256,u-=8);e[r+d-p]|=v*128}});var V_=W(z5=>{"use strict";var UY=L8e(),I5=P8e(),I8e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;z5.Buffer=Or;z5.SlowBuffer=Hqt;z5.INSPECT_MAX_BYTES=50;var n9=2147483647;z5.kMaxLength=n9;Or.TYPED_ARRAY_SUPPORT=Oqt();!Or.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 Oqt(){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(Or.prototype,"parent",{enumerable:!0,get:function(){if(Or.isBuffer(this))return this.buffer}});Object.defineProperty(Or.prototype,"offset",{enumerable:!0,get:function(){if(Or.isBuffer(this))return this.byteOffset}});function Jg(e){if(e>n9)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Or.prototype),t}function Or(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 jY(e)}return q8e(e,t,r)}Or.poolSize=8192;function q8e(e,t,r){if(typeof e=="string")return Uqt(e,t);if(ArrayBuffer.isView(e))return Vqt(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(C1(e,ArrayBuffer)||e&&C1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(C1(e,SharedArrayBuffer)||e&&C1(e.buffer,SharedArrayBuffer)))return GY(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return Or.from(i,t,r);let n=Gqt(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Or.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)}Or.from=function(e,t,r){return q8e(e,t,r)};Object.setPrototypeOf(Or.prototype,Uint8Array.prototype);Object.setPrototypeOf(Or,Uint8Array);function O8e(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 Nqt(e,t,r){return O8e(e),e<=0?Jg(e):t!==void 0?typeof r=="string"?Jg(e).fill(t,r):Jg(e).fill(t):Jg(e)}Or.alloc=function(e,t,r){return Nqt(e,t,r)};function jY(e){return O8e(e),Jg(e<0?0:$Y(e)|0)}Or.allocUnsafe=function(e){return jY(e)};Or.allocUnsafeSlow=function(e){return jY(e)};function Uqt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Or.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=N8e(e,t)|0,i=Jg(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}function VY(e){let t=e.length<0?0:$Y(e.length)|0,r=Jg(t);for(let i=0;i=n9)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n9.toString(16)+" bytes");return e|0}function Hqt(e){return+e!=e&&(e=0),Or.alloc(+e)}Or.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Or.prototype};Or.compare=function(t,r){if(C1(t,Uint8Array)&&(t=Or.from(t,t.offset,t.byteLength)),C1(r,Uint8Array)&&(r=Or.from(r,r.offset,r.byteLength)),!Or.isBuffer(t)||!Or.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let i=t.length,n=r.length;for(let a=0,o=Math.min(i,n);an.length?(Or.isBuffer(o)||(o=Or.from(o)),o.copy(n,a)):Uint8Array.prototype.set.call(n,o,a);else if(Or.isBuffer(o))o.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return n};function N8e(e,t){if(Or.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C1(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,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return HY(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return X8e(e).length;default:if(n)return i?-1:HY(e).length;t=(""+t).toLowerCase(),n=!0}}Or.byteLength=N8e;function jqt(e,t,r){let i=!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 tOt(this,t,r);case"utf8":case"utf-8":return V8e(this,t,r);case"ascii":return Qqt(this,t,r);case"latin1":case"binary":return eOt(this,t,r);case"base64":return Kqt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rOt(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}Or.prototype._isBuffer=!0;function U_(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}Or.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+=" ... "),""};I8e&&(Or.prototype[I8e]=Or.prototype.inspect);Or.prototype.compare=function(t,r,i,n,a){if(C1(t,Uint8Array)&&(t=Or.from(t,t.offset,t.byteLength)),!Or.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),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===t)return 0;let o=a-n,s=i-r,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(r,i);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,YY(r)&&(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)r=0;else return-1;if(typeof t=="string"&&(t=Or.from(t,i)),Or.isBuffer(t))return t.length===0?-1:R8e(e,t,r,i,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):R8e(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function R8e(e,t,r,i,n){let a=1,o=e.length,s=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(n){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fn&&(i=n)):i=n;let a=t.length;i>a/2&&(i=a/2);let o;for(o=0;o>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),t.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return $qt(this,t,r,i);case"utf8":case"utf-8":return Wqt(this,t,r,i);case"ascii":case"latin1":case"binary":return Yqt(this,t,r,i);case"base64":return Xqt(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zqt(this,t,r,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};Or.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Kqt(e,t,r){return t===0&&r===e.length?UY.fromByteArray(e):UY.fromByteArray(e.slice(t,r))}function V8e(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[n+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[n+1],u=e[n+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[n+1],u=e[n+2],c=e[n+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&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,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=s}return Jqt(i)}var z8e=4096;function Jqt(e){let t=e.length;if(t<=z8e)return String.fromCharCode.apply(String,e);let r="",i=0;for(;ii)&&(r=i);let n="";for(let a=t;ai&&(t=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),rr)throw new RangeError("Trying to access beyond buffer length")}Or.prototype.readUintLE=Or.prototype.readUIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t+--r],a=1;for(;r>0&&(a*=256);)n+=this[t+--r]*a;return n};Or.prototype.readUint8=Or.prototype.readUInt8=function(t,r){return t=t>>>0,r||Sc(t,1,this.length),this[t]};Or.prototype.readUint16LE=Or.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Sc(t,2,this.length),this[t]|this[t+1]<<8};Or.prototype.readUint16BE=Or.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Sc(t,2,this.length),this[t]<<8|this[t+1]};Or.prototype.readUint32LE=Or.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Or.prototype.readUint32BE=Or.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Or.prototype.readBigUInt64LE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i;return(BigInt(n)<>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o=a&&(n-=Math.pow(2,8*r)),n};Or.prototype.readIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=r,a=1,o=this[t+--n];for(;n>0&&(a*=256);)o+=this[t+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};Or.prototype.readInt8=function(t,r){return t=t>>>0,r||Sc(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Or.prototype.readInt16LE=function(t,r){t=t>>>0,r||Sc(t,2,this.length);let i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};Or.prototype.readInt16BE=function(t,r){t=t>>>0,r||Sc(t,2,this.length);let i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};Or.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Or.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Or.prototype.readBigInt64LE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(i<<24);return(BigInt(n)<>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(n)<>>0,r||Sc(t,4,this.length),I5.read(this,t,!0,23,4)};Or.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),I5.read(this,t,!1,23,4)};Or.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Sc(t,8,this.length),I5.read(this,t,!0,52,8)};Or.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Sc(t,8,this.length),I5.read(this,t,!1,52,8)};function Gh(e,t,r,i,n,a){if(!Or.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}Or.prototype.writeUintLE=Or.prototype.writeUIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Gh(this,t,r,i,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Gh(this,t,r,i,s,0)}let a=i-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+i};Or.prototype.writeUint8=Or.prototype.writeUInt8=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,1,255,0),this[r]=t&255,r+1};Or.prototype.writeUint16LE=Or.prototype.writeUInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Or.prototype.writeUint16BE=Or.prototype.writeUInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Or.prototype.writeUint32LE=Or.prototype.writeUInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(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};Or.prototype.writeUint32BE=Or.prototype.writeUInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(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 G8e(e,t,r,i,n){Y8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;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 H8e(e,t,r,i,n){Y8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;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}Or.prototype.writeBigUInt64LE=t2(function(t,r=0){return G8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Or.prototype.writeBigUInt64BE=t2(function(t,r=0){return H8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Or.prototype.writeIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Gh(this,t,r,i,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+i};Or.prototype.writeIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Gh(this,t,r,i,l-1,-l)}let a=i-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+i};Or.prototype.writeInt8=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Or.prototype.writeInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Or.prototype.writeInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Or.prototype.writeInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(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};Or.prototype.writeInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(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};Or.prototype.writeBigInt64LE=t2(function(t,r=0){return G8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Or.prototype.writeBigInt64BE=t2(function(t,r=0){return H8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function j8e(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $8e(e,t,r,i,n){return t=+t,r=r>>>0,n||j8e(e,t,r,4,34028234663852886e22,-34028234663852886e22),I5.write(e,t,r,i,23,4),r+4}Or.prototype.writeFloatLE=function(t,r,i){return $8e(this,t,r,!0,i)};Or.prototype.writeFloatBE=function(t,r,i){return $8e(this,t,r,!1,i)};function W8e(e,t,r,i,n){return t=+t,r=r>>>0,n||j8e(e,t,r,8,17976931348623157e292,-17976931348623157e292),I5.write(e,t,r,i,52,8),r+8}Or.prototype.writeDoubleLE=function(t,r,i){return W8e(this,t,r,!0,i)};Or.prototype.writeDoubleBE=function(t,r,i){return W8e(this,t,r,!1,i)};Or.prototype.copy=function(t,r,i,n){if(!Or.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r>>0,i=i===void 0?this.length:i>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?n=B8e(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=B8e(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);function B8e(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function iOt(e,t,r){R5(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&QM(t,e.length-(r+1))}function Y8e(e,t,r,i,n,a){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new P5.ERR_OUT_OF_RANGE("value",s,e)}iOt(i,n,a)}function R5(e,t){if(typeof e!="number")throw new P5.ERR_INVALID_ARG_TYPE(t,"number",e)}function QM(e,t,r){throw Math.floor(e)!==e?(R5(e,r),new P5.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new P5.ERR_BUFFER_OUT_OF_BOUNDS:new P5.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var nOt=/[^+/0-9A-Za-z-_]/g;function aOt(e){if(e=e.split("=")[0],e=e.trim().replace(nOt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function HY(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){(t-=3)>-1&&a.push(239,191,189);continue}else if(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,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function oOt(e){let t=[];for(let r=0;r>8,n=r%256,a.push(n),a.push(i);return a}function X8e(e){return UY.toByteArray(aOt(e))}function a9(e,t,r,i){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function YY(e){return e!==e}var lOt=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t})();function t2(e){return typeof BigInt=="undefined"?uOt:e}function uOt(){throw new Error("BigInt not supported")}});var o9=W((iOr,Z8e)=>{"use strict";Z8e.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var a 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!==n||s.enumerable!==!0)return!1}return!0}});var eS=W((nOr,K8e)=>{"use strict";var cOt=o9();K8e.exports=function(){return cOt()&&!!Symbol.toStringTag}});var s9=W((aOr,J8e)=>{"use strict";J8e.exports=Object});var eCe=W((oOr,Q8e)=>{"use strict";Q8e.exports=Error});var rCe=W((sOr,tCe)=>{"use strict";tCe.exports=EvalError});var nCe=W((lOr,iCe)=>{"use strict";iCe.exports=RangeError});var oCe=W((uOr,aCe)=>{"use strict";aCe.exports=ReferenceError});var XY=W((cOr,sCe)=>{"use strict";sCe.exports=SyntaxError});var B5=W((fOr,lCe)=>{"use strict";lCe.exports=TypeError});var cCe=W((hOr,uCe)=>{"use strict";uCe.exports=URIError});var hCe=W((dOr,fCe)=>{"use strict";fCe.exports=Math.abs});var pCe=W((pOr,dCe)=>{"use strict";dCe.exports=Math.floor});var gCe=W((vOr,vCe)=>{"use strict";vCe.exports=Math.max});var yCe=W((gOr,mCe)=>{"use strict";mCe.exports=Math.min});var _Ce=W((mOr,xCe)=>{"use strict";xCe.exports=Math.pow});var wCe=W((yOr,bCe)=>{"use strict";bCe.exports=Math.round});var ACe=W((xOr,TCe)=>{"use strict";TCe.exports=Number.isNaN||function(t){return t!==t}});var SCe=W((_Or,MCe)=>{"use strict";var fOt=ACe();MCe.exports=function(t){return fOt(t)||t===0?t:t<0?-1:1}});var kCe=W((bOr,ECe)=>{"use strict";ECe.exports=Object.getOwnPropertyDescriptor});var G_=W((wOr,CCe)=>{"use strict";var l9=kCe();if(l9)try{l9([],"length")}catch(e){l9=null}CCe.exports=l9});var tS=W((TOr,DCe)=>{"use strict";var u9=Object.defineProperty||!1;if(u9)try{u9({},"a",{value:1})}catch(e){u9=!1}DCe.exports=u9});var PCe=W((AOr,LCe)=>{"use strict";var FCe=typeof Symbol!="undefined"&&Symbol,hOt=o9();LCe.exports=function(){return typeof FCe!="function"||typeof Symbol!="function"||typeof FCe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hOt()}});var ZY=W((MOr,ICe)=>{"use strict";ICe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var KY=W((SOr,RCe)=>{"use strict";var dOt=s9();RCe.exports=dOt.getPrototypeOf||null});var qCe=W((EOr,BCe)=>{"use strict";var pOt="Function.prototype.bind called on incompatible ",vOt=Object.prototype.toString,gOt=Math.max,mOt="[object Function]",zCe=function(t,r){for(var i=[],n=0;n{"use strict";var _Ot=qCe();OCe.exports=Function.prototype.bind||_Ot});var c9=W((COr,NCe)=>{"use strict";NCe.exports=Function.prototype.call});var f9=W((DOr,UCe)=>{"use strict";UCe.exports=Function.prototype.apply});var GCe=W((FOr,VCe)=>{"use strict";VCe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var JY=W((LOr,HCe)=>{"use strict";var bOt=q5(),wOt=f9(),TOt=c9(),AOt=GCe();HCe.exports=AOt||bOt.call(TOt,wOt)});var h9=W((POr,jCe)=>{"use strict";var MOt=q5(),SOt=B5(),EOt=c9(),kOt=JY();jCe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new SOt("a function is required");return kOt(MOt,EOt,t)}});var KCe=W((IOr,ZCe)=>{"use strict";var COt=h9(),$Ce=G_(),YCe;try{YCe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var QY=!!YCe&&$Ce&&$Ce(Object.prototype,"__proto__"),XCe=Object,WCe=XCe.getPrototypeOf;ZCe.exports=QY&&typeof QY.get=="function"?COt([QY.get]):typeof WCe=="function"?function(t){return WCe(t==null?t:XCe(t))}:!1});var d9=W((ROr,tDe)=>{"use strict";var JCe=ZY(),QCe=KY(),eDe=KCe();tDe.exports=JCe?function(t){return JCe(t)}:QCe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return QCe(t)}:eDe?function(t){return eDe(t)}:null});var eX=W((zOr,rDe)=>{"use strict";var DOt=Function.prototype.call,FOt=Object.prototype.hasOwnProperty,LOt=q5();rDe.exports=LOt.call(DOt,FOt)});var g9=W((BOr,lDe)=>{"use strict";var to,POt=s9(),IOt=eCe(),ROt=rCe(),zOt=nCe(),BOt=oCe(),V5=XY(),U5=B5(),qOt=cCe(),OOt=hCe(),NOt=pCe(),UOt=gCe(),VOt=yCe(),GOt=_Ce(),HOt=wCe(),jOt=SCe(),oDe=Function,tX=function(e){try{return oDe('"use strict"; return ('+e+").constructor;")()}catch(t){}},rS=G_(),$Ot=tS(),rX=function(){throw new U5},WOt=rS?(function(){try{return arguments.callee,rX}catch(e){try{return rS(arguments,"callee").get}catch(t){return rX}}})():rX,O5=PCe()(),Ec=d9(),YOt=KY(),XOt=ZY(),sDe=f9(),iS=c9(),N5={},ZOt=typeof Uint8Array=="undefined"||!Ec?to:Ec(Uint8Array),H_={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?to:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?to:ArrayBuffer,"%ArrayIteratorPrototype%":O5&&Ec?Ec([][Symbol.iterator]()):to,"%AsyncFromSyncIteratorPrototype%":to,"%AsyncFunction%":N5,"%AsyncGenerator%":N5,"%AsyncGeneratorFunction%":N5,"%AsyncIteratorPrototype%":N5,"%Atomics%":typeof Atomics=="undefined"?to:Atomics,"%BigInt%":typeof BigInt=="undefined"?to:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?to:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?to:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?to:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":IOt,"%eval%":eval,"%EvalError%":ROt,"%Float16Array%":typeof Float16Array=="undefined"?to:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?to:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?to:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?to:FinalizationRegistry,"%Function%":oDe,"%GeneratorFunction%":N5,"%Int8Array%":typeof Int8Array=="undefined"?to:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?to:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?to:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O5&&Ec?Ec(Ec([][Symbol.iterator]())):to,"%JSON%":typeof JSON=="object"?JSON:to,"%Map%":typeof Map=="undefined"?to:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!O5||!Ec?to:Ec(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":POt,"%Object.getOwnPropertyDescriptor%":rS,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?to:Promise,"%Proxy%":typeof Proxy=="undefined"?to:Proxy,"%RangeError%":zOt,"%ReferenceError%":BOt,"%Reflect%":typeof Reflect=="undefined"?to:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?to:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!O5||!Ec?to:Ec(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?to:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O5&&Ec?Ec(""[Symbol.iterator]()):to,"%Symbol%":O5?Symbol:to,"%SyntaxError%":V5,"%ThrowTypeError%":WOt,"%TypedArray%":ZOt,"%TypeError%":U5,"%Uint8Array%":typeof Uint8Array=="undefined"?to:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?to:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?to:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?to:Uint32Array,"%URIError%":qOt,"%WeakMap%":typeof WeakMap=="undefined"?to:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?to:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?to:WeakSet,"%Function.prototype.call%":iS,"%Function.prototype.apply%":sDe,"%Object.defineProperty%":$Ot,"%Object.getPrototypeOf%":YOt,"%Math.abs%":OOt,"%Math.floor%":NOt,"%Math.max%":UOt,"%Math.min%":VOt,"%Math.pow%":GOt,"%Math.round%":HOt,"%Math.sign%":jOt,"%Reflect.getPrototypeOf%":XOt};if(Ec)try{null.error}catch(e){iDe=Ec(Ec(e)),H_["%Error.prototype%"]=iDe}var iDe,KOt=function e(t){var r;if(t==="%AsyncFunction%")r=tX("async function () {}");else if(t==="%GeneratorFunction%")r=tX("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=tX("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Ec&&(r=Ec(n.prototype))}return H_[t]=r,r},nDe={__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"]},nS=q5(),p9=eX(),JOt=nS.call(iS,Array.prototype.concat),QOt=nS.call(sDe,Array.prototype.splice),aDe=nS.call(iS,String.prototype.replace),v9=nS.call(iS,String.prototype.slice),eNt=nS.call(iS,RegExp.prototype.exec),tNt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rNt=/\\(\\)?/g,iNt=function(t){var r=v9(t,0,1),i=v9(t,-1);if(r==="%"&&i!=="%")throw new V5("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new V5("invalid intrinsic syntax, expected opening `%`");var n=[];return aDe(t,tNt,function(a,o,s,l){n[n.length]=s?aDe(l,rNt,"$1"):o||a}),n},nNt=function(t,r){var i=t,n;if(p9(nDe,i)&&(n=nDe[i],i="%"+n[0]+"%"),p9(H_,i)){var a=H_[i];if(a===N5&&(a=KOt(i)),typeof a=="undefined"&&!r)throw new U5("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new V5("intrinsic "+t+" does not exist!")};lDe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new U5("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new U5('"allowMissing" argument must be a boolean');if(eNt(/^%?[^%]*%?$/,t)===null)throw new V5("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=iNt(t),n=i.length>0?i[0]:"",a=nNt("%"+n+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(n=u[0],QOt(i,JOt([0,1],u)));for(var c=1,f=!0;c=i.length){var v=rS(s,h);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[h]}else f=p9(s,h),s=s[h];f&&!l&&(H_[o]=s)}}return s}});var j_=W((qOr,fDe)=>{"use strict";var uDe=g9(),cDe=h9(),aNt=cDe([uDe("%String.prototype.indexOf%")]);fDe.exports=function(t,r){var i=uDe(t,!!r);return typeof i=="function"&&aNt(t,".prototype.")>-1?cDe([i]):i}});var pDe=W((OOr,dDe)=>{"use strict";var oNt=eS()(),sNt=j_(),iX=sNt("Object.prototype.toString"),m9=function(t){return oNt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:iX(t)==="[object Arguments]"},hDe=function(t){return m9(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&iX(t)!=="[object Array]"&&"callee"in t&&iX(t.callee)==="[object Function]"},lNt=(function(){return m9(arguments)})();m9.isLegacyArguments=hDe;dDe.exports=lNt?m9:hDe});var _De=W((NOr,xDe)=>{"use strict";var vDe=j_(),uNt=eS()(),cNt=eX(),fNt=G_(),oX;uNt?(gDe=vDe("RegExp.prototype.exec"),nX={},y9=function(){throw nX},aX={toString:y9,valueOf:y9},typeof Symbol.toPrimitive=="symbol"&&(aX[Symbol.toPrimitive]=y9),oX=function(t){if(!t||typeof t!="object")return!1;var r=fNt(t,"lastIndex"),i=r&&cNt(r,"value");if(!i)return!1;try{gDe(t,aX)}catch(n){return n===nX}}):(mDe=vDe("Object.prototype.toString"),yDe="[object RegExp]",oX=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:mDe(t)===yDe});var gDe,nX,y9,aX,mDe,yDe;xDe.exports=oX});var wDe=W((UOr,bDe)=>{"use strict";var hNt=j_(),dNt=_De(),pNt=hNt("RegExp.prototype.exec"),vNt=B5();bDe.exports=function(t){if(!dNt(t))throw new vNt("`regex` must be a RegExp");return function(i){return pNt(t,i)!==null}}});var ADe=W((VOr,TDe)=>{"use strict";var gNt=function*(){}.constructor;TDe.exports=()=>gNt});var kDe=W((GOr,EDe)=>{"use strict";var SDe=j_(),mNt=wDe(),yNt=mNt(/^\s*(?:function)?\*/),xNt=eS()(),MDe=d9(),_Nt=SDe("Object.prototype.toString"),bNt=SDe("Function.prototype.toString"),wNt=ADe();EDe.exports=function(t){if(typeof t!="function")return!1;if(yNt(bNt(t)))return!0;if(!xNt){var r=_Nt(t);return r==="[object GeneratorFunction]"}if(!MDe)return!1;var i=wNt();return i&&MDe(t)===i.prototype}});var LDe=W((HOr,FDe)=>{"use strict";var DDe=Function.prototype.toString,G5=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lX,x9;if(typeof G5=="function"&&typeof Object.defineProperty=="function")try{lX=Object.defineProperty({},"length",{get:function(){throw x9}}),x9={},G5(function(){throw 42},null,lX)}catch(e){e!==x9&&(G5=null)}else G5=null;var TNt=/^\s*class\b/,uX=function(t){try{var r=DDe.call(t);return TNt.test(r)}catch(i){return!1}},sX=function(t){try{return uX(t)?!1:(DDe.call(t),!0)}catch(r){return!1}},_9=Object.prototype.toString,ANt="[object Object]",MNt="[object Function]",SNt="[object GeneratorFunction]",ENt="[object HTMLAllCollection]",kNt="[object HTML document.all class]",CNt="[object HTMLCollection]",DNt=typeof Symbol=="function"&&!!Symbol.toStringTag,FNt=!(0 in[,]),cX=function(){return!1};typeof document=="object"&&(CDe=document.all,_9.call(CDe)===_9.call(document.all)&&(cX=function(t){if((FNt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=_9.call(t);return(r===ENt||r===kNt||r===CNt||r===ANt)&&t("")==null}catch(i){}return!1}));var CDe;FDe.exports=G5?function(t){if(cX(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{G5(t,null,lX)}catch(r){if(r!==x9)return!1}return!uX(t)&&sX(t)}:function(t){if(cX(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(DNt)return sX(t);if(uX(t))return!1;var r=_9.call(t);return r!==MNt&&r!==SNt&&!/^\[object HTML/.test(r)?!1:sX(t)}});var RDe=W((jOr,IDe)=>{"use strict";var LNt=LDe(),PNt=Object.prototype.toString,PDe=Object.prototype.hasOwnProperty,INt=function(t,r,i){for(var n=0,a=t.length;n=3&&(n=i),BNt(t)?INt(t,r,n):typeof t=="string"?RNt(t,r,n):zNt(t,r,n)}});var BDe=W(($Or,zDe)=>{"use strict";zDe.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var ODe=W((WOr,qDe)=>{"use strict";var fX=BDe(),qNt=typeof globalThis=="undefined"?window:globalThis;qDe.exports=function(){for(var t=[],r=0;r{"use strict";var NDe=tS(),ONt=XY(),H5=B5(),UDe=G_();VDe.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new H5("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new H5("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new H5("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new H5("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new H5("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new H5("`loose`, if provided, must be a boolean");var n=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,l=!!UDe&&UDe(t,r);if(NDe)NDe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:a===null&&l?l.writable:!a});else if(s||!n&&!a&&!o)t[r]=i;else throw new ONt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var pX=W((XOr,HDe)=>{"use strict";var dX=tS(),GDe=function(){return!!dX};GDe.hasArrayLengthDefineBug=function(){if(!dX)return null;try{return dX([],"length",{value:1}).length!==1}catch(t){return!0}};HDe.exports=GDe});var XDe=W((ZOr,YDe)=>{"use strict";var NNt=g9(),jDe=hX(),UNt=pX()(),$De=G_(),WDe=B5(),VNt=NNt("%Math.floor%");YDe.exports=function(t,r){if(typeof t!="function")throw new WDe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||VNt(r)!==r)throw new WDe("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in t&&$De){var o=$De(t,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(a=!1)}return(n||a||!i)&&(UNt?jDe(t,"length",r,!0,!0):jDe(t,"length",r)),t}});var KDe=W((KOr,ZDe)=>{"use strict";var GNt=q5(),HNt=f9(),jNt=JY();ZDe.exports=function(){return jNt(GNt,HNt,arguments)}});var aS=W((JOr,b9)=>{"use strict";var $Nt=XDe(),JDe=tS(),WNt=h9(),QDe=KDe();b9.exports=function(t){var r=WNt(arguments),i=1+t.length-(arguments.length-1);return $Nt(r,i>0?i:0,!0)};JDe?JDe(b9.exports,"apply",{value:QDe}):b9.exports.apply=QDe});var yX=W((QOr,i7e)=>{"use strict";var A9=RDe(),YNt=ODe(),e7e=aS(),gX=j_(),T9=G_(),w9=d9(),XNt=gX("Object.prototype.toString"),r7e=eS()(),t7e=typeof globalThis=="undefined"?window:globalThis,vX=YNt(),mX=gX("String.prototype.slice"),ZNt=gX("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i-1}i7e.exports=function(t){if(!t||typeof t!="object")return!1;if(!r7e){var r=mX(XNt(t),8,-1);return QNt(r)?r:r!=="Object"?!1:JNt(t)}return T9?KNt(t):null}});var a7e=W((eNr,n7e)=>{"use strict";var eUt=yX();n7e.exports=function(t){return!!eUt(t)}});var bX=W(ro=>{"use strict";var tUt=pDe(),rUt=kDe(),nv=yX(),o7e=a7e();function j5(e){return e.call.bind(e)}var s7e=typeof BigInt!="undefined",l7e=typeof Symbol!="undefined",Rd=j5(Object.prototype.toString),iUt=j5(Number.prototype.valueOf),nUt=j5(String.prototype.valueOf),aUt=j5(Boolean.prototype.valueOf);s7e&&(u7e=j5(BigInt.prototype.valueOf));var u7e;l7e&&(c7e=j5(Symbol.prototype.valueOf));var c7e;function sS(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}ro.isArgumentsObject=tUt;ro.isGeneratorFunction=rUt;ro.isTypedArray=o7e;function oUt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ro.isPromise=oUt;function sUt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):o7e(e)||h7e(e)}ro.isArrayBufferView=sUt;function lUt(e){return nv(e)==="Uint8Array"}ro.isUint8Array=lUt;function uUt(e){return nv(e)==="Uint8ClampedArray"}ro.isUint8ClampedArray=uUt;function cUt(e){return nv(e)==="Uint16Array"}ro.isUint16Array=cUt;function fUt(e){return nv(e)==="Uint32Array"}ro.isUint32Array=fUt;function hUt(e){return nv(e)==="Int8Array"}ro.isInt8Array=hUt;function dUt(e){return nv(e)==="Int16Array"}ro.isInt16Array=dUt;function pUt(e){return nv(e)==="Int32Array"}ro.isInt32Array=pUt;function vUt(e){return nv(e)==="Float32Array"}ro.isFloat32Array=vUt;function gUt(e){return nv(e)==="Float64Array"}ro.isFloat64Array=gUt;function mUt(e){return nv(e)==="BigInt64Array"}ro.isBigInt64Array=mUt;function yUt(e){return nv(e)==="BigUint64Array"}ro.isBigUint64Array=yUt;function S9(e){return Rd(e)==="[object Map]"}S9.working=typeof Map!="undefined"&&S9(new Map);function xUt(e){return typeof Map=="undefined"?!1:S9.working?S9(e):e instanceof Map}ro.isMap=xUt;function E9(e){return Rd(e)==="[object Set]"}E9.working=typeof Set!="undefined"&&E9(new Set);function _Ut(e){return typeof Set=="undefined"?!1:E9.working?E9(e):e instanceof Set}ro.isSet=_Ut;function k9(e){return Rd(e)==="[object WeakMap]"}k9.working=typeof WeakMap!="undefined"&&k9(new WeakMap);function bUt(e){return typeof WeakMap=="undefined"?!1:k9.working?k9(e):e instanceof WeakMap}ro.isWeakMap=bUt;function _X(e){return Rd(e)==="[object WeakSet]"}_X.working=typeof WeakSet!="undefined"&&_X(new WeakSet);function wUt(e){return _X(e)}ro.isWeakSet=wUt;function C9(e){return Rd(e)==="[object ArrayBuffer]"}C9.working=typeof ArrayBuffer!="undefined"&&C9(new ArrayBuffer);function f7e(e){return typeof ArrayBuffer=="undefined"?!1:C9.working?C9(e):e instanceof ArrayBuffer}ro.isArrayBuffer=f7e;function D9(e){return Rd(e)==="[object DataView]"}D9.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&D9(new DataView(new ArrayBuffer(1),0,1));function h7e(e){return typeof DataView=="undefined"?!1:D9.working?D9(e):e instanceof DataView}ro.isDataView=h7e;var xX=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function oS(e){return Rd(e)==="[object SharedArrayBuffer]"}function d7e(e){return typeof xX=="undefined"?!1:(typeof oS.working=="undefined"&&(oS.working=oS(new xX)),oS.working?oS(e):e instanceof xX)}ro.isSharedArrayBuffer=d7e;function TUt(e){return Rd(e)==="[object AsyncFunction]"}ro.isAsyncFunction=TUt;function AUt(e){return Rd(e)==="[object Map Iterator]"}ro.isMapIterator=AUt;function MUt(e){return Rd(e)==="[object Set Iterator]"}ro.isSetIterator=MUt;function SUt(e){return Rd(e)==="[object Generator]"}ro.isGeneratorObject=SUt;function EUt(e){return Rd(e)==="[object WebAssembly.Module]"}ro.isWebAssemblyCompiledModule=EUt;function p7e(e){return sS(e,iUt)}ro.isNumberObject=p7e;function v7e(e){return sS(e,nUt)}ro.isStringObject=v7e;function g7e(e){return sS(e,aUt)}ro.isBooleanObject=g7e;function m7e(e){return s7e&&sS(e,u7e)}ro.isBigIntObject=m7e;function y7e(e){return l7e&&sS(e,c7e)}ro.isSymbolObject=y7e;function kUt(e){return p7e(e)||v7e(e)||g7e(e)||m7e(e)||y7e(e)}ro.isBoxedPrimitive=kUt;function CUt(e){return typeof Uint8Array!="undefined"&&(f7e(e)||d7e(e))}ro.isAnyArrayBuffer=CUt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ro,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var wX=W((rNr,x7e)=>{x7e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var kX=W(io=>{var _7e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),SX(t)?r.showHidden=t:t&&io._extend(r,t),W_(r.showHidden)&&(r.showHidden=!1),W_(r.depth)&&(r.depth=2),W_(r.colors)&&(r.colors=!1),W_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=FUt),I9(r,e,r.depth)}io.inspect=r2;r2.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]};r2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function FUt(e,t){var r=r2.styles[t];return r?"\x1B["+r2.colors[r][0]+"m"+e+"\x1B["+r2.colors[r][1]+"m":e}function LUt(e,t){return e}function PUt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function I9(e,t,r){if(e.customInspect&&t&&P9(t.inspect)&&t.inspect!==io.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return B9(i)||(i=I9(e,i,r)),i}var n=IUt(e,t);if(n)return n;var a=Object.keys(t),o=PUt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),uS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return TX(t);if(a.length===0){if(P9(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(lS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(R9(t))return e.stylize(Date.prototype.toString.call(t),"date");if(uS(t))return TX(t)}var l="",u=!1,c=["{","}"];if(w7e(t)&&(u=!0,c=["[","]"]),P9(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(lS(t)&&(l=" "+RegExp.prototype.toString.call(t)),R9(t)&&(l=" "+Date.prototype.toUTCString.call(t)),uS(t)&&(l=" "+TX(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return lS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=RUt(e,t,r,o,a):h=a.map(function(d){return MX(e,t,r,o,d,u)}),e.seen.pop(),zUt(h,l,c)}function IUt(e,t){if(W_(t))return e.stylize("undefined","undefined");if(B9(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(T7e(t))return e.stylize(""+t,"number");if(SX(t))return e.stylize(""+t,"boolean");if(z9(t))return e.stylize("null","null")}function TX(e){return"["+Error.prototype.toString.call(e)+"]"}function RUt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o-1&&(a?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")),W_(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),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 zUt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(` `)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}io.types=bX();function w7e(e){return Array.isArray(e)}io.isArray=w7e;function SX(e){return typeof e=="boolean"}io.isBoolean=SX;function z9(e){return e===null}io.isNull=z9;function BUt(e){return e==null}io.isNullOrUndefined=BUt;function T7e(e){return typeof e=="number"}io.isNumber=T7e;function B9(e){return typeof e=="string"}io.isString=B9;function qUt(e){return typeof e=="symbol"}io.isSymbol=qUt;function W_(e){return e===void 0}io.isUndefined=W_;function lS(e){return $5(e)&&EX(e)==="[object RegExp]"}io.isRegExp=lS;io.types.isRegExp=lS;function $5(e){return typeof e=="object"&&e!==null}io.isObject=$5;function R9(e){return $5(e)&&EX(e)==="[object Date]"}io.isDate=R9;io.types.isDate=R9;function uS(e){return $5(e)&&(EX(e)==="[object Error]"||e instanceof Error)}io.isError=uS;io.types.isNativeError=uS;function P9(e){return typeof e=="function"}io.isFunction=P9;function OUt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}io.isPrimitive=OUt;io.isBuffer=wX();function EX(e){return Object.prototype.toString.call(e)}function AX(e){return e<10?"0"+e.toString(10):e.toString(10)}var NUt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function UUt(){var e=new Date,t=[AX(e.getHours()),AX(e.getMinutes()),AX(e.getSeconds())].join(":");return[e.getDate(),NUt[e.getMonth()],t].join(" ")}io.log=function(){console.log("%s - %s",UUt(),io.format.apply(io,arguments))};io.inherits=Kg();io._extend=function(e,t){if(!t||!$5(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function A7e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var $_=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;io.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if($_&&t[$_]){var r=t[$_];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,$_,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s{"use strict";function M7e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function S7e(e){for(var t=1;t0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return q9.alloc(0);for(var i=q9.allocUnsafe(r>>>0),n=this.head,a=0;n;)KUt(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=q9.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,s),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:ZUt,value:function(r,i){return CX(this,S7e(S7e({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var FX=W((aNr,L7e)=>{"use strict";function JUt(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(DX,this,e)):process.nextTick(DX,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(O9,r):(r._writableState.errorEmitted=!0,process.nextTick(F7e,r,a)):process.nextTick(F7e,r,a):t?(process.nextTick(O9,r),t(a)):process.nextTick(O9,r)}),this)}function F7e(e,t){DX(e,t),O9(e)}function O9(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function QUt(){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 DX(e,t){e.emit("error",t)}function eVt(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}L7e.exports={destroy:JUt,undestroy:QUt,errorOrDestroy:eVt}});var Y_=W((oNr,R7e)=>{"use strict";function tVt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var I7e={};function zd(e,t,r){r||(r=Error);function i(a,o,s){return typeof t=="string"?t:t(a,o,s)}var n=(function(a){tVt(o,a);function o(s,l,u){return a.call(this,i(s,l,u))||this}return o})(r);n.prototype.name=r.name,n.prototype.code=e,I7e[e]=n}function P7e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),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 rVt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function iVt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function nVt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}zd("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);zd("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&rVt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(iVt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(P7e(t,"type"));else{var a=nVt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(P7e(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);zd("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");zd("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});zd("ERR_STREAM_PREMATURE_CLOSE","Premature close");zd("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});zd("ERR_MULTIPLE_CALLBACK","Callback called multiple times");zd("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");zd("ERR_STREAM_WRITE_AFTER_END","write after end");zd("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);zd("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);zd("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");R7e.exports.codes=I7e});var LX=W((sNr,z7e)=>{"use strict";var aVt=Y_().codes.ERR_INVALID_OPT_VALUE;function oVt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function sVt(e,t,r,i){var n=oVt(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new aVt(a,n)}return Math.floor(n)}return e.objectMode?16:16*1024}z7e.exports={getHighWaterMark:sVt}});var q7e=W((lNr,B7e)=>{B7e.exports=lVt;function lVt(e,t){if(PX("noDeprecation"))return e;var r=!1;function i(){if(!r){if(PX("throwDeprecation"))throw new Error(t);PX("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function PX(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 zX=W((uNr,H7e)=>{"use strict";H7e.exports=Yl;function N7e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){RVt(t,e)}}var W5;Yl.WritableState=fS;var uVt={deprecate:q7e()},U7e=qY(),U9=V_().Buffer,cVt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fVt(e){return U9.from(e)}function hVt(e){return U9.isBuffer(e)||e instanceof cVt}var RX=FX(),dVt=LX(),pVt=dVt.getHighWaterMark,i2=Y_().codes,vVt=i2.ERR_INVALID_ARG_TYPE,gVt=i2.ERR_METHOD_NOT_IMPLEMENTED,mVt=i2.ERR_MULTIPLE_CALLBACK,yVt=i2.ERR_STREAM_CANNOT_PIPE,xVt=i2.ERR_STREAM_DESTROYED,_Vt=i2.ERR_STREAM_NULL_VALUES,bVt=i2.ERR_STREAM_WRITE_AFTER_END,wVt=i2.ERR_UNKNOWN_ENCODING,Y5=RX.errorOrDestroy;Kg()(Yl,U7e);function TVt(){}function fS(e,t,r){W5=W5||X_(),e=e||{},typeof r!="boolean"&&(r=t instanceof W5),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=pVt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){DVt(t,n)},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 N7e(this)}fS.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(fS.prototype,"buffer",{get:uVt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var N9;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N9=Function.prototype[Symbol.hasInstance],Object.defineProperty(Yl,Symbol.hasInstance,{value:function(t){return N9.call(this,t)?!0:this!==Yl?!1:t&&t._writableState instanceof fS}})):N9=function(t){return t instanceof this};function Yl(e){W5=W5||X_();var t=this instanceof W5;if(!t&&!N9.call(Yl,this))return new Yl(e);this._writableState=new fS(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)),U7e.call(this)}Yl.prototype.pipe=function(){Y5(this,new yVt)};function AVt(e,t){var r=new bVt;Y5(e,r),process.nextTick(t,r)}function MVt(e,t,r,i){var n;return r===null?n=new _Vt:typeof r!="string"&&!t.objectMode&&(n=new vVt("chunk",["string","Buffer"],r)),n?(Y5(e,n),process.nextTick(i,n),!1):!0}Yl.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&hVt(e);return a&&!U9.isBuffer(e)&&(e=fVt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=TVt),i.ending?AVt(this,r):(a||MVt(this,i,e,r))&&(i.pendingcb++,n=EVt(this,i,a,e,t,r)),n};Yl.prototype.cork=function(){this._writableState.corked++};Yl.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&V7e(this,e))};Yl.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 wVt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Yl.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function SVt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=U9.from(t,r)),t}Object.defineProperty(Yl.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function EVt(e,t,r,i,n,a){if(!r){var o=SVt(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var l=t.length{"use strict";var zVt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};$7e.exports=D1;var j7e=OX(),qX=zX();Kg()(D1,j7e);for(BX=zVt(qX.prototype),V9=0;V9{var H9=V_(),F1=H9.Buffer;function W7e(e,t){for(var r in e)t[r]=e[r]}F1.from&&F1.alloc&&F1.allocUnsafe&&F1.allocUnsafeSlow?Y7e.exports=H9:(W7e(H9,NX),NX.Buffer=Z_);function Z_(e,t,r){return F1(e,t,r)}Z_.prototype=Object.create(F1.prototype);W7e(F1,Z_);Z_.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return F1(e,t,r)};Z_.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=F1(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Z_.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return F1(e)};Z_.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return H9.SlowBuffer(e)}});var GX=W(K7e=>{"use strict";var VX=X7e().Buffer,Z7e=VX.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 OVt(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 NVt(e){var t=OVt(e);if(typeof t!="string"&&(VX.isEncoding===Z7e||!Z7e(e)))throw new Error("Unknown encoding: "+e);return t||e}K7e.StringDecoder=hS;function hS(e){this.encoding=NVt(e);var t;switch(this.encoding){case"utf16le":this.text=$Vt,this.end=WVt,t=4;break;case"utf8":this.fillLast=GVt,t=4;break;case"base64":this.text=YVt,this.end=XVt,t=3;break;default:this.write=ZVt,this.end=KVt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=VX.allocUnsafe(t)}hS.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 UVt(e,t,r){var i=t.length-1;if(i=0?(n>0&&(e.lastNeed=n-1),n):--i=0?(n>0&&(e.lastNeed=n-2),n):--i=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function VVt(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 GVt(e){var t=this.lastTotal-this.lastNeed,r=VVt(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 HVt(e,t){var r=UVt(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)}function jVt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function $Vt(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 WVt(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 YVt(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 XVt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function ZVt(e){return e.toString(this.encoding)}function KVt(e){return e&&e.length?this.write(e):""}});var j9=W((hNr,eFe)=>{"use strict";var J7e=Y_().codes.ERR_STREAM_PREMATURE_CLOSE;function JVt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n{"use strict";var $9;function n2(e,t,r){return t=tGt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tGt(e){var t=rGt(e,"string");return typeof t=="symbol"?t:String(t)}function rGt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iGt=j9(),a2=Symbol("lastResolve"),K_=Symbol("lastReject"),dS=Symbol("error"),W9=Symbol("ended"),J_=Symbol("lastPromise"),HX=Symbol("handlePromise"),Q_=Symbol("stream");function o2(e,t){return{value:e,done:t}}function nGt(e){var t=e[a2];if(t!==null){var r=e[Q_].read();r!==null&&(e[J_]=null,e[a2]=null,e[K_]=null,t(o2(r,!1)))}}function aGt(e){process.nextTick(nGt,e)}function oGt(e,t){return function(r,i){e.then(function(){if(t[W9]){r(o2(void 0,!0));return}t[HX](r,i)},i)}}var sGt=Object.getPrototypeOf(function(){}),lGt=Object.setPrototypeOf(($9={get stream(){return this[Q_]},next:function(){var t=this,r=this[dS];if(r!==null)return Promise.reject(r);if(this[W9])return Promise.resolve(o2(void 0,!0));if(this[Q_].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[dS]?s(t[dS]):o(o2(void 0,!0))})});var i=this[J_],n;if(i)n=new Promise(oGt(i,this));else{var a=this[Q_].read();if(a!==null)return Promise.resolve(o2(a,!1));n=new Promise(this[HX])}return this[J_]=n,n}},n2($9,Symbol.asyncIterator,function(){return this}),n2($9,"return",function(){var t=this;return new Promise(function(r,i){t[Q_].destroy(null,function(n){if(n){i(n);return}r(o2(void 0,!0))})})}),$9),sGt),uGt=function(t){var r,i=Object.create(lGt,(r={},n2(r,Q_,{value:t,writable:!0}),n2(r,a2,{value:null,writable:!0}),n2(r,K_,{value:null,writable:!0}),n2(r,dS,{value:null,writable:!0}),n2(r,W9,{value:t._readableState.endEmitted,writable:!0}),n2(r,HX,{value:function(a,o){var s=i[Q_].read();s?(i[J_]=null,i[a2]=null,i[K_]=null,a(o2(s,!1))):(i[a2]=a,i[K_]=o)},writable:!0}),r));return i[J_]=null,iGt(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[K_];a!==null&&(i[J_]=null,i[a2]=null,i[K_]=null,a(n)),i[dS]=n;return}var o=i[a2];o!==null&&(i[J_]=null,i[a2]=null,i[K_]=null,o(o2(void 0,!0))),i[W9]=!0}),t.on("readable",aGt.bind(null,i)),i};tFe.exports=uGt});var nFe=W((pNr,iFe)=>{iFe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var OX=W((gNr,pFe)=>{"use strict";pFe.exports=ko;var X5;ko.ReadableState=lFe;var vNr=Vx().EventEmitter,sFe=function(t,r){return t.listeners(r).length},vS=qY(),Y9=V_().Buffer,cGt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fGt(e){return Y9.from(e)}function hGt(e){return Y9.isBuffer(e)||e instanceof cGt}var jX=kX(),Ka;jX&&jX.debuglog?Ka=jX.debuglog("stream"):Ka=function(){};var dGt=D7e(),JX=FX(),pGt=LX(),vGt=pGt.getHighWaterMark,X9=Y_().codes,gGt=X9.ERR_INVALID_ARG_TYPE,mGt=X9.ERR_STREAM_PUSH_AFTER_EOF,yGt=X9.ERR_METHOD_NOT_IMPLEMENTED,xGt=X9.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Z5,$X,WX;Kg()(ko,vS);var pS=JX.errorOrDestroy,YX=["error","close","destroy","pause","resume"];function _Gt(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 lFe(e,t,r){X5=X5||X_(),e=e||{},typeof r!="boolean"&&(r=t instanceof X5),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=vGt(this,e,"readableHighWaterMark",r),this.buffer=new dGt,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&&(Z5||(Z5=GX().StringDecoder),this.decoder=new Z5(e.encoding),this.encoding=e.encoding)}function ko(e){if(X5=X5||X_(),!(this instanceof ko))return new ko(e);var t=this instanceof X5;this._readableState=new lFe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),vS.call(this)}Object.defineProperty(ko.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ko.prototype.destroy=JX.destroy;ko.prototype._undestroy=JX.undestroy;ko.prototype._destroy=function(e,t){t(e)};ko.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Y9.from(e,t),t=""),i=!0),uFe(this,e,t,!1,i)};ko.prototype.unshift=function(e){return uFe(this,e,null,!0,!1)};function uFe(e,t,r,i,n){Ka("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,TGt(e,a);else{var o;if(n||(o=bGt(a,t)),o)pS(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Y9.prototype&&(t=fGt(t)),i)a.endEmitted?pS(e,new xGt):XX(e,a,t,!0);else if(a.ended)pS(e,new mGt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?XX(e,a,t,!1):KX(e,a)):XX(e,a,t,!1)}else i||(a.reading=!1,KX(e,a))}return!a.ended&&(a.length=aFe?e=aFe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function oFe(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=wGt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}ko.prototype.read=function(e){Ka("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 Ka("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ZX(this):Z9(this),null;if(e=oFe(e,t),e===0&&t.ended)return t.length===0&&ZX(this),null;var i=t.needReadable;Ka("need readable",i),(t.length===0||t.length-e0?n=hFe(e,t):n=null,n===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&&ZX(this)),n!==null&&this.emit("data",n),n};function TGt(e,t){if(Ka("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?Z9(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,cFe(e)))}}function Z9(e){var t=e._readableState;Ka("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Ka("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(cFe,e))}function cFe(e){var t=e._readableState;Ka("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,QX(e)}function KX(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(AGt,e,t))}function AGt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&dFe(i.pipes,e)!==-1)&&!u&&(Ka("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(m){Ka("onerror",m),v(),e.removeListener("error",h),sFe(e,"error")===0&&pS(e,m)}_Gt(e,"error",h);function d(){e.removeListener("finish",p),v()}e.once("close",d);function p(){Ka("onfinish"),e.removeListener("close",d),v()}e.once("finish",p);function v(){Ka("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Ka("pipe resume"),r.resume()),e};function MGt(e){return function(){var r=e._readableState;Ka("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sFe(e,"data")&&(r.flowing=!0,QX(e))}}ko.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 i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ka("on readable",i.length,i.reading),i.length?Z9(this):i.reading||process.nextTick(SGt,this)),r};ko.prototype.addListener=ko.prototype.on;ko.prototype.removeListener=function(e,t){var r=vS.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(fFe,this),r};ko.prototype.removeAllListeners=function(e){var t=vS.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(fFe,this),t};function fFe(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 SGt(e){Ka("readable nexttick read 0"),e.read(0)}ko.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ka("resume"),e.flowing=!e.readableListening,EGt(this,e)),e.paused=!1,this};function EGt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(kGt,e,t))}function kGt(e,t){Ka("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),QX(e),t.flowing&&!t.reading&&e.read(0)}ko.prototype.pause=function(){return Ka("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ka("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function QX(e){var t=e._readableState;for(Ka("flow",t.flowing);t.flowing&&e.read()!==null;);}ko.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Ka("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(Ka("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var a=0;a=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 ZX(e){var t=e._readableState;Ka("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(CGt,t,e))}function CGt(e,t){if(Ka("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"&&(ko.from=function(e,t){return WX===void 0&&(WX=nFe()),WX(ko,e,t)});function dFe(e,t){for(var r=0,i=e.length;r{"use strict";gFe.exports=Qg;var K9=Y_().codes,DGt=K9.ERR_METHOD_NOT_IMPLEMENTED,FGt=K9.ERR_MULTIPLE_CALLBACK,LGt=K9.ERR_TRANSFORM_ALREADY_TRANSFORMING,PGt=K9.ERR_TRANSFORM_WITH_LENGTH_0,J9=X_();Kg()(Qg,J9);function IGt(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new FGt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";yFe.exports=gS;var mFe=eZ();Kg()(gS,mFe);function gS(e){if(!(this instanceof gS))return new gS(e);mFe.call(this,e)}gS.prototype._transform=function(e,t,r){r(null,e)}});var AFe=W((xNr,TFe)=>{"use strict";var tZ;function zGt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var wFe=Y_().codes,BGt=wFe.ERR_MISSING_ARGS,qGt=wFe.ERR_STREAM_DESTROYED;function _Fe(e){if(e)throw e}function OGt(e){return e.setHeader&&typeof e.abort=="function"}function NGt(e,t,r,i){i=zGt(i);var n=!1;e.on("close",function(){n=!0}),tZ===void 0&&(tZ=j9()),tZ(e,{readable:t,writable:r},function(o){if(o)return i(o);n=!0,i()});var a=!1;return function(o){if(!n&&!a){if(a=!0,OGt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(o||new qGt("pipe"))}}}function bFe(e){e()}function UGt(e,t){return e.pipe(t)}function VGt(e){return!e.length||typeof e[e.length-1]!="function"?_Fe:e.pop()}function GGt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return NGt(o,l,u,function(c){n||(n=c),c&&a.forEach(bFe),!l&&(a.forEach(bFe),i(n))})});return t.reduce(UGt)}TFe.exports=GGt});var SFe=W((_Nr,MFe)=>{MFe.exports=Bd;var rZ=Vx().EventEmitter,HGt=Kg();HGt(Bd,rZ);Bd.Readable=OX();Bd.Writable=zX();Bd.Duplex=X_();Bd.Transform=eZ();Bd.PassThrough=xFe();Bd.finished=j9();Bd.pipeline=AFe();Bd.Stream=Bd;function Bd(){rZ.call(this)}Bd.prototype.pipe=function(e,t){var r=this;function i(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),rZ.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",i),e.removeListener("drain",n),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 J5=W(no=>{var EFe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),oZ(t)?r.showHidden=t:t&&no._extend(r,t),tb(r.showHidden)&&(r.showHidden=!1),tb(r.depth)&&(r.depth=2),tb(r.colors)&&(r.colors=!1),tb(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=$Gt),rP(r,e,r.depth)}no.inspect=s2;s2.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]};s2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function $Gt(e,t){var r=s2.styles[t];return r?"\x1B["+s2.colors[r][0]+"m"+e+"\x1B["+s2.colors[r][1]+"m":e}function WGt(e,t){return e}function YGt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function rP(e,t,r){if(e.customInspect&&t&&tP(t.inspect)&&t.inspect!==no.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return aP(i)||(i=rP(e,i,r)),i}var n=XGt(e,t);if(n)return n;var a=Object.keys(t),o=YGt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),yS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return iZ(t);if(a.length===0){if(tP(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(mS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(iP(t))return e.stylize(Date.prototype.toString.call(t),"date");if(yS(t))return iZ(t)}var l="",u=!1,c=["{","}"];if(CFe(t)&&(u=!0,c=["[","]"]),tP(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(mS(t)&&(l=" "+RegExp.prototype.toString.call(t)),iP(t)&&(l=" "+Date.prototype.toUTCString.call(t)),yS(t)&&(l=" "+iZ(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return mS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=ZGt(e,t,r,o,a):h=a.map(function(d){return aZ(e,t,r,o,d,u)}),e.seen.pop(),KGt(h,l,c)}function XGt(e,t){if(tb(t))return e.stylize("undefined","undefined");if(aP(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(DFe(t))return e.stylize(""+t,"number");if(oZ(t))return e.stylize(""+t,"boolean");if(nP(t))return e.stylize("null","null")}function iZ(e){return"["+Error.prototype.toString.call(e)+"]"}function ZGt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o-1&&(a?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")),tb(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),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 KGt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(` `)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}no.types=bX();function CFe(e){return Array.isArray(e)}no.isArray=CFe;function oZ(e){return typeof e=="boolean"}no.isBoolean=oZ;function nP(e){return e===null}no.isNull=nP;function JGt(e){return e==null}no.isNullOrUndefined=JGt;function DFe(e){return typeof e=="number"}no.isNumber=DFe;function aP(e){return typeof e=="string"}no.isString=aP;function QGt(e){return typeof e=="symbol"}no.isSymbol=QGt;function tb(e){return e===void 0}no.isUndefined=tb;function mS(e){return K5(e)&&sZ(e)==="[object RegExp]"}no.isRegExp=mS;no.types.isRegExp=mS;function K5(e){return typeof e=="object"&&e!==null}no.isObject=K5;function iP(e){return K5(e)&&sZ(e)==="[object Date]"}no.isDate=iP;no.types.isDate=iP;function yS(e){return K5(e)&&(sZ(e)==="[object Error]"||e instanceof Error)}no.isError=yS;no.types.isNativeError=yS;function tP(e){return typeof e=="function"}no.isFunction=tP;function eHt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}no.isPrimitive=eHt;no.isBuffer=wX();function sZ(e){return Object.prototype.toString.call(e)}function nZ(e){return e<10?"0"+e.toString(10):e.toString(10)}var tHt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rHt(){var e=new Date,t=[nZ(e.getHours()),nZ(e.getMinutes()),nZ(e.getSeconds())].join(":");return[e.getDate(),tHt[e.getMonth()],t].join(" ")}no.log=function(){console.log("%s - %s",rHt(),no.format.apply(no,arguments))};no.inherits=Kg();no._extend=function(e,t){if(!t||!K5(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function FFe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var eb=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;no.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(eb&&t[eb]){var r=t[eb];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,eb,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s{"use strict";function l2(e){"@babel/helpers - typeof";return l2=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},l2(e)}function LFe(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 pHt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function vHt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function gHt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}xS("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);xS("ERR_INVALID_ARG_TYPE",function(e,t,r){Q5===void 0&&(Q5=sP()),Q5(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&pHt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(vHt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(PFe(t,"type"));else{var a=gHt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(PFe(t,"type"))}return n+=". Received type ".concat(l2(r)),n},TypeError);xS("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";lZ===void 0&&(lZ=J5());var i=lZ.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);xS("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(l2(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);xS("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 i="The ",n=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);RFe.exports.codes=IFe});var jFe=W((TNr,HFe)=>{"use strict";function zFe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function BFe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function EHt(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 av="",_S="",bS="",tf="",rb={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:"},kHt=10;function NFe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function wS(e){return dZ(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function CHt(e,t,r){var i="",n="",a=0,o="",s=!1,l=wS(e),u=l.split(` `),c=wS(t).split(` `),f=0,h="";if(r==="strictEqual"&&Hh(e)==="object"&&Hh(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=kHt){if((Hh(e)!=="object"||e===null)&&(Hh(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(rb[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` `.concat(EHt(" ",f),"^"),f=0)}}}for(var v=u[u.length-1],m=c[c.length-1];v===m&&(f++<2?o=` `.concat(v).concat(o):i=v,u.pop(),c.pop(),!(u.length===0||c.length===0));)v=u[u.length-1],m=c[c.length-1];var g=Math.max(u.length,c.length);if(g===0){var w=l.split(` `);if(w.length>30)for(w[26]="".concat(av,"...").concat(tf);w.length>27;)w.pop();return"".concat(rb.notIdentical,` `).concat(w.join(` `),` `)}f>3&&(o=` `.concat(av,"...").concat(tf).concat(o),s=!0),i!==""&&(o=` `.concat(i).concat(o),i="");var b=0,_=rb[r]+` `.concat(_S,"+ actual").concat(tf," ").concat(bS,"- expected").concat(tf),M=" ".concat(av,"...").concat(tf," Lines skipped");for(f=0;f1&&f>2&&(x>4?(n+=` `.concat(av,"...").concat(tf),s=!0):x>3&&(n+=` `.concat(c[f-2]),b++),n+=` `.concat(c[f-1]),b++),a=f,i+=` `.concat(bS,"-").concat(tf," ").concat(c[f]),b++;else if(c.length1&&f>2&&(x>4?(n+=` `.concat(av,"...").concat(tf),s=!0):x>3&&(n+=` `.concat(u[f-2]),b++),n+=` `.concat(u[f-1]),b++),a=f,n+=` `.concat(_S,"+").concat(tf," ").concat(u[f]),b++;else{var T=c[f],A=u[f],y=A!==T&&(!OFe(A,",")||A.slice(0,-1)!==T);y&&OFe(T,",")&&T.slice(0,-1)===A&&(y=!1,A+=","),y?(x>1&&f>2&&(x>4?(n+=` `.concat(av,"...").concat(tf),s=!0):x>3&&(n+=` `.concat(u[f-2]),b++),n+=` `.concat(u[f-1]),b++),a=f,n+=` `.concat(_S,"+").concat(tf," ").concat(A),i+=` `.concat(bS,"-").concat(tf," ").concat(T),b+=2):(n+=i,i="",(x===1||f===0)&&(n+=` `.concat(A),b++))}if(b>20&&f30)for(d[26]="".concat(av,"...").concat(tf);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,` `).concat(d.join(` `),` `))}else{var p=wS(u),v="",m=rb[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(rb[s],` `).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(v="".concat(wS(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),v.length>512&&(v="".concat(v.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(m,` `).concat(p,` should equal `):v=" ".concat(s," ").concat(v)),a=r.call(this,"".concat(p).concat(v))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(fZ(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(fZ(a),l),a.stack,a.name="AssertionError",VFe(a)}return xHt(i,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return dZ(this,BFe(BFe({},o),{},{customInspect:!1,depth:0}))}}]),i})(hZ(Error),dZ.custom);HFe.exports=DHt});var pZ=W((ANr,WFe)=>{"use strict";var $Fe=Object.prototype.toString;WFe.exports=function(t){var r=$Fe.call(t),i=r==="[object Arguments]";return i||(i=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&$Fe.call(t.callee)==="[object Function]"),i}});var rLe=W((MNr,tLe)=>{"use strict";var eLe;Object.keys||(MS=Object.prototype.hasOwnProperty,vZ=Object.prototype.toString,YFe=pZ(),gZ=Object.prototype.propertyIsEnumerable,XFe=!gZ.call({toString:null},"toString"),ZFe=gZ.call(function(){},"prototype"),SS=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],uP=function(e){var t=e.constructor;return t&&t.prototype===e},KFe={$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},JFe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!KFe["$"+e]&&MS.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{uP(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),QFe=function(e){if(typeof window=="undefined"||!JFe)return uP(e);try{return uP(e)}catch(t){return!1}},eLe=function(t){var r=t!==null&&typeof t=="object",i=vZ.call(t)==="[object Function]",n=YFe(t),a=r&&vZ.call(t)==="[object String]",o=[];if(!r&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var s=ZFe&&i;if(a&&t.length>0&&!MS.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var FHt=Array.prototype.slice,LHt=pZ(),iLe=Object.keys,cP=iLe?function(t){return iLe(t)}:rLe(),nLe=Object.keys;cP.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(i){return LHt(i)?nLe(FHt.call(i)):nLe(i)})}else Object.keys=cP;return Object.keys||cP};aLe.exports=cP});var cLe=W((ENr,uLe)=>{"use strict";var PHt=mZ(),sLe=o9()(),lLe=j_(),fP=s9(),IHt=lLe("Array.prototype.push"),oLe=lLe("Object.prototype.propertyIsEnumerable"),RHt=sLe?fP.getOwnPropertySymbols:null;uLe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var i=fP(t);if(arguments.length===1)return i;for(var n=1;n{"use strict";var yZ=cLe(),zHt=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i{"use strict";var dLe=function(e){return e!==e};pLe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||dLe(t)&&dLe(r))}});var hP=W((DNr,vLe)=>{"use strict";var qHt=xZ();vLe.exports=function(){return typeof Object.is=="function"?Object.is:qHt}});var xLe=W((FNr,yLe)=>{"use strict";var gLe=g9(),mLe=aS(),OHt=mLe(gLe("String.prototype.indexOf"));yLe.exports=function(t,r){var i=gLe(t,!!r);return typeof i=="function"&&OHt(t,".prototype.")>-1?mLe(i):i}});var ES=W((LNr,TLe)=>{"use strict";var NHt=mZ(),UHt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",VHt=Object.prototype.toString,GHt=Array.prototype.concat,_Le=hX(),HHt=function(e){return typeof e=="function"&&VHt.call(e)==="[object Function]"},bLe=pX()(),jHt=function(e,t,r,i){if(t in e){if(i===!0){if(e[t]===r)return}else if(!HHt(i)||!i())return}bLe?_Le(e,t,r,!0):_Le(e,t,r)},wLe=function(e,t){var r=arguments.length>2?arguments[2]:{},i=NHt(t);UHt&&(i=GHt.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n{"use strict";var $Ht=hP(),WHt=ES();ALe.exports=function(){var t=$Ht();return WHt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var CLe=W((INr,kLe)=>{"use strict";var YHt=ES(),XHt=aS(),ZHt=xZ(),SLe=hP(),KHt=MLe(),ELe=XHt(SLe(),Object);YHt(ELe,{getPolyfill:SLe,implementation:ZHt,shim:KHt});kLe.exports=ELe});var _Z=W((RNr,DLe)=>{"use strict";DLe.exports=function(t){return t!==t}});var bZ=W((zNr,FLe)=>{"use strict";var JHt=_Z();FLe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:JHt}});var PLe=W((BNr,LLe)=>{"use strict";var QHt=ES(),ejt=bZ();LLe.exports=function(){var t=ejt();return QHt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var BLe=W((qNr,zLe)=>{"use strict";var tjt=aS(),rjt=ES(),ijt=_Z(),ILe=bZ(),njt=PLe(),RLe=tjt(ILe(),Number);rjt(RLe,{getPolyfill:ILe,implementation:ijt,shim:njt});zLe.exports=RLe});var i9e=W((ONr,r9e)=>{"use strict";function qLe(e,t){return ljt(e)||sjt(e,t)||ojt(e,t)||ajt()}function ajt(){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 ojt(e,t){if(e){if(typeof e=="string")return OLe(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 OLe(e,t)}}function OLe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function vP(e){return Object.keys(e).filter(mjt).concat(mP(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function JLe(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n{"use strict";function ov(e){"@babel/helpers - typeof";return ov=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},ov(e)}function n9e(e,t){for(var r=0;r1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n{var LS=1e3,PS=LS*60,IS=PS*60,RS=IS*24,Gjt=RS*365.25;w9e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Hjt(e);if(r==="number"&&isNaN(e)===!1)return t.long?$jt(e):jjt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Hjt(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]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Gjt;case"days":case"day":case"d":return r*RS;case"hours":case"hour":case"hrs":case"hr":case"h":return r*IS;case"minutes":case"minute":case"mins":case"min":case"m":return r*PS;case"seconds":case"second":case"secs":case"sec":case"s":return r*LS;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function jjt(e){return e>=RS?Math.round(e/RS)+"d":e>=IS?Math.round(e/IS)+"h":e>=PS?Math.round(e/PS)+"m":e>=LS?Math.round(e/LS)+"s":e+"ms"}function $jt(e){return MP(e,RS,"day")||MP(e,IS,"hour")||MP(e,PS,"minute")||MP(e,LS,"second")||e+" ms"}function MP(e,t,r){if(!(e{ts=A9e.exports=kZ.debug=kZ.default=kZ;ts.coerce=Kjt;ts.disable=Xjt;ts.enable=Yjt;ts.enabled=Zjt;ts.humanize=T9e();ts.names=[];ts.skips=[];ts.formatters={};var EZ;function Wjt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return ts.colors[Math.abs(t)%ts.colors.length]}function kZ(e){function t(){if(t.enabled){var r=t,i=+new Date,n=i-(EZ||i);r.diff=n,r.prev=EZ,r.curr=i,EZ=i;for(var a=new Array(arguments.length),o=0;o{ih=E9e.exports=M9e();ih.log=e$t;ih.formatArgs=Qjt;ih.save=t$t;ih.load=S9e;ih.useColors=Jjt;ih.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:r$t();ih.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function Jjt(){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+)/)}ih.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function Qjt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+ih.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(i++,a==="%c"&&(n=i))}),e.splice(n,0,r)}}function e$t(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function t$t(e){try{e==null?ih.storage.removeItem("debug"):ih.storage.debug=e}catch(t){}}function S9e(){var e;try{e=ih.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}ih.enable(S9e());function r$t(){try{return window.localStorage}catch(e){}}});var z9e=W((VNr,R9e)=>{var t4=sP(),h2=k9e()("stream-parser");R9e.exports=n$t;var D9e=-1,SP=0,i$t=1,F9e=2;function n$t(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");h2("extending Parser into stream"),e._bytes=a$t,e._skipBytes=o$t,t&&(e._passthrough=s$t),t?e._transform=u$t:e._write=l$t}function zS(e){h2("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=D9e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a$t(e,t){t4(!this._parserCallback,'there is already a "callback" set!'),t4(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||zS(this),h2("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=SP}function o$t(e,t){t4(!this._parserCallback,'there is already a "callback" set!'),t4(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||zS(this),h2("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=i$t}function s$t(e,t){t4(!this._parserCallback,'There is already a "callback" set!'),t4(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||zS(this),h2("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=F9e}function l$t(e,t,r){this._parserInit||zS(this),h2("write(%o bytes)",e.length),typeof t=="function"&&(r=t),P9e(this,e,null,r)}function u$t(e,t,r){this._parserInit||zS(this),h2("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),P9e(this,e,t,r)}function L9e(e,t,r,i){return e._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return C9e(e,t,r,i)}:function(){var n=t.slice(0,e._parserBytesLeft);return C9e(e,n,r,function(a){if(a)return i(a);if(t.length>n.length)return function(){return L9e(e,t.slice(n.length),r,i)}})}}function C9e(e,t,r,i){if(e._parserBytesLeft-=t.length,h2("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===SP?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===F9e&&r(t),e._parserBytesLeft===0){var n=e._parserCallback;if(n&&e._parserState===SP&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==SP&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=D9e,e._parserBuffers.splice(0),n){var a=[];t&&a.push(t),r&&a.push(r);var o=n.length>a.length;o&&a.push(I9e(i));var s=n.apply(e,a);if(!o||i===s)return i}}else return i}var P9e=I9e(L9e);function I9e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var bo=W(rf=>{"use strict";var B9e=SFe().Transform,c$t=z9e();function BS(){B9e.call(this,{readableObjectMode:!0})}BS.prototype=Object.create(B9e.prototype);BS.prototype.constructor=BS;c$t(BS.prototype);rf.ParserStream=BS;rf.sliceEq=function(e,t,r){for(var i=t,n=0;n>16};rf.readInt16BE=function(e,t){return rf.readUInt16BE(e,t)<<16>>16};rf.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};rf.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};rf.readInt32LE=function(e,t){return rf.readUInt32LE(e,t)|0};rf.readInt32BE=function(e,t){return rf.readUInt32BE(e,t)|0};function EP(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)}EP.prototype=Object.create(Error.prototype);EP.prototype.constructor=EP;rf.ProbeError=EP});var q9e=W((HNr,kP)=>{"use strict";var r4=bo().readUInt16BE,DZ=bo().readUInt32BE;function qS(e,t){if(e.length<4+t)return null;var r=DZ(e,t);return e.length>4&15,i=e[4]&15,n=e[5]>>4&15,a=r4(e,6),o=8,s=0;sa.width||n.width===a.width&&n.height>a.height?n:a}),r=e.reduce(function(n,a){return n.height>a.height||n.height===a.height&&n.width>a.width?n:a}),i;return t.width>r.height||t.width===r.height&&t.height>r.width?i=t:i=r,i}kP.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(v$t(e,t),!!t.sizes.length){var r=g$t(t.sizes),i=1;t.transforms.forEach(function(a){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(a.type==="imir"&&(a.value===0?i=s[i]:(i=s[i],i=o[i],i=o[i])),a.type==="irot")for(var l=0;l{"use strict";function CP(e,t){var r=new Error(e);return r.code=t,r}function m$t(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function em(e,t,r){this.input=e.subarray(t,r),this.start=t;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if(i!=="II*\0"&&i!=="MM\0*")throw CP("invalid TIFF signature","EBADDATA");this.big_endian=i[0]==="M"}em.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)}};em.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw CP("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};em.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw CP("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};em.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};em.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}};em.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}};em.prototype.scan_ifd=function(e,t,r){var i=this.read_uint16(t);t+=2;for(var n=0;nthis.input.length)throw CP("unexpected EOF","EBADDATA");for(var h=[],d=c,p=0;p0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var m={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(m)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};FZ.exports.ExifParser=em;FZ.exports.get_orientation=function(e){var t=0;try{return new em(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 N9e=W(($Nr,O9e)=>{"use strict";var y$t=bo().str2arr,x$t=bo().sliceEq,_$t=bo().readUInt32BE,FP=q9e(),b$t=DP(),w$t=y$t("ftyp");O9e.exports=function(e){if(x$t(e,4,w$t)){var t=FP.unbox(e,0);if(t){var r=FP.getMimeType(t.data);if(r){for(var i,n=t.end;;){var a=FP.unbox(e,n);if(!a)break;if(n=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){i=a.data;break}}if(i){var o=FP.readSizeFromMeta(i);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=_$t(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=b$t.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var H9e=W((WNr,G9e)=>{"use strict";var T$t=bo().str2arr,A$t=bo().sliceEq,U9e=bo().readInt16LE,V9e=bo().readInt32LE,M$t=bo().readUInt32LE,S$t=T$t("BM");G9e.exports=function(e){if(!(e.length<26)&&A$t(e,0,S$t)){var t,r,i=M$t(e,14);if(i===12)r=U9e(e,18),t=U9e(e,20);else if(i>12)r=V9e(e,18),t=V9e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var X9e=W((YNr,Y9e)=>{"use strict";var W9e=bo().str2arr,j9e=bo().sliceEq,$9e=bo().readUInt16LE,E$t=W9e("GIF87a"),k$t=W9e("GIF89a");Y9e.exports=function(e){if(!(e.length<10)&&!(!j9e(e,0,E$t)&&!j9e(e,0,k$t)))return{width:$9e(e,6),height:$9e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var K9e=W((XNr,Z9e)=>{"use strict";var LZ=bo().readUInt16LE,C$t=0,D$t=1,PZ=16;Z9e.exports=function(e){var t=LZ(e,0),r=LZ(e,2),i=LZ(e,4);if(!(t!==C$t||r!==D$t||!i)&&!(e.length<6+i*PZ)){for(var n=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var Q9e=W((ZNr,J9e)=>{"use strict";var IZ=bo().readUInt16BE,F$t=bo().str2arr,L$t=bo().sliceEq,P$t=DP(),I$t=F$t("Exif\0\0");J9e.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++],i;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)i=0;else if(r>=192&&r<=254){if(e.length-t<2)return;i=IZ(e,t)-2,t+=2}else return;if(r===217||r===218)return;var n;if(r===225&&i>=10&&L$t(e,t,I$t)&&(n=P$t.get_orientation(e.slice(t+6,t+i))),i>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=n),a}t+=i}}});var nPe=W((KNr,iPe)=>{"use strict";var rPe=bo().str2arr,ePe=bo().sliceEq,tPe=bo().readUInt32BE,R$t=rPe(`\x89PNG\r  `),z$t=rPe("IHDR");iPe.exports=function(e){if(!(e.length<24)&&ePe(e,0,R$t)&&ePe(e,12,z$t))return{width:tPe(e,16),height:tPe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var sPe=W((JNr,oPe)=>{"use strict";var B$t=bo().str2arr,q$t=bo().sliceEq,aPe=bo().readUInt32BE,O$t=B$t("8BPS\0");oPe.exports=function(e){if(!(e.length<22)&&q$t(e,0,O$t))return{width:aPe(e,18),height:aPe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var cPe=W((QNr,uPe)=>{"use strict";function N$t(e){return e===32||e===9||e===13||e===10}function i4(e){return typeof e=="number"&&isFinite(e)&&e>0}function U$t(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,G$t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,H$t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,j$t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,$$t=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,lPe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function W$t(e){var t=e.match(H$t),r=e.match(j$t),i=e.match($$t);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:i&&(i[1]||i[2])}}function L1(e){return lPe.test(e)?e.match(lPe)[0]:"px"}uPe.exports=function(e){if(U$t(e)){for(var t="",r=0;r{"use strict";var dPe=bo().str2arr,fPe=bo().sliceEq,Y$t=bo().readUInt16LE,X$t=bo().readUInt16BE,Z$t=bo().readUInt32LE,K$t=bo().readUInt32BE,J$t=dPe("II*\0"),Q$t=dPe("MM\0*");function LP(e,t,r){return r?X$t(e,t):Y$t(e,t)}function RZ(e,t,r){return r?K$t(e,t):Z$t(e,t)}function hPe(e,t,r){var i=LP(e,t+2,r),n=RZ(e,t+4,r);return n!==1||i!==3&&i!==4?null:i===3?LP(e,t+8,r):RZ(e,t+8,r)}pPe.exports=function(e){if(!(e.length<8)&&!(!fPe(e,0,J$t)&&!fPe(e,0,Q$t))){var t=e[0]===77,r=RZ(e,4,t)-8;if(!(r<0)){var i=r+8;if(!(e.length-i<2)){var n=LP(e,i+0,t)*12;if(!(n<=0)&&(i+=2,!(e.length-i{"use strict";var yPe=bo().str2arr,gPe=bo().sliceEq,mPe=bo().readUInt16LE,zZ=bo().readUInt32LE,eWt=DP(),tWt=yPe("RIFF"),rWt=yPe("WEBP");function iWt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:mPe(e,t+6)&16383,height:mPe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function nWt(e,t){if(e[t]===47){var r=zZ(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function aWt(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"}}xPe.exports=function(e){if(!(e.length<16)&&!(!gPe(e,0,tWt)||!gPe(e,8,rWt))){var t=12,r=null,i=0,n=zZ(e,4)+8;if(!(n>e.length)){for(;t+8=10?r=r||iWt(e,t+8):a==="VP8L"&&o>=5?r=r||nWt(e,t+8):a==="VP8X"&&o>=10?r=r||aWt(e,t+8):a==="EXIF"&&(i=eWt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return i>0&&(r.orientation=i),r}}}});var wPe=W((rUr,bPe)=>{"use strict";bPe.exports={avif:N9e(),bmp:H9e(),gif:X9e(),ico:K9e(),jpeg:Q9e(),png:nPe(),psd:sPe(),svg:cPe(),tiff:vPe(),webp:_Pe()}});var TPe=W((iUr,qZ)=>{"use strict";var BZ=wPe();function oWt(e){for(var t=Object.keys(BZ),r=0;r0&&i.height>0?i:null}return null}qZ.exports=function(t){return oWt(t)};qZ.exports.parsers=BZ});var MPe=W(APe=>{"use strict";var sWt=TPe(),lWt=Ng().IMAGE_URL_PREFIX,uWt=V_().Buffer;APe.getImageSize=function(e){var t=e.replace(lWt,""),r=new uWt(t,"base64");return sWt(r)}});var kPe=W((aUr,EPe)=>{"use strict";var SPe=it(),cWt=L5(),fWt=sn(),PP=ji(),hWt=it().maxRowLength,dWt=MPe().getImageSize;EPe.exports=function(t,r){var i,n;if(r._hasZ)i=r.z.length,n=hWt(r.z);else if(r._hasSource){var a=dWt(r.source);i=a.height,n=a.width}var o=PP.getFromId(t,r.xaxis||"x"),s=PP.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+n*r.dx],h=[u,u+i*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var mWt=vi(),ib=it(),CPe=ib.strTranslate,yWt=sd(),xWt=L5(),_Wt=MW(),bWt=SL().STYLE;DPe.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&_Wt();ib.makeTraceGroups(n,i,"im").each(function(l){var u=mWt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,p=c.x0,v=c.y0,m=c.w,g=c.h,w=f.dx,b=f.dy,_,M,x,T,A,y;for(y=0;_===void 0&&y0;)M=a.c2p(p+y*w),y--;for(y=0;T===void 0&&y0;)A=o.c2p(v+y*b),y--;if(M<_&&(x=M,M=_,_=x),AI[0];if(B||O){var $=_+S/2,Y=T+C/2;R+="transform:"+CPe($+"px",Y+"px")+"scale("+(B?-1:1)+","+(O?-1:1)+")"+CPe(-$+"px",-Y+"px")+";"}}P.attr("style",R);var K=new Promise(function(j){if(f._hasZ)j();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===m&&f._canvas.el.height===g&&f._canvas.source===f.source)j();else{var q=document.createElement("canvas");q.width=m,q.height=g;var J=q.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var U=f._image;U.onload=function(){J.drawImage(U,0,0),f._canvas={el:q,source:f.source},j()},U.setAttribute("src",f.source)}}).then(function(){var j,q;if(f._hasZ)q=F(function(V,X){var H=d[X][V];return ib.isTypedArray(H)&&(H=Array.from(H)),H}),j=q.toDataURL("image/png");else if(f._hasSource)if(h)j=f.source;else{var J=f._canvas.el.getContext("2d",{willReadFrequently:!0}),U=J.getImageData(0,0,m,g).data;q=F(function(V,X){var H=4*(X*m+V);return[U[H],U[H+1],U[H+2],U[H+3]]}),j=q.toDataURL("image/png")}P.attr({"xlink:href":j,height:C,width:S,x:_,y:T})});t._promises.push(K)})}});var PPe=W((sUr,LPe)=>{"use strict";var wWt=vi();LPe.exports=function(t){wWt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var BPe=W((lUr,zPe)=>{"use strict";var IPe=Ds(),RPe=it(),IP=RPe.isArrayOrTypedArray,TWt=L5();zPe.exports=function(t,r,i){var n=t.cd[0],a=n.trace,o=t.xa,s=t.ya;if(!(IPe.inbox(r-n.x0,r-(n.x0+n.w*a.dx),0)>0||IPe.inbox(i-n.y0,i-(n.y0+n.h*a.dy),0)>0)){var l=Math.floor((r-n.x0)/a.dx),u=Math.floor(Math.abs(i-n.y0)/a.dy),c;if(a._hasZ?c=n.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=n.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var p=TWt.colormodel[a.colormodel],v=p.colormodel||a.colormodel,m=v.length,g=a._scaler(c),w=p.suffix,b=[];(a.hovertemplate||h)&&(b.push("["+[g[0]+w[0],g[1]+w[1],g[2]+w[2]].join(", ")),m===4&&b.push(", "+g[3]+w[3]),b.push("]"),b=b.join(""),t.extraText=v.toUpperCase()+": "+b);var _;IP(a.hovertext)&&IP(a.hovertext[u])?_=a.hovertext[u][l]:IP(a.text)&&IP(a.text[u])&&(_=a.text[u][l]);var M=s.c2p(n.y0+(u+.5)*a.dy),x=n.x0+(l+.5)*a.dx,T=n.y0+(u+.5)*a.dy,A="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[RPe.extendFlat(t,{index:[u,l],x0:o.c2p(n.x0+l*a.dx),x1:o.c2p(n.x0+(l+1)*a.dx),y0:M,y1:M,color:g,xVal:x,xLabelVal:x,yVal:T,yLabelVal:T,zLabelVal:A,text:_,hovertemplateLabels:{zLabel:A,colorLabel:b,"color[0]Label":g[0]+w[0],"color[1]Label":g[1]+w[1],"color[2]Label":g[2]+w[2],"color[3]Label":g[3]+w[3]}})]}}}});var OPe=W((uUr,qPe)=>{"use strict";qPe.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 UPe=W((cUr,NPe)=>{"use strict";NPe.exports={attributes:(zY(),Go(RY)).default,supplyDefaults:k8e(),calc:kPe(),plot:FPe(),style:PPe(),hoverPoints:BPe(),eventData:OPe(),moduleType:"trace",name:"image",basePlotModule:dl(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var GPe=W((fUr,VPe)=>{"use strict";VPe.exports=UPe()});var nb=W((hUr,jPe)=>{"use strict";var RP=Wa(),AWt=us().attributes,MWt=Ho(),SWt=Vl(),{hovertemplateAttrs:EWt,texttemplateAttrs:kWt,templatefallbackAttrs:HPe}=Ga(),d2=tn().extendFlat,CWt=Du().pattern,zP=MWt({editType:"plot",arrayOk:!0,colorEditType:"plot"});jPe.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:SWt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:CWt,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:d2({},RP.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:EWt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:HPe(),texttemplate:kWt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:HPe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:d2({},zP,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:d2({},zP,{}),outsidetextfont:d2({},zP,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:d2({},RP.showlegend,{arrayOk:!0}),legend:d2({},RP.legend,{arrayOk:!0}),legendrank:d2({},RP.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:d2({},zP,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:AWt({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 ab=W((dUr,YPe)=>{"use strict";var DWt=sn(),OS=it(),FWt=nb(),LWt=us().defaults,PWt=E0().handleText,IWt=it().coercePattern;function $Pe(e,t){var r=OS.isArrayOrTypedArray(e),i=OS.isArrayOrTypedArray(t),n=Math.min(r?e.length:1/0,i?t.length:1/0);if(isFinite(n)||(n=0),n&&i){for(var a,o=0;o0){a=!0;break}}a||(n=0)}return{hasLabels:r,hasValues:i,len:n}}function WPe(e,t,r,i,n){var a=i("marker.line.width");a&&i("marker.line.color",n?void 0:r.paper_bgcolor);var o=i("marker.colors");IWt(i,"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 RWt(e,t,r,i){function n(w,b){return OS.coerce(e,t,FWt,w,b)}var a=n("labels"),o=n("values"),s=$Pe(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),!l){t.visible=!1;return}t._length=l,WPe(e,t,i,n,!0),n("scalegroup");var u=n("text"),c=n("texttemplate");n("texttemplatefallback");var f;if(c||(f=n("textinfo",OS.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),c||f&&f!=="none"){var h=n("textposition");PWt(e,t,i,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else f==="none"&&n("textposition","none");LWt(t,i,n);var v=n("hole"),m=n("title.text");if(m){var g=n("title.position",v?"middle center":"top center");!v&&g==="middle center"&&(t.title.position="top center"),OS.coerceFont(n,"title.font",i.font)}n("sort"),n("direction"),n("rotation"),n("pull")}YPe.exports={handleLabelsAndValues:$Pe,handleMarkerDefaults:WPe,supplyDefaults:RWt}});var BP=W((pUr,XPe)=>{"use strict";XPe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var KPe=W((vUr,ZPe)=>{"use strict";var zWt=it(),BWt=BP();ZPe.exports=function(t,r){function i(n,a){return zWt.coerce(t,r,BWt,n,a)}i("hiddenlabels"),i("piecolorway",r.colorway),i("extendpiecolors")}});var a4=W((gUr,eIe)=>{"use strict";var qWt=sn(),n4=ni(),OWt={};function NWt(e,t){var r=[],i=e._fullLayout,n=i.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var _=t.type==="funnelarea"?v:t.sort;return _&&r.sort(function(M,x){return x.v-M.v}),r[0]&&(r[0].vTotal=p),r}function JPe(e){return function(r,i){if(!r||!n4.isValid(r))return!1;let n=n4.rgbaString(r);return e[i]||(e[i]=n),n}}function UWt(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,n=e.calcdata,a=i[r+"colorway"],o=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(a=QPe(a,OWt));for(var s=0,l=0;l{"use strict";var VWt=Kf().appendArrayMultiPointValues;tIe.exports=function(t,r){var i={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&&(i.pointNumber=i.i=t.pts[0]),VWt(i,r,t.pts),r.type==="funnelarea"&&(delete i.v,delete i.i),i}});var UP=W((yUr,TIe)=>{"use strict";var jh=vi(),GWt=Ko(),qP=Ds(),lIe=ni(),tm=Ji(),kc=it(),HWt=kc.strScale,iIe=kc.strTranslate,OZ=uo(),uIe=Qc(),jWt=uIe.recordMinTextSize,$Wt=uIe.clearMinTextSize,cIe=Uy().TEXTPAD,Ln=Ly(),OP=rIe(),nIe=it().isValidTextValue;function WWt(e,t){var r=e._context.staticPlot,i=e._fullLayout,n=i._size;$Wt("pie",i),dIe(t,e),_Ie(t,n);var a=kc.makeTraceGroups(i._pielayer,t,"trace").each(function(o){var s=jh.select(this),l=o[0],u=l.trace;rYt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=jh.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(_,M){if(_.hidden){jh.select(this).selectAll("path,g").remove();return}_.pointNumber=_.i,_.curveNumber=u.index,f[_.pxmid[1]<0?0:1][_.pxmid[0]<0?0:1].push(_);var x=l.cx,T=l.cy,A=jh.select(this),y=A.selectAll("path.surface").data([_]);if(y.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),A.call(fIe,e,o),u.pull){var E=+Ln.castOption(u.pull,_.pts)||0;E>0&&(x+=E*_.pxmid[0],T+=E*_.pxmid[1])}_.cxFinal=x,_.cyFinal=T;function S(L,I,B,O){var $=O*(I[0]-L[0]),Y=O*(I[1]-L[1]);return"a"+O*l.r+","+O*l.r+" 0 "+_.largeArc+(B?" 1 ":" 0 ")+$+","+Y}var C=u.hole;if(_.v===l.vTotal){var k="M"+(x+_.px0[0])+","+(T+_.px0[1])+S(_.px0,_.pxmid,!0,1)+S(_.pxmid,_.px0,!0,1)+"Z";C?y.attr("d","M"+(x+C*_.px0[0])+","+(T+C*_.px0[1])+S(_.px0,_.pxmid,!1,C)+S(_.pxmid,_.px0,!1,C)+"Z"+k):y.attr("d",k)}else{var D=S(_.px0,_.px1,!0,1);if(C){var F=1-C;y.attr("d","M"+(x+C*_.px1[0])+","+(T+C*_.px1[1])+S(_.px1,_.px0,!1,C)+"l"+F*_.px0[0]+","+F*_.px0[1]+D+"Z")}else y.attr("d","M"+x+","+T+"l"+_.px0[0]+","+_.px0[1]+D+"Z")}bIe(e,_,l);var P=Ln.castOption(u.textposition,_.pts),R=A.selectAll("g.slicetext").data(_.text&&P!=="none"?[0]:[]);R.enter().append("g").classed("slicetext",!0),R.exit().remove(),R.each(function(){var L=kc.ensureSingle(jh.select(this),"text","",function(q){q.attr("data-notex",1)}),I=kc.ensureUniformFontSize(e,P==="outside"?XWt(u,_,i.font):hIe(u,_,i.font));L.text(_.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(tm.font,I).call(OZ.convertToTspans,e);var B=tm.bBox(L.node()),O;if(P==="outside")O=sIe(B,_);else if(O=pIe(B,_,l),P==="auto"&&O.scale<1){var $=kc.ensureUniformFontSize(e,u.outsidetextfont);L.call(tm.font,$),B=tm.bBox(L.node()),O=sIe(B,_)}var Y=O.textPosAngle,K=Y===void 0?_.pxmid:NP(l.r,Y);if(O.targetX=x+K[0]*O.rCenter+(O.x||0),O.targetY=T+K[1]*O.rCenter+(O.y||0),wIe(O,B),O.outside){var j=O.targetY;_.yLabelMin=j-B.height/2,_.yLabelMid=j,_.yLabelMax=j+B.height/2,_.labelExtraX=0,_.labelExtraY=0,h=!0}O.fontSize=I.size,jWt(u.type,O,i),o[M].transform=O,kc.setTransormAndDisplay(L,O)})});var d=jh.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var _=kc.ensureSingle(jh.select(this),"text","",function(T){T.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=kc.templateString(M,u._meta)),_.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(tm.font,u.title.font).call(OZ.convertToTspans,e);var x;u.title.position==="middle center"?x=JWt(l):x=yIe(l,n),_.attr("transform",iIe(x.x,x.y)+HWt(Math.min(1,x.scale))+iIe(x.tx,x.ty))}),h&&eYt(f,u),YWt(c,u),h&&u.automargin){var p=tm.bBox(s.node()),v=u.domain,m=n.w*(v.x[1]-v.x[0]),g=n.h*(v.y[1]-v.y[0]),w=(.5*m-l.r)/n.w,b=(.5*g-l.r)/n.h;GWt.autoMargin(e,"pie."+u.uid+".automargin",{xl:v.x[0]-w,xr:v.x[1]+w,yb:v.y[0]-b,yt:v.y[1]+b,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(){a.selectAll("tspan").each(function(){var o=jh.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function YWt(e,t){e.each(function(r){var i=jh.select(this);if(!r.labelExtraX&&!r.labelExtraY){i.select("path.textline").remove();return}var n=i.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,kc.setTransormAndDisplay(n,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+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"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;kc.ensureSingle(i,"path","textline").call(lIe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function fIe(e,t,r){var i=r[0],n=i.cx,a=i.cy,o=i.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=qP.castHoverinfo({hoverinfo:[Ln.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 h=l.rInscribed||0,d=n+l.pxmid[0]*(1-h),p=a+l.pxmid[1]*(1-h),v=u.separators,m=[];if(f&&f.indexOf("label")!==-1&&m.push(l.label),l.text=Ln.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;kc.isValidTextValue(g)&&m.push(g)}l.value=l.v,l.valueLabel=Ln.formatPieValue(l.v,v),f&&f.indexOf("value")!==-1&&m.push(l.valueLabel),l.percent=l.v/i.vTotal,l.percentLabel=Ln.formatPiePercent(l.percent,v),f&&f.indexOf("percent")!==-1&&m.push(l.percentLabel);var w=c.hoverlabel,b=w.font,_=[];qP.loneHover({trace:o,x0:d-h*i.r,x1:d+h*i.r,y:p,_x0:s?n+l.TL[0]:d-h*i.r,_x1:s?n+l.TR[0]:d+h*i.r,_y0:s?a+l.TL[1]:p-h*i.r,_y1:s?a+l.BL[1]:p+h*i.r,text:m.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Ln.castOption(w.bgcolor,l.pts)||l.color,borderColor:Ln.castOption(w.bordercolor,l.pts),fontFamily:Ln.castOption(b.family,l.pts),fontSize:Ln.castOption(b.size,l.pts),fontColor:Ln.castOption(b.color,l.pts),nameLength:Ln.castOption(w.namelength,l.pts),textAlign:Ln.castOption(w.align,l.pts),hovertemplate:Ln.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[OP(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:_}),l.bbox=_[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[OP(l,c)],event:jh.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=jh.select(this).datum();o._hasHoverEvent&&(l.originalEvent=jh.event,t.emit("plotly_unhover",{points:[OP(f,c)],event:jh.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(qP.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=[OP(l,c)],qP.click(t,jh.event))})}function XWt(e,t,r){var i=Ln.castOption(e.outsidetextfont.color,t.pts)||Ln.castOption(e.textfont.color,t.pts)||r.color,n=Ln.castOption(e.outsidetextfont.family,t.pts)||Ln.castOption(e.textfont.family,t.pts)||r.family,a=Ln.castOption(e.outsidetextfont.size,t.pts)||Ln.castOption(e.textfont.size,t.pts)||r.size,o=Ln.castOption(e.outsidetextfont.weight,t.pts)||Ln.castOption(e.textfont.weight,t.pts)||r.weight,s=Ln.castOption(e.outsidetextfont.style,t.pts)||Ln.castOption(e.textfont.style,t.pts)||r.style,l=Ln.castOption(e.outsidetextfont.variant,t.pts)||Ln.castOption(e.textfont.variant,t.pts)||r.variant,u=Ln.castOption(e.outsidetextfont.textcase,t.pts)||Ln.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Ln.castOption(e.outsidetextfont.lineposition,t.pts)||Ln.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Ln.castOption(e.outsidetextfont.shadow,t.pts)||Ln.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i,family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function hIe(e,t,r){var i=Ln.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=Ln.castOption(e._input.textfont.color,t.pts));var n=Ln.castOption(e.insidetextfont.family,t.pts)||Ln.castOption(e.textfont.family,t.pts)||r.family,a=Ln.castOption(e.insidetextfont.size,t.pts)||Ln.castOption(e.textfont.size,t.pts)||r.size,o=Ln.castOption(e.insidetextfont.weight,t.pts)||Ln.castOption(e.textfont.weight,t.pts)||r.weight,s=Ln.castOption(e.insidetextfont.style,t.pts)||Ln.castOption(e.textfont.style,t.pts)||r.style,l=Ln.castOption(e.insidetextfont.variant,t.pts)||Ln.castOption(e.textfont.variant,t.pts)||r.variant,u=Ln.castOption(e.insidetextfont.textcase,t.pts)||Ln.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Ln.castOption(e.insidetextfont.lineposition,t.pts)||Ln.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Ln.castOption(e.insidetextfont.shadow,t.pts)||Ln.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||lIe.contrast(t.color),family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function dIe(e,t){for(var r,i,n=0;n=-4;w-=2)g(Math.PI*w,"tan");for(w=4;w>=-4;w-=2)g(Math.PI*(w+1),"tan")}if(f||d){for(w=4;w>=-4;w-=2)g(Math.PI*(w+1.5),"rad");for(w=4;w>=-4;w-=2)g(Math.PI*(w+.5),"rad")}}if(s||p||f){var b=Math.sqrt(e.width*e.width+e.height*e.height);if(m={scale:n*i*2/b,rCenter:1-n,rotate:0},m.textPosAngle=(t.startangle+t.stopangle)/2,m.scale>=1)return m;v.push(m)}(p||d)&&(m=aIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m)),(p||h)&&(m=oIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m));for(var _=0,M=0,x=0;x=1)break}return v[_]}function ZWt(e,t){var r=e.startangle,i=e.stopangle;return r>t&&t>i||r0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function JWt(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 yIe(e,t){var r=1,i=1,n,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,n=xIe(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+n)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+n)*e.r);var l=QWt(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+n)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+n)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,i=NZ(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,i),tx:s.tx,ty:s.ty}}function QWt(e,t){return e/(t===void 0?1:t)}function NZ(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 xIe(e){var t=e.pull;if(!t)return 0;var r;if(kc.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function eYt(e,t){var r,i,n,a,o,s,l,u,c,f,h,d,p;function v(b,_){return b.pxmid[1]-_.pxmid[1]}function m(b,_){return _.pxmid[1]-b.pxmid[1]}function g(b,_){_||(_={});var M=_.labelExtraY+(i?_.yLabelMax:_.yLabelMin),x=i?b.yLabelMin:b.yLabelMax,T=i?b.yLabelMax:b.yLabelMin,A=b.cyFinal+o(b.px0[1],b.px1[1]),y=M-x,E,S,C,k,D,F;if(y*l>0&&(b.labelExtraY=y),!!kc.isArrayOrTypedArray(t.pull))for(S=0;S=(Ln.castOption(t.pull,C.pts)||0))&&((b.pxmid[1]-C.pxmid[1])*l>0?(k=C.cyFinal+o(C.px0[1],C.px1[1]),y=k-x-b.labelExtraY,y*l>0&&(b.labelExtraY+=y)):(T+b.labelExtraY-A)*l>0&&(E=3*s*Math.abs(S-f.indexOf(b)),D=C.cxFinal+a(C.px0[0],C.px1[0]),F=D+E-(b.cxFinal+b.pxmid[0])-b.labelExtraX,F*s>0&&(b.labelExtraX+=F)))}for(i=0;i<2;i++)for(n=i?v:m,o=i?Math.max:Math.min,l=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[i][r],u.sort(n),c=e[1-i][r],f=c.concat(u),d=[],h=0;h1?(u=r.r,c=u/n.aspectratio):(c=r.r,u=c*n.aspectratio),u*=(1+n.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(i=0;it.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-i.hole,u.rInscribed=KWt(u,t))}function NP(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function bIe(e,t,r){var i=e._fullLayout,n=r.trace,a=n.texttemplate,o=n.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(_){return s.indexOf(_)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=i.separators,p;if(p=u?[t.label]:[],c){var v=Ln.getFirstFilled(n.text,t.pts);nIe(v)&&p.push(v)}f&&p.push(Ln.formatPieValue(t.v,d)),h&&p.push(Ln.formatPiePercent(t.v/r.vTotal,d)),t.text=p.join("
")}function m(_){return{label:_.label,value:_.v,valueLabel:Ln.formatPieValue(_.v,i.separators),percent:_.v/r.vTotal,percentLabel:Ln.formatPiePercent(_.v/r.vTotal,i.separators),color:_.color,text:_.text,customdata:kc.castOption(n,_.i,"customdata")}}if(a){var g=kc.castOption(n,t.i,"texttemplate");if(!g)t.text="";else{var w=m(t),b=Ln.getFirstFilled(n.text,t.pts);(nIe(b)||b==="")&&(w.text=b),t.text=kc.texttemplateString({data:[w,n._meta],fallback:n.texttemplatefallback,labels:w,locale:e._fullLayout._d3locale,template:g})}}}function wIe(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}TIe.exports={plot:WWt,formatSliceLabel:bIe,transformInsideText:pIe,determineInsideTextFont:hIe,positionTitleOutside:yIe,prerenderTitles:dIe,layoutAreas:_Ie,attachFxHandlers:fIe,computeTransform:wIe}});var SIe=W((xUr,MIe)=>{"use strict";var AIe=vi(),iYt=Sw(),nYt=Qc().resizeText;MIe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");nYt(t,r,"pie"),r.each(function(i){var n=i[0],a=n.trace,o=AIe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){AIe.select(this).call(iYt,s,a,t)})})}});var kIe=W(o4=>{"use strict";var EIe=Ko();o4.name="pie";o4.plot=function(e,t,r,i){EIe.plotBasePlot(o4.name,e,t,r,i)};o4.clean=function(e,t,r,i){EIe.cleanBasePlot(o4.name,e,t,r,i)}});var DIe=W((bUr,CIe)=>{"use strict";CIe.exports={attributes:nb(),supplyDefaults:ab().supplyDefaults,supplyLayoutDefaults:KPe(),layoutAttributes:BP(),calc:a4().calc,crossTraceCalc:a4().crossTraceCalc,plot:UP().plot,style:SIe(),styleOne:Sw(),moduleType:"trace",name:"pie",basePlotModule:kIe(),categories:["pie-like","pie","showLegend"],meta:{}}});var LIe=W((wUr,FIe)=>{"use strict";FIe.exports=DIe()});var IIe=W(s4=>{"use strict";var PIe=Ko();s4.name="sunburst";s4.plot=function(e,t,r,i){PIe.plotBasePlot(s4.name,e,t,r,i)};s4.clean=function(e,t,r,i){PIe.cleanBasePlot(s4.name,e,t,r,i)}});var UZ=W((AUr,RIe)=>{"use strict";RIe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var US=W((MUr,qIe)=>{"use strict";var aYt=Wa(),{hovertemplateAttrs:oYt,texttemplateAttrs:sYt,templatefallbackAttrs:zIe}=Ga(),lYt=Eo(),uYt=us().attributes,rm=nb(),BIe=UZ(),NS=tn().extendFlat,cYt=Du().pattern;qIe.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:NS({colors:{valType:"data_array",editType:"calc"},line:{color:NS({},rm.marker.line.color,{dflt:null}),width:NS({},rm.marker.line.width,{dflt:1}),editType:"calc"},pattern:cYt,editType:"calc"},lYt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:rm.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:sYt({editType:"plot"},{keys:BIe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:zIe({editType:"plot"}),hovertext:rm.hovertext,hoverinfo:NS({},aYt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:oYt({},{keys:BIe.eventDataKeys}),hovertemplatefallback:zIe(),textfont:rm.textfont,insidetextorientation:rm.insidetextorientation,insidetextfont:rm.insidetextfont,outsidetextfont:NS({},rm.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:rm.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:uYt({name:"sunburst",trace:!0,editType:"calc"})}});var VZ=W((SUr,OIe)=>{"use strict";OIe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var GIe=W((EUr,VIe)=>{"use strict";var NIe=it(),fYt=US(),hYt=us().defaults,dYt=E0().handleText,pYt=ab().handleMarkerDefaults,UIe=Jo(),vYt=UIe.hasColorscale,gYt=UIe.handleDefaults;VIe.exports=function(t,r,i,n){function a(h,d){return NIe.coerce(t,r,fYt,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),pYt(t,r,n,a);var u=r._hasColorscale=vYt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&gYt(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",NIe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";dYt(t,r,n,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),hYt(r,n,a),r._length=null}});var jIe=W((kUr,HIe)=>{"use strict";var mYt=it(),yYt=VZ();HIe.exports=function(t,r){function i(n,a){return mYt.coerce(t,r,yYt,n,a)}i("sunburstcolorway",r.colorway),i("extendsunburstcolors")}});var VS=W((VP,$Ie)=>{(function(e,t){typeof VP=="object"&&typeof $Ie!="undefined"?t(VP):(e=e||self,t(e.d3=e.d3||{}))})(VP,function(e){"use strict";function t(Ne,Ue){return Ne.parent===Ue.parent?1:2}function r(Ne){return Ne.reduce(i,0)/Ne.length}function i(Ne,Ue){return Ne+Ue.x}function n(Ne){return 1+Ne.reduce(a,0)}function a(Ne,Ue){return Math.max(Ne,Ue.y)}function o(Ne){for(var Ue;Ue=Ne.children;)Ne=Ue[0];return Ne}function s(Ne){for(var Ue;Ue=Ne.children;)Ne=Ue[Ue.length-1];return Ne}function l(){var Ne=t,Ue=1,Ge=1,je=!1;function Re(Ve){var ct,Tt=0;Ve.eachAfter(function(Bt){var Zt=Bt.children;Zt?(Bt.x=r(Zt),Bt.y=n(Zt)):(Bt.x=ct?Tt+=Ne(Bt,ct):0,Bt.y=0,ct=Bt)});var Xt=o(Ve),Vt=s(Ve),lr=Xt.x-Ne(Xt,Vt)/2,ur=Vt.x+Ne(Vt,Xt)/2;return Ve.eachAfter(je?function(Bt){Bt.x=(Bt.x-Ve.x)*Ue,Bt.y=(Ve.y-Bt.y)*Ge}:function(Bt){Bt.x=(Bt.x-lr)/(ur-lr)*Ue,Bt.y=(1-(Ve.y?Bt.y/Ve.y:1))*Ge})}return Re.separation=function(Ve){return arguments.length?(Ne=Ve,Re):Ne},Re.size=function(Ve){return arguments.length?(je=!1,Ue=+Ve[0],Ge=+Ve[1],Re):je?null:[Ue,Ge]},Re.nodeSize=function(Ve){return arguments.length?(je=!0,Ue=+Ve[0],Ge=+Ve[1],Re):je?[Ue,Ge]:null},Re}function u(Ne){var Ue=0,Ge=Ne.children,je=Ge&&Ge.length;if(!je)Ue=1;else for(;--je>=0;)Ue+=Ge[je].value;Ne.value=Ue}function c(){return this.eachAfter(u)}function f(Ne){var Ue=this,Ge,je=[Ue],Re,Ve,ct;do for(Ge=je.reverse(),je=[];Ue=Ge.pop();)if(Ne(Ue),Re=Ue.children,Re)for(Ve=0,ct=Re.length;Ve=0;--Re)Ge.push(je[Re]);return this}function d(Ne){for(var Ue=this,Ge=[Ue],je=[],Re,Ve,ct;Ue=Ge.pop();)if(je.push(Ue),Re=Ue.children,Re)for(Ve=0,ct=Re.length;Ve=0;)Ge+=je[Re].value;Ue.value=Ge})}function v(Ne){return this.eachBefore(function(Ue){Ue.children&&Ue.children.sort(Ne)})}function m(Ne){for(var Ue=this,Ge=g(Ue,Ne),je=[Ue];Ue!==Ge;)Ue=Ue.parent,je.push(Ue);for(var Re=je.length;Ne!==Ge;)je.splice(Re,0,Ne),Ne=Ne.parent;return je}function g(Ne,Ue){if(Ne===Ue)return Ne;var Ge=Ne.ancestors(),je=Ue.ancestors(),Re=null;for(Ne=Ge.pop(),Ue=je.pop();Ne===Ue;)Re=Ne,Ne=Ge.pop(),Ue=je.pop();return Re}function w(){for(var Ne=this,Ue=[Ne];Ne=Ne.parent;)Ue.push(Ne);return Ue}function b(){var Ne=[];return this.each(function(Ue){Ne.push(Ue)}),Ne}function _(){var Ne=[];return this.eachBefore(function(Ue){Ue.children||Ne.push(Ue)}),Ne}function M(){var Ne=this,Ue=[];return Ne.each(function(Ge){Ge!==Ne&&Ue.push({source:Ge.parent,target:Ge})}),Ue}function x(Ne,Ue){var Ge=new S(Ne),je=+Ne.value&&(Ge.value=Ne.value),Re,Ve=[Ge],ct,Tt,Xt,Vt;for(Ue==null&&(Ue=A);Re=Ve.pop();)if(je&&(Re.value=+Re.data.value),(Tt=Ue(Re.data))&&(Vt=Tt.length))for(Re.children=new Array(Vt),Xt=Vt-1;Xt>=0;--Xt)Ve.push(ct=Re.children[Xt]=new S(Tt[Xt])),ct.parent=Re,ct.depth=Re.depth+1;return Ge.eachBefore(E)}function T(){return x(this).eachBefore(y)}function A(Ne){return Ne.children}function y(Ne){Ne.data=Ne.data.data}function E(Ne){var Ue=0;do Ne.height=Ue;while((Ne=Ne.parent)&&Ne.height<++Ue)}function S(Ne){this.data=Ne,this.depth=this.height=0,this.parent=null}S.prototype=x.prototype={constructor:S,count:c,each:f,eachAfter:d,eachBefore:h,sum:p,sort:v,path:m,ancestors:w,descendants:b,leaves:_,links:M,copy:T};var C=Array.prototype.slice;function k(Ne){for(var Ue=Ne.length,Ge,je;Ue;)je=Math.random()*Ue--|0,Ge=Ne[Ue],Ne[Ue]=Ne[je],Ne[je]=Ge;return Ne}function D(Ne){for(var Ue=0,Ge=(Ne=k(C.call(Ne))).length,je=[],Re,Ve;Ue0&&Ge*Ge>je*je+Re*Re}function L(Ne,Ue){for(var Ge=0;GeXt?(Re=(Vt+Xt-Ve)/(2*Vt),Tt=Math.sqrt(Math.max(0,Xt/Vt-Re*Re)),Ge.x=Ne.x-Re*je-Tt*ct,Ge.y=Ne.y-Re*ct+Tt*je):(Re=(Vt+Ve-Xt)/(2*Vt),Tt=Math.sqrt(Math.max(0,Ve/Vt-Re*Re)),Ge.x=Ue.x+Re*je-Tt*ct,Ge.y=Ue.y+Re*ct+Tt*je)):(Ge.x=Ue.x+Ge.r,Ge.y=Ue.y)}function K(Ne,Ue){var Ge=Ne.r+Ue.r-1e-6,je=Ue.x-Ne.x,Re=Ue.y-Ne.y;return Ge>0&&Ge*Ge>je*je+Re*Re}function j(Ne){var Ue=Ne._,Ge=Ne.next._,je=Ue.r+Ge.r,Re=(Ue.x*Ge.r+Ge.x*Ue.r)/je,Ve=(Ue.y*Ge.r+Ge.y*Ue.r)/je;return Re*Re+Ve*Ve}function q(Ne){this._=Ne,this.next=null,this.previous=null}function J(Ne){if(!(Re=Ne.length))return 0;var Ue,Ge,je,Re,Ve,ct,Tt,Xt,Vt,lr,ur;if(Ue=Ne[0],Ue.x=0,Ue.y=0,!(Re>1))return Ue.r;if(Ge=Ne[1],Ue.x=-Ge.r,Ge.x=Ue.r,Ge.y=0,!(Re>2))return Ue.r+Ge.r;Y(Ge,Ue,je=Ne[2]),Ue=new q(Ue),Ge=new q(Ge),je=new q(je),Ue.next=je.previous=Ge,Ge.next=Ue.previous=je,je.next=Ge.previous=Ue;e:for(Tt=3;Tt0)throw new Error("cycle");return Tt}return Ge.id=function(je){return arguments.length?(Ne=X(je),Ge):Ne},Ge.parentId=function(je){return arguments.length?(Ue=X(je),Ge):Ue},Ge}function re(Ne,Ue){return Ne.parent===Ue.parent?1:2}function pe(Ne){var Ue=Ne.children;return Ue?Ue[0]:Ne.t}function we(Ne){var Ue=Ne.children;return Ue?Ue[Ue.length-1]:Ne.t}function Fe(Ne,Ue,Ge){var je=Ge/(Ue.i-Ne.i);Ue.c-=je,Ue.s+=Ge,Ne.c+=je,Ue.z+=Ge,Ue.m+=Ge}function Se(Ne){for(var Ue=0,Ge=0,je=Ne.children,Re=je.length,Ve;--Re>=0;)Ve=je[Re],Ve.z+=Ue,Ve.m+=Ue,Ue+=Ve.s+(Ge+=Ve.c)}function ke(Ne,Ue,Ge){return Ne.a.parent===Ue.parent?Ne.a:Ge}function _e(Ne,Ue){this._=Ne,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=Ue}_e.prototype=Object.create(S.prototype);function Ie(Ne){for(var Ue=new _e(Ne,0),Ge,je=[Ue],Re,Ve,ct,Tt;Ge=je.pop();)if(Ve=Ge._.children)for(Ge.children=new Array(Tt=Ve.length),ct=Tt-1;ct>=0;--ct)je.push(Re=Ge.children[ct]=new _e(Ve[ct],ct)),Re.parent=Ge;return(Ue.parent=new _e(null,0)).children=[Ue],Ue}function Oe(){var Ne=re,Ue=1,Ge=1,je=null;function Re(Vt){var lr=Ie(Vt);if(lr.eachAfter(Ve),lr.parent.m=-lr.z,lr.eachBefore(ct),je)Vt.eachBefore(Xt);else{var ur=Vt,Bt=Vt,Zt=Vt;Vt.eachBefore(function(xt){xt.xBt.x&&(Bt=xt),xt.depth>Zt.depth&&(Zt=xt)});var kr=ur===Bt?1:Ne(ur,Bt)/2,$e=kr-ur.x,tt=Ue/(Bt.x+kr+$e),st=Ge/(Zt.depth||1);Vt.eachBefore(function(xt){xt.x=(xt.x+$e)*tt,xt.y=xt.depth*st})}return Vt}function Ve(Vt){var lr=Vt.children,ur=Vt.parent.children,Bt=Vt.i?ur[Vt.i-1]:null;if(lr){Se(Vt);var Zt=(lr[0].z+lr[lr.length-1].z)/2;Bt?(Vt.z=Bt.z+Ne(Vt._,Bt._),Vt.m=Vt.z-Zt):Vt.z=Zt}else Bt&&(Vt.z=Bt.z+Ne(Vt._,Bt._));Vt.parent.A=Tt(Vt,Bt,Vt.parent.A||ur[0])}function ct(Vt){Vt._.x=Vt.z+Vt.parent.m,Vt.m+=Vt.parent.m}function Tt(Vt,lr,ur){if(lr){for(var Bt=Vt,Zt=Vt,kr=lr,$e=Bt.parent.children[0],tt=Bt.m,st=Zt.m,xt=kr.m,Je=$e.m,Ct;kr=we(kr),Bt=pe(Bt),kr&&Bt;)$e=pe($e),Zt=we(Zt),Zt.a=Vt,Ct=kr.z+xt-Bt.z-tt+Ne(kr._,Bt._),Ct>0&&(Fe(ke(kr,Vt,ur),Vt,Ct),tt+=Ct,st+=Ct),xt+=kr.m,tt+=Bt.m,Je+=$e.m,st+=Zt.m;kr&&!we(Zt)&&(Zt.t=kr,Zt.m+=xt-st),Bt&&!pe($e)&&($e.t=Bt,$e.m+=tt-Je,ur=Vt)}return ur}function Xt(Vt){Vt.x*=Ue,Vt.y=Vt.depth*Ge}return Re.separation=function(Vt){return arguments.length?(Ne=Vt,Re):Ne},Re.size=function(Vt){return arguments.length?(je=!1,Ue=+Vt[0],Ge=+Vt[1],Re):je?null:[Ue,Ge]},Re.nodeSize=function(Vt){return arguments.length?(je=!0,Ue=+Vt[0],Ge=+Vt[1],Re):je?[Ue,Ge]:null},Re}function Qe(Ne,Ue,Ge,je,Re){for(var Ve=Ne.children,ct,Tt=-1,Xt=Ve.length,Vt=Ne.value&&(Re-Ge)/Ne.value;++Ttxt&&(xt=Vt),hr=tt*tt*ir,Je=Math.max(xt/hr,hr/st),Je>Ct){tt-=Vt;break}Ct=Je}ct.push(Xt={value:tt,dice:Zt1?je:1)},Ge})(et);function vt(){var Ne=ut,Ue=!1,Ge=1,je=1,Re=[0],Ve=H,ct=H,Tt=H,Xt=H,Vt=H;function lr(Bt){return Bt.x0=Bt.y0=0,Bt.x1=Ge,Bt.y1=je,Bt.eachBefore(ur),Re=[0],Ue&&Bt.eachBefore(be),Bt}function ur(Bt){var Zt=Re[Bt.depth],kr=Bt.x0+Zt,$e=Bt.y0+Zt,tt=Bt.x1-Zt,st=Bt.y1-Zt;tt=Bt-1){var xt=Ve[ur];xt.x0=kr,xt.y0=$e,xt.x1=tt,xt.y1=st;return}for(var Je=Vt[ur],Ct=Zt/2+Je,ir=ur+1,hr=Bt-1;ir>>1;Vt[Ur]st-$e){var Lr=(kr*ei+tt*si)/Zt;lr(ur,ir,si,kr,$e,Lr,st),lr(ir,Bt,ei,Lr,$e,tt,st)}else{var $i=($e*ei+st*si)/Zt;lr(ur,ir,si,kr,$e,tt,$i),lr(ir,Bt,ei,kr,$i,tt,st)}}}function mt(Ne,Ue,Ge,je,Re){(Ne.depth&1?Qe:he)(Ne,Ue,Ge,je,Re)}var bt=(function Ne(Ue){function Ge(je,Re,Ve,ct,Tt){if((Xt=je._squarify)&&Xt.ratio===Ue)for(var Xt,Vt,lr,ur,Bt=-1,Zt,kr=Xt.length,$e=je.value;++Bt1?je:1)},Ge})(et);e.cluster=l,e.hierarchy=x,e.pack=te,e.packEnclose=D,e.packSiblings=U,e.partition=oe,e.stratify=xe,e.tree=Oe,e.treemap=vt,e.treemapBinary=Xe,e.treemapDice=he,e.treemapResquarify=bt,e.treemapSlice=Qe,e.treemapSliceDice=mt,e.treemapSquarify=ut,Object.defineProperty(e,"__esModule",{value:!0})})});var HS=W(GS=>{"use strict";var WIe=VS(),xYt=sn(),l4=it(),_Yt=Jo().makeColorScaleFuncFromTrace,bYt=a4().makePullColorFn,wYt=a4().generateExtendedColors,TYt=Jo().calc,AYt=Kn().ALMOST_EQUAL,MYt={},SYt={},EYt={};GS.calc=function(e,t){var r=e._fullLayout,i=t.ids,n=l4.isArrayOrTypedArray(i),a=t.labels,o=t.parents,s=t.values,l=l4.isArrayOrTypedArray(s),u=[],c={},f={},h=function(R,L){c[R]?c[R].push(L):c[R]=[L],f[L]=1},d=function(R){return R||typeof R=="number"},p=function(R){return!l||xYt(s[R])&&s[R]>=0},v,m,g;n?(v=Math.min(i.length,o.length),m=function(R){return d(i[R])&&p(R)},g=function(R){return String(i[R])}):(v=Math.min(a.length,o.length),m=function(R){return d(a[R])&&p(R)},g=function(R){return String(a[R])}),l&&(v=Math.min(v,s.length));for(var w=0;w1){for(var A=l4.randstr(),y=0;y{});function I1(){}function ZIe(){return this.rgb().formatHex()}function RYt(){return this.rgb().formatHex8()}function zYt(){return iRe(this).formatHsl()}function KIe(){return this.rgb().formatRgb()}function g2(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kYt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?JIe(t):r===3?new Bu(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?HP(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?HP(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=CYt.exec(e))?new Bu(t[1],t[2],t[3],1):(t=DYt.exec(e))?new Bu(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FYt.exec(e))?HP(t[1],t[2],t[3],t[4]):(t=LYt.exec(e))?HP(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PYt.exec(e))?tRe(t[1],t[2]/100,t[3]/100,1):(t=IYt.exec(e))?tRe(t[1],t[2]/100,t[3]/100,t[4]):XIe.hasOwnProperty(e)?JIe(XIe[e]):e==="transparent"?new Bu(NaN,NaN,NaN,0):null}function JIe(e){return new Bu(e>>16&255,e>>8&255,e&255,1)}function HP(e,t,r,i){return i<=0&&(e=t=r=NaN),new Bu(e,t,r,i)}function $S(e){return e instanceof I1||(e=g2(e)),e?(e=e.rgb(),new Bu(e.r,e.g,e.b,e.opacity)):new Bu}function c4(e,t,r,i){return arguments.length===1?$S(e):new Bu(e,t,r,i==null?1:i)}function Bu(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function QIe(){return`#${ob(this.r)}${ob(this.g)}${ob(this.b)}`}function BYt(){return`#${ob(this.r)}${ob(this.g)}${ob(this.b)}${ob((isNaN(this.opacity)?1:this.opacity)*255)}`}function eRe(){let e=$P(this.opacity);return`${e===1?"rgb(":"rgba("}${sb(this.r)}, ${sb(this.g)}, ${sb(this.b)}${e===1?")":`, ${e})`}`}function $P(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ob(e){return e=sb(e),(e<16?"0":"")+e.toString(16)}function tRe(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new lv(e,t,r,i)}function iRe(e){if(e instanceof lv)return new lv(e.h,e.s,e.l,e.opacity);if(e instanceof I1||(e=g2(e)),!e)return new lv;if(e instanceof lv)return e;e=e.rgb();var t=e.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?(t===a?o=(r-i)/s+(r0&&l<1?0:o,new lv(o,s,l,e.opacity)}function WS(e,t,r,i){return arguments.length===1?iRe(e):new lv(e,t,r,i==null?1:i)}function lv(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function rRe(e){return e=(e||0)%360,e<0?e+360:e}function jP(e){return Math.max(0,Math.min(1,e||0))}function GZ(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 v2,lb,u4,jS,P1,kYt,CYt,DYt,FYt,LYt,PYt,IYt,XIe,WP=Ea(()=>{GP();v2=.7,lb=1/v2,u4="\\s*([+-]?\\d+)\\s*",jS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",P1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kYt=/^#([0-9a-f]{3,8})$/,CYt=new RegExp(`^rgb\\(${u4},${u4},${u4}\\)$`),DYt=new RegExp(`^rgb\\(${P1},${P1},${P1}\\)$`),FYt=new RegExp(`^rgba\\(${u4},${u4},${u4},${jS}\\)$`),LYt=new RegExp(`^rgba\\(${P1},${P1},${P1},${jS}\\)$`),PYt=new RegExp(`^hsl\\(${jS},${P1},${P1}\\)$`),IYt=new RegExp(`^hsla\\(${jS},${P1},${P1},${jS}\\)$`),XIe={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};im(I1,g2,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ZIe,formatHex:ZIe,formatHex8:RYt,formatHsl:zYt,formatRgb:KIe,toString:KIe});im(Bu,c4,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new Bu(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new Bu(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bu(sb(this.r),sb(this.g),sb(this.b),$P(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:QIe,formatHex:QIe,formatHex8:BYt,formatRgb:eRe,toString:eRe}));im(lv,WS,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new lv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new lv(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 Bu(GZ(e>=240?e-240:e+120,n,i),GZ(e,n,i),GZ(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new lv(rRe(this.h),jP(this.s),jP(this.l),$P(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=$P(this.opacity);return`${e===1?"hsl(":"hsla("}${rRe(this.h)}, ${jP(this.s)*100}%, ${jP(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var YP,XP,HZ=Ea(()=>{YP=Math.PI/180,XP=180/Math.PI});function uRe(e){if(e instanceof R1)return new R1(e.l,e.a,e.b,e.opacity);if(e instanceof nm)return cRe(e);e instanceof Bu||(e=$S(e));var t=YZ(e.r),r=YZ(e.g),i=YZ(e.b),n=jZ((.2225045*t+.7168786*r+.0606169*i)/aRe),a,o;return t===r&&r===i?a=o=n:(a=jZ((.4360747*t+.3850649*r+.1430804*i)/nRe),o=jZ((.0139322*t+.0971045*r+.7141733*i)/oRe)),new R1(116*n-16,500*(a-n),200*(n-o),e.opacity)}function h4(e,t,r,i){return arguments.length===1?uRe(e):new R1(e,t,r,i==null?1:i)}function R1(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function jZ(e){return e>qYt?Math.pow(e,1/3):e/lRe+sRe}function $Z(e){return e>f4?e*e*e:lRe*(e-sRe)}function WZ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function YZ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function OYt(e){if(e instanceof nm)return new nm(e.h,e.c,e.l,e.opacity);if(e instanceof R1||(e=uRe(e)),e.a===0&&e.b===0)return new nm(NaN,0{GP();WP();HZ();ZP=18,nRe=.96422,aRe=1,oRe=.82521,sRe=4/29,f4=6/29,lRe=3*f4*f4,qYt=f4*f4*f4;im(R1,h4,p2(I1,{brighter(e){return new R1(this.l+ZP*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new R1(this.l-ZP*(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=nRe*$Z(t),e=aRe*$Z(e),r=oRe*$Z(r),new Bu(WZ(3.1338561*t-1.6168667*e-.4906146*r),WZ(-.9787684*t+1.9161415*e+.033454*r),WZ(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));im(nm,YS,p2(I1,{brighter(e){return new nm(this.h,this.c,this.l+ZP*(e==null?1:e),this.opacity)},darker(e){return new nm(this.h,this.c,this.l-ZP*(e==null?1:e),this.opacity)},rgb(){return cRe(this).rgb()}}))});function NYt(e){if(e instanceof ub)return new ub(e.h,e.s,e.l,e.opacity);e instanceof Bu||(e=$S(e));var t=e.r/255,r=e.g/255,i=e.b/255,n=(pRe*i+hRe*t-dRe*r)/(pRe+hRe-dRe),a=i-n,o=(XS*(r-n)-ZZ*a)/KP,s=Math.sqrt(o*o+a*a)/(XS*n*(1-n)),l=s?Math.atan2(o,a)*XP-120:NaN;return new ub(l<0?l+360:l,s,n,e.opacity)}function d4(e,t,r,i){return arguments.length===1?NYt(e):new ub(e,t,r,i==null?1:i)}function ub(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}var vRe,XZ,ZZ,KP,XS,hRe,dRe,pRe,gRe=Ea(()=>{GP();WP();HZ();vRe=-.14861,XZ=1.78277,ZZ=-.29227,KP=-.90649,XS=1.97294,hRe=XS*KP,dRe=XS*XZ,pRe=XZ*ZZ-KP*vRe;im(ub,d4,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new ub(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new ub(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*YP,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),n=Math.sin(e);return new Bu(255*(t+r*(vRe*i+XZ*n)),255*(t+r*(ZZ*i+KP*n)),255*(t+r*(XS*i)),this.opacity)}}))});var cb=Ea(()=>{WP();fRe();gRe()});function KZ(e,t,r,i,n){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*i+o*n)/6}function JP(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=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{});function eI(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],a=e[i%t],o=e[(i+1)%t],s=e[(i+2)%t];return KZ((r-i/t)*t,n,a,o,s)}}var JZ=Ea(()=>{QP()});var p4,QZ=Ea(()=>{p4=e=>()=>e});function mRe(e,t){return function(r){return e+r*t}}function UYt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function m2(e,t){var r=t-e;return r?mRe(e,r>180||r<-180?r-360*Math.round(r/360):r):p4(isNaN(e)?t:e)}function yRe(e){return(e=+e)==1?vl:function(t,r){return r-t?UYt(t,r,e):p4(isNaN(t)?r:t)}}function vl(e,t){var r=t-e;return r?mRe(e,r):p4(isNaN(e)?t:e)}var fb=Ea(()=>{QZ()});function xRe(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),o,s;for(o=0;o{cb();QP();JZ();fb();ZS=(function e(t){var r=yRe(t);function i(n,a){var o=r((n=c4(n)).r,(a=c4(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),u=vl(n.opacity,a.opacity);return function(c){return n.r=o(c),n.g=s(c),n.b=l(c),n.opacity=u(c),n+""}}return i.gamma=e,i})(1);_Re=xRe(JP),bRe=xRe(eI)});function v4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n{});function wRe(e,t){return(tI(t)?v4:tK)(e,t)}function tK(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o{KS();rI()});function iI(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}var iK=Ea(()=>{});function $h(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var JS=Ea(()=>{});function nI(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=y2(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var nK=Ea(()=>{KS()});function VYt(e){return function(){return e}}function GYt(e){return function(t){return e(t)+""}}function aI(e,t){var r=oK.lastIndex=aK.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=oK.exec(e))&&(n=aK.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:$h(i,n)})),r=aK.lastIndex;return r{JS();oK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aK=new RegExp(oK.source,"g")});function y2(e,t){var r=typeof t,i;return t==null||r==="boolean"?p4(t):(r==="number"?$h:r==="string"?(i=g2(t))?(t=i,ZS):aI:t instanceof g2?ZS:t instanceof Date?iI:tI(t)?v4:Array.isArray(t)?tK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nI:$h)(e,t)}var KS=Ea(()=>{cb();eK();rK();iK();JS();nK();sK();QZ();rI()});function TRe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var ARe=Ea(()=>{});function MRe(e,t){var r=m2(+e,+t);return function(i){var n=r(i);return n-360*Math.floor(n/360)}}var SRe=Ea(()=>{fb()});function ERe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var kRe=Ea(()=>{});function lK(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i{CRe=180/Math.PI,oI={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function FRe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?oI:lK(t.a,t.b,t.c,t.d,t.e,t.f)}function LRe(e){return e==null?oI:(sI||(sI=document.createElementNS("http://www.w3.org/2000/svg","g")),sI.setAttribute("transform",e),(e=sI.transform.baseVal.consolidate())?(e=e.matrix,lK(e.a,e.b,e.c,e.d,e.e,e.f)):oI)}var sI,PRe=Ea(()=>{DRe()});function IRe(e,t,r,i){function n(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push("translate(",null,t,null,r);p.push({i:v-4,x:$h(u,f)},{i:v-2,x:$h(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(n(f)+"rotate(",null,i)-2,x:$h(u,c)})):c&&f.push(n(f)+"rotate("+c+i)}function s(u,c,f,h){u!==c?h.push({i:f.push(n(f)+"skewX(",null,i)-2,x:$h(u,c)}):c&&f.push(n(f)+"skewX("+c+i)}function l(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push(n(d)+"scale(",null,",",null,")");p.push({i:v-4,x:$h(u,f)},{i:v-2,x:$h(c,h)})}else(f!==1||h!==1)&&d.push(n(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var p=-1,v=h.length,m;++p{JS();PRe();RRe=IRe(FRe,"px, ","px)","deg)"),zRe=IRe(LRe,", ",")",")")});function qRe(e){return((e=Math.exp(e))+1/e)/2}function jYt(e){return((e=Math.exp(e))-1/e)/2}function $Yt(e){return((e=Math.exp(2*e))-1)/(e+1)}var HYt,ORe,NRe=Ea(()=>{HYt=1e-12;ORe=(function e(t,r,i){function n(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,p=f-l,v=d*d+p*p,m,g;if(v{cb();fb();VRe=URe(m2),GRe=URe(vl)});function uK(e,t){var r=vl((e=h4(e)).l,(t=h4(t)).l),i=vl(e.a,t.a),n=vl(e.b,t.b),a=vl(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=i(o),e.b=n(o),e.opacity=a(o),e+""}}var jRe=Ea(()=>{cb();fb()});function $Re(e){return function(t,r){var i=e((t=YS(t)).h,(r=YS(r)).h),n=vl(t.c,r.c),a=vl(t.l,r.l),o=vl(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=n(s),t.l=a(s),t.opacity=o(s),t+""}}}var WRe,YRe,XRe=Ea(()=>{cb();fb();WRe=$Re(m2),YRe=$Re(vl)});function ZRe(e){return(function t(r){r=+r;function i(n,a){var o=e((n=d4(n)).h,(a=d4(a)).h),s=vl(n.s,a.s),l=vl(n.l,a.l),u=vl(n.opacity,a.opacity);return function(c){return n.h=o(c),n.s=s(c),n.l=l(Math.pow(c,r)),n.opacity=u(c),n+""}}return i.gamma=t,i})(1)}var KRe,JRe,QRe=Ea(()=>{cb();fb();KRe=ZRe(m2),JRe=ZRe(vl)});function cK(e,t){t===void 0&&(t=e,e=y2);for(var r=0,i=t.length-1,n=t[0],a=new Array(i<0?0:i);r{KS()});function tze(e,t){for(var r=new Array(t),i=0;i{});var hb={};Fp(hb,{interpolate:()=>y2,interpolateArray:()=>wRe,interpolateBasis:()=>JP,interpolateBasisClosed:()=>eI,interpolateCubehelix:()=>KRe,interpolateCubehelixLong:()=>JRe,interpolateDate:()=>iI,interpolateDiscrete:()=>TRe,interpolateHcl:()=>WRe,interpolateHclLong:()=>YRe,interpolateHsl:()=>VRe,interpolateHslLong:()=>GRe,interpolateHue:()=>MRe,interpolateLab:()=>uK,interpolateNumber:()=>$h,interpolateNumberArray:()=>v4,interpolateObject:()=>nI,interpolateRgb:()=>ZS,interpolateRgbBasis:()=>_Re,interpolateRgbBasisClosed:()=>bRe,interpolateRound:()=>ERe,interpolateString:()=>aI,interpolateTransformCss:()=>RRe,interpolateTransformSvg:()=>zRe,interpolateZoom:()=>ORe,piecewise:()=>cK,quantize:()=>tze});var db=Ea(()=>{KS();rK();QP();JZ();iK();ARe();SRe();JS();rI();nK();kRe();sK();BRe();NRe();eK();HRe();jRe();XRe();QRe();eze();rze()});var lI=W((yGr,ize)=>{"use strict";var WYt=Ji(),YYt=ni();ize.exports=function(t,r,i,n,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=i.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),WYt.pointStyle(t,i,n,r)}else YYt.fill(t,l)}});var fK=W((xGr,lze)=>{"use strict";var nze=vi(),aze=ni(),oze=it(),XYt=Qc().resizeText,ZYt=lI();function KYt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");XYt(e,t,"sunburst"),t.each(function(r){var i=nze.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){nze.select(this).call(sze,o,a,e)})})}function sze(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=oze.castOption(r,o,"marker.line.color")||aze.defaultLine,l=oze.castOption(r,o,"marker.line.width")||0;e.call(ZYt,t,r,i).style("stroke-width",l).call(aze.stroke,s).style("opacity",a?r.leaf.opacity:null)}lze.exports={style:KYt,styleOne:sze}});var am=W(na=>{"use strict";var pb=it(),JYt=ni(),QYt=Np(),uze=Ly();na.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(i){if(na.getPtId(i)===t)return r=i.copy()}),r||e};na.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(i){for(var n=i.children||[],a=0;a0)};na.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};na.isHeader=function(e,t){return!(na.isLeaf(e)||e.depth===t._maxDepth-1)};function cze(e){return e.data.data.pid}na.getParent=function(e,t){return na.findEntryWithLevel(e,cze(t))};na.listPath=function(e,t){var r=e.parent;if(!r)return[];var i=t?[r.data[t]]:[r];return na.listPath(r,t).concat(i)};na.getPath=function(e){return na.listPath(e,"label").join("/")+"/"};na.formatValue=uze.formatPieValue;na.formatPercent=function(e,t){var r=pb.formatPercent(e,0);return r==="0%"&&(r=uze.formatPiePercent(e,t)),r}});var tE=W((bGr,dze)=>{"use strict";var g4=vi(),fze=yi(),rXt=Kf().appendArrayPointValue,QS=Ds(),hze=it(),iXt=lw(),hu=am(),nXt=Ly(),aXt=nXt.formatPieValue;dze.exports=function(t,r,i,n,a){var o=n[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 v=i._fullLayout;if(!(i._dragging||v.hovermode===!1)){var m=i._fullData[s.index],g=p.data.data,w=g.i,b=hu.isHierarchyRoot(p),_=hu.getParent(l,p),M=hu.getValue(p),x=function(Y){return hze.castOption(m,w,Y)},T=x("hovertemplate"),A=QS.castHoverinfo(m,v,w),y=v.separators,E;if(T||A&&A!=="none"&&A!=="skip"){var S,C;u&&(S=o.cx+p.pxmid[0]*(1-p.rInscribed),C=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(S=p._hoverX,C=p._hoverY);var k={},D=[],F=[],P=function(Y){return D.indexOf(Y)!==-1};A&&(D=A==="all"?m._module.attributes.hoverinfo.flags:A.split("+")),k.label=g.label,P("label")&&k.label&&F.push(k.label),g.hasOwnProperty("v")&&(k.value=g.v,k.valueLabel=aXt(k.value,y),P("value")&&F.push(k.valueLabel)),k.currentPath=p.currentPath=hu.getPath(p.data),P("current path")&&!b&&F.push(k.currentPath);var R,L=[],I=function(){L.indexOf(R)===-1&&(F.push(R),L.push(R))};k.percentParent=p.percentParent=M/hu.getValue(_),k.parent=p.parentString=hu.getPtLabel(_),P("percent parent")&&(R=hu.formatPercent(k.percentParent,y)+" of "+k.parent,I()),k.percentEntry=p.percentEntry=M/hu.getValue(r),k.entry=p.entry=hu.getPtLabel(r),P("percent entry")&&!b&&!p.onPathbar&&(R=hu.formatPercent(k.percentEntry,y)+" of "+k.entry,I()),k.percentRoot=p.percentRoot=M/hu.getValue(l),k.root=p.root=hu.getPtLabel(l),P("percent root")&&!b&&(R=hu.formatPercent(k.percentRoot,y)+" of "+k.root,I()),k.text=x("hovertext")||x("text"),P("text")&&(R=k.text,hze.isValidTextValue(R)&&F.push(R)),E=[eE(p,m,a.eventDataKeys)];var B={trace:m,y:C,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:F.join("
"),name:T||P("name")?m.name:void 0,color:x("hoverlabel.bgcolor")||g.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:k,eventData:E};u&&(B.x0=S-p.rInscribed*p.rpx1,B.x1=S+p.rInscribed*p.rpx1,B.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(B.x=S,B.idealAlign=S<0?"left":"right");var O=[];QS.loneHover(B,{container:v._hoverlayer.node(),outerContainer:v._paper.node(),gd:i,inOut_bbox:O}),E[0].bbox=O[0],s._hasHoverLabel=!0}if(c){var $=t.select("path.surface");a.styleOne($,p,m,i,{hovered:!0})}s._hasHoverEvent=!0,i.emit("plotly_hover",{points:E||[eE(p,m,a.eventDataKeys)],event:g4.event})}},h=function(p){var v=i._fullLayout,m=i._fullData[s.index],g=g4.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=g4.event,i.emit("plotly_unhover",{points:[eE(g,m,a.eventDataKeys)],event:g4.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(QS.loneUnhover(v._hoverlayer.node()),s._hasHoverLabel=!1),c){var w=t.select("path.surface");a.styleOne(w,g,m,i,{hovered:!1})}},d=function(p){var v=i._fullLayout,m=i._fullData[s.index],g=u&&(hu.isHierarchyRoot(p)||hu.isLeaf(p)),w=hu.getPtId(p),b=hu.isEntry(p)?hu.findEntryWithChild(l,w):hu.findEntryWithLevel(l,w),_=hu.getPtId(b),M={points:[eE(p,m,a.eventDataKeys)],event:g4.event};g||(M.nextLevel=_);var x=iXt.triggerHandler(i,"plotly_"+s.type+"click",M);if(x!==!1&&v.hovermode&&(i._hoverdata=[eE(p,m,a.eventDataKeys)],QS.click(i,g4.event)),!g&&x!==!1&&!i._dragging&&!i._transitioning){fze.call("_storeDirectGUIEdit",m,v._tracePreGUI[m.uid],{level:m.level});var T={data:[{level:_}],traces:[s.index]},A={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};QS.loneUnhover(v._hoverlayer.node()),fze.call("animate",i,T,A)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function eE(e,t,r){for(var i=e.data.data,n={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},a=0;a{"use strict";var rE=vi(),oXt=VS(),uv=(db(),Go(hb)).interpolate,pze=Ji(),nf=it(),sXt=uo(),yze=Qc(),vze=yze.recordMinTextSize,lXt=yze.clearMinTextSize,xze=UP(),uXt=Ly().getRotationAngle,cXt=xze.computeTransform,fXt=xze.transformInsideText,hXt=fK().styleOne,dXt=Ed().resizeText,pXt=tE(),hK=UZ(),Ia=am();uI.plot=function(e,t,r,i){var n=e._fullLayout,a=n._sunburstlayer,o,s,l=!r,u=!n.uniformtext.mode&&Ia.hasTransition(r);if(lXt("sunburst",n),o=a.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){i&&(s=i());var c=rE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){gze(e,f,this,r)})})}else o.each(function(f){gze(e,f,this,r)}),n.uniformtext.mode&&dXt(e,n._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function gze(e,t,r,i){var n=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Ia.hasTransition(i),s=rE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Ia.findEntryWithLevel(f,c.level),d=Ia.getMaxDepth(c),p=a._size,v=c.domain,m=p.w*(v.x[1]-v.x[0]),g=p.h*(v.y[1]-v.y[0]),w=.5*Math.min(m,g),b=u.cx=p.l+p.w*(v.x[1]+v.x[0])/2,_=u.cy=p.t+p.h*(1-v.y[0])-g/2;if(!h)return l.remove();var M=null,x={};o&&l.each(function(j){x[Ia.getPtId(j)]={rpx0:j.rpx0,rpx1:j.rpx1,x0:j.x0,x1:j.x1,transform:j.transform},!M&&Ia.isEntry(j)&&(M=j)});var T=vXt(h).descendants(),A=h.height+1,y=0,E=d;u.hasMultipleRoots&&Ia.isHierarchyRoot(h)&&(T=T.slice(1),A-=1,y=1,E+=1),T=T.filter(function(j){return j.y1<=E});var S=uXt(c.rotation);S&&T.forEach(function(j){j.x0+=S,j.x1+=S});var C=Math.min(A,d),k=function(j){return(j-y)/C*w},D=function(j,q){return[j*Math.cos(q),-j*Math.sin(q)]},F=function(j){return nf.pathAnnulus(j.rpx0,j.rpx1,j.x0,j.x1,b,_)},P=function(j){return b+mze(j)[0]*(j.transform.rCenter||0)+(j.transform.x||0)},R=function(j){return _+mze(j)[1]*(j.transform.rCenter||0)+(j.transform.y||0)};l=l.data(T,Ia.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var j=rE.select(this),q=j.select("path.surface");q.transition().attrTween("d",function(U){var V=O(U);return function(X){return F(V(X))}});var J=j.select("g.slicetext");J.attr("opacity",0)}).remove():l.exit().remove(),l.order();var L=null;if(o&&M){var I=Ia.getPtId(M);l.each(function(j){L===null&&Ia.getPtId(j)===I&&(L=j.x1)})}var B=l;o&&(B=B.transition().each("end",function(){var j=rE.select(this);Ia.setSliceCursor(j,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),B.each(function(j){var q=rE.select(this),J=nf.ensureSingle(q,"path","surface",function(Q){Q.style("pointer-events",n?"none":"all")});j.rpx0=k(j.y0),j.rpx1=k(j.y1),j.xmid=(j.x0+j.x1)/2,j.pxmid=D(j.rpx1,j.xmid),j.midangle=-(j.xmid-Math.PI/2),j.startangle=-(j.x0-Math.PI/2),j.stopangle=-(j.x1-Math.PI/2),j.halfangle=.5*Math.min(nf.angleDelta(j.x0,j.x1)||Math.PI,Math.PI),j.ring=1-j.rpx0/j.rpx1,j.rInscribed=gXt(j,c),o?J.transition().attrTween("d",function(Q){var te=$(Q);return function(ce){return F(te(ce))}}):J.attr("d",F),q.call(pXt,h,e,t,{eventDataKeys:hK.eventDataKeys,transitionTime:hK.CLICK_TRANSITION_TIME,transitionEasing:hK.CLICK_TRANSITION_EASING}).call(Ia.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),J.call(hXt,j,c,e);var U=nf.ensureSingle(q,"g","slicetext"),V=nf.ensureSingle(U,"text","",function(Q){Q.attr("data-notex",1)}),X=nf.ensureUniformFontSize(e,Ia.determineTextFont(c,j,a.font));V.text(uI.formatSliceLabel(j,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(pze.font,X).call(sXt.convertToTspans,e);var H=pze.bBox(V.node());j.transform=fXt(H,j,u),j.transform.targetX=P(j),j.transform.targetY=R(j);var G=function(Q,te){var ce=Q.transform;return cXt(ce,te),ce.fontSize=X.size,vze(c.type,ce,a),nf.getTextTransform(ce)};o?V.transition().attrTween("transform",function(Q){var te=Y(Q);return function(ce){return G(te(ce),H)}}):V.attr("transform",G(j,H))});function O(j){var q=Ia.getPtId(j),J=x[q],U=x[Ia.getPtId(h)],V;if(U){var X=(j.x1>U.x1?2*Math.PI:0)+S;V=j.rpx1L?2*Math.PI:0)+S;J={x0:V,x1:V}}else J={rpx0:w,rpx1:w},nf.extendFlat(J,K(j));else J={rpx0:0,rpx1:0};else J={x0:S,x1:S};return uv(J,U)}function Y(j){var q=x[Ia.getPtId(j)],J,U=j.transform;if(q)J=q;else if(J={rpx1:j.rpx1,transform:{textPosAngle:U.textPosAngle,scale:0,rotate:U.rotate,rCenter:U.rCenter,x:U.x,y:U.y}},M)if(j.parent)if(L){var V=j.x1>L?2*Math.PI:0;J.x0=J.x1=V}else nf.extendFlat(J,K(j));else J.x0=J.x1=S;else J.x0=J.x1=S;var X=uv(J.transform.textPosAngle,j.transform.textPosAngle),H=uv(J.rpx1,j.rpx1),G=uv(J.x0,j.x0),Q=uv(J.x1,j.x1),te=uv(J.transform.scale,U.scale),ce=uv(J.transform.rotate,U.rotate),ge=U.rCenter===0?3:J.transform.rCenter===0?1/3:1,Ce=uv(J.transform.rCenter,U.rCenter),be=function(he){return Ce(Math.pow(he,ge))};return function(he){var oe=H(he),Ee=G(he),ye=Q(he),ue=be(he),ee=D(oe,(Ee+ye)/2),ae=X(he),xe={pxmid:ee,rpx1:oe,transform:{textPosAngle:ae,rCenter:ue,x:U.x,y:U.y}};return vze(c.type,U,a),{transform:{targetX:P(xe),targetY:R(xe),scale:te(he),rotate:ce(he),rCenter:ue}}}}function K(j){var q=j.parent,J=x[Ia.getPtId(q)],U={};if(J){var V=q.children,X=V.indexOf(j),H=V.length,G=uv(J.x0,J.x1);U.x0=G(X/H),U.x1=G(X/H)}else U.x0=U.x1=0;return U}}function vXt(e){return oXt.partition().size([2*Math.PI,e.height+1])(e)}uI.formatSliceLabel=function(e,t,r,i,n){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=n.separators,l=i[0],u=e.data.data,c=l.hierarchy,f=Ia.isHierarchyRoot(e),h=Ia.getParent(c,e),d=Ia.getValue(e);if(!a){var p=o.split("+"),v=function(y){return p.indexOf(y)!==-1},m=[],g;if(v("label")&&u.label&&m.push(u.label),u.hasOwnProperty("v")&&v("value")&&m.push(Ia.formatValue(u.v,s)),!f){v("current path")&&m.push(Ia.getPath(e.data));var w=0;v("percent parent")&&w++,v("percent entry")&&w++,v("percent root")&&w++;var b=w>1;if(w){var _,M=function(y){g=Ia.formatPercent(_,s),b&&(g+=" of "+y),m.push(g)};v("percent parent")&&!f&&(_=d/Ia.getValue(h),M("parent")),v("percent entry")&&(_=d/Ia.getValue(t),M("entry")),v("percent root")&&(_=d/Ia.getValue(c),M("root"))}}return v("text")&&(g=nf.castOption(r,u.i,"text"),nf.isValidTextValue(g)&&m.push(g)),m.join("
")}var x=nf.castOption(r,u.i,"texttemplate");if(!x)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=Ia.formatValue(u.v,s)),T.currentPath=Ia.getPath(e.data),f||(T.percentParent=d/Ia.getValue(h),T.percentParentLabel=Ia.formatPercent(T.percentParent,s),T.parent=Ia.getPtLabel(h)),T.percentEntry=d/Ia.getValue(t),T.percentEntryLabel=Ia.formatPercent(T.percentEntry,s),T.entry=Ia.getPtLabel(t),T.percentRoot=d/Ia.getValue(c),T.percentRootLabel=Ia.formatPercent(T.percentRoot,s),T.root=Ia.getPtLabel(c),u.hasOwnProperty("color")&&(T.color=u.color);var A=nf.castOption(r,u.i,"text");return(nf.isValidTextValue(A)||A==="")&&(T.text=A),T.customdata=nf.castOption(r,u.i,"customdata"),nf.texttemplateString({data:[T,r._meta],fallback:r.texttemplatefallback,labels:T,locale:n._d3locale,template:x})};function gXt(e){return e.rpx0===0&&nf.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function mze(e){return mXt(e.rpx1,e.transform.textPosAngle)}function mXt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var bze=W((TGr,_ze)=>{"use strict";_ze.exports={moduleType:"trace",name:"sunburst",basePlotModule:IIe(),categories:[],animatable:!0,attributes:US(),layoutAttributes:VZ(),supplyDefaults:GIe(),supplyLayoutDefaults:jIe(),calc:HS().calc,crossTraceCalc:HS().crossTraceCalc,plot:cI().plot,style:fK().style,colorbar:Ac(),meta:{}}});var Tze=W((AGr,wze)=>{"use strict";wze.exports=bze()});var Mze=W(m4=>{"use strict";var Aze=Ko();m4.name="treemap";m4.plot=function(e,t,r,i){Aze.plotBasePlot(m4.name,e,t,r,i)};m4.clean=function(e,t,r,i){Aze.cleanBasePlot(m4.name,e,t,r,i)}});var vb=W((SGr,Sze)=>{"use strict";Sze.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var fI=W((EGr,Cze)=>{"use strict";var{hovertemplateAttrs:yXt,texttemplateAttrs:xXt,templatefallbackAttrs:Eze}=Ga(),_Xt=Eo(),bXt=us().attributes,gb=nb(),Nd=US(),kze=vb(),dK=tn().extendFlat,wXt=Du().pattern;Cze.exports={labels:Nd.labels,parents:Nd.parents,values:Nd.values,branchvalues:Nd.branchvalues,count:Nd.count,level:Nd.level,maxdepth:Nd.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:dK({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:Nd.marker.colors,pattern:wXt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Nd.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},_Xt("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:dK({},gb.textfont,{}),editType:"calc"},text:gb.text,textinfo:Nd.textinfo,texttemplate:xXt({editType:"plot"},{keys:kze.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Eze({editType:"plot"}),hovertext:gb.hovertext,hoverinfo:Nd.hoverinfo,hovertemplate:yXt({},{keys:kze.eventDataKeys}),hovertemplatefallback:Eze(),textfont:gb.textfont,insidetextfont:gb.insidetextfont,outsidetextfont:dK({},gb.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:gb.sort,root:Nd.root,domain:bXt({name:"treemap",trace:!0,editType:"calc"})}});var pK=W((kGr,Dze)=>{"use strict";Dze.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Ize=W((CGr,Pze)=>{"use strict";var Fze=it(),TXt=fI(),AXt=ni(),MXt=us().defaults,SXt=E0().handleText,EXt=Uy().TEXTPAD,kXt=ab().handleMarkerDefaults,Lze=Jo(),CXt=Lze.hasColorscale,DXt=Lze.handleDefaults;Pze.exports=function(t,r,i,n){function a(m,g){return Fze.coerce(t,r,TXt,m,g)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Fze.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";SXt(t,r,n,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;kXt(t,r,n,a);var p=r._hasColorscale=CXt(t,"marker","colors")||(t.marker||{}).coloraxis;p?DXt(t,r,n,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var v=r.textfont.size*2;a("marker.pad.t",d?v/4:v),a("marker.pad.l",v/4),a("marker.pad.r",v/4),a("marker.pad.b",d?v:v/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:AXt.contrast(n.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*EXt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),MXt(r,n,a),r._length=null}});var zze=W((DGr,Rze)=>{"use strict";var FXt=it(),LXt=pK();Rze.exports=function(t,r){function i(n,a){return FXt.coerce(t,r,LXt,n,a)}i("treemapcolorway",r.colorway),i("extendtreemapcolors")}});var gK=W(vK=>{"use strict";var Bze=HS();vK.calc=function(e,t){return Bze.calc(e,t)};vK.crossTraceCalc=function(e){return Bze._runCrossTraceCalc("treemap",e)}});var mK=W((LGr,qze)=>{"use strict";qze.exports=function e(t,r,i){var n;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 a=t.children;if(a)for(var o=0;o{"use strict";var y4=VS(),PXt=mK();Oze.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.packing==="dice-slice",s=i.pad[a?"bottom":"top"],l=i.pad[n?"right":"left"],u=i.pad[n?"left":"right"],c=i.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=y4.treemap().tile(IXt(i.packing,i.squarifyratio)).paddingInner(i.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||n||a)&&PXt(h,r,{swapXY:o,flipX:n,flipY:a}),h};function IXt(e,t){switch(e){case"squarify":return y4.treemapSquarify.ratio(t);case"binary":return y4.treemapBinary;case"dice":return y4.treemapDice;case"slice":return y4.treemapSlice;default:return y4.treemapSliceDice}}});var hI=W((IGr,Gze)=>{"use strict";var Nze=vi(),x4=ni(),Uze=it(),xK=am(),RXt=Qc().resizeText,zXt=lI();function BXt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");RXt(e,t,"treemap"),t.each(function(r){var i=Nze.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){Nze.select(this).call(Vze,o,a,e,{hovered:!1})})})}function Vze(e,t,r,i,n){var a=(n||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=xK.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=Uze.castOption(r,s,"marker.line.color")||x4.defaultLine,u=Uze.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var p=x4.combine(x4.addOpacity(r._backgroundColor,.75),c),v;if(d===!0){var m=xK.getMaxDepth(r);isFinite(m)?xK.isLeaf(t)?v=0:v=r._maxVisibleLayers-(t.data.depth-r._entryDepth):v=t.data.height+1}else v=t.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var g=0;g{"use strict";var Hze=vi(),dI=it(),jze=Ji(),qXt=uo(),OXt=yK(),$ze=hI().styleOne,_K=vb(),_4=am(),NXt=tE(),bK=!0;Wze.exports=function(t,r,i,n,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,p=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,g=a.makeUpdateTextInterpolator,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=M.hierarchy,A=s/x._entryDepth,y=_4.listPath(i.data,"id"),E=OXt(T.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();E=E.filter(function(C){var k=y.indexOf(C.data.id);return k===-1?!1:(C.x0=A*k,C.x1=A*(k+1),C.y0=o,C.y1=o+l,C.onPathbar=!0,!0)}),E.reverse(),n=n.data(E,_4.getPtId),n.enter().append("g").classed("pathbar",!0),v(n,bK,w,[s,l],f),n.order();var S=n;p&&(S=S.transition().each("end",function(){var C=Hze.select(this);_4.setSliceCursor(C,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),S.each(function(C){C._x0=u(C.x0),C._x1=u(C.x1),C._y0=c(C.y0),C._y1=c(C.y1),C._hoverX=u(C.x1-Math.min(s,l)/2),C._hoverY=c(C.y1-l/2);var k=Hze.select(this),D=dI.ensureSingle(k,"path","surface",function(L){L.style("pointer-events",b?"none":"all")});p?D.transition().attrTween("d",function(L){var I=m(L,bK,w,[s,l]);return function(B){return f(I(B))}}):D.attr("d",f),k.call(NXt,i,t,r,{styleOne:$ze,eventDataKeys:_K.eventDataKeys,transitionTime:_K.CLICK_TRANSITION_TIME,transitionEasing:_K.CLICK_TRANSITION_EASING}).call(_4.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),D.call($ze,C,x,t,{hovered:!1}),C._text=(_4.getPtLabel(C)||"").split("
").join(" ")||"";var F=dI.ensureSingle(k,"g","slicetext"),P=dI.ensureSingle(F,"text","",function(L){L.attr("data-notex",1)}),R=dI.ensureUniformFontSize(t,_4.determineTextFont(x,C,_.font,{onPathbar:!0}));P.text(C._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(jze.font,R).call(qXt.convertToTspans,t),C.textBB=jze.bBox(P.node()),C.transform=h(C,{fontSize:R.size,onPathbar:!0}),C.transform.fontSize=R.size,p?P.transition().attrTween("transform",function(L){var I=g(L,bK,w,[s,l]);return function(B){return d(I(B))}}):P.attr("transform",d(C))})}});var Jze=W((zGr,Kze)=>{"use strict";var Xze=vi(),wK=(db(),Go(hb)).interpolate,x2=am(),iE=it(),Zze=Uy().TEXTPAD,UXt=I_(),VXt=UXt.toMoveInsideBar,GXt=Qc(),TK=GXt.recordMinTextSize,HXt=vb(),jXt=Yze();function mb(e){return x2.isHierarchyRoot(e)?"":x2.getPtId(e)}Kze.exports=function(t,r,i,n,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=x2.findEntryWithLevel(f,l.level),d=Xze.select(i),p=d.selectAll("g.pathbar"),v=d.selectAll("g.slice");if(!h){p.remove(),v.remove();return}var m=x2.isHierarchyRoot(h),g=!o.uniformtext.mode&&x2.hasTransition(n),w=x2.getMaxDepth(l),b=function(re){return re.data.depth-h.data.depth-1?T+E:-(y+E):0,C={x0:A,x1:A,y0:S,y1:S+y},k=function(re,pe,we){var Fe=l.tiling.pad,Se=function(Oe){return Oe-Fe<=pe.x0},ke=function(Oe){return Oe+Fe>=pe.x1},_e=function(Oe){return Oe-Fe<=pe.y0},Ie=function(Oe){return Oe+Fe>=pe.y1};return re.x0===pe.x0&&re.x1===pe.x1&&re.y0===pe.y0&&re.y1===pe.y1?{x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1}:{x0:Se(re.x0-Fe)?0:ke(re.x0-Fe)?we[0]:re.x0,x1:Se(re.x1+Fe)?0:ke(re.x1+Fe)?we[0]:re.x1,y0:_e(re.y0-Fe)?0:Ie(re.y0-Fe)?we[1]:re.y0,y1:_e(re.y1+Fe)?0:Ie(re.y1+Fe)?we[1]:re.y1}},D=null,F={},P={},R=null,L=function(re,pe){return pe?F[mb(re)]:P[mb(re)]},I=function(re,pe,we,Fe){if(pe)return F[mb(f)]||C;var Se=P[l.level]||we;return b(re)?k(re,Se,Fe):{}};s.hasMultipleRoots&&m&&w++,l._maxDepth=w,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=m;var B=-x/2+_.l+_.w*(M.x[1]+M.x[0])/2,O=-T/2+_.t+_.h*(1-(M.y[1]+M.y[0])/2),$=function(re){return B+re},Y=function(re){return O+re},K=Y(0),j=$(0),q=function(re){return j+re},J=function(re){return K+re};function U(re,pe){return re+","+pe}var V=q(0),X=function(re){re.x=Math.max(V,re.x)},H=l.pathbar.edgeshape,G=function(re){var pe=q(Math.max(Math.min(re.x0,re.x0),0)),we=q(Math.min(Math.max(re.x1,re.x1),A)),Fe=J(re.y0),Se=J(re.y1),ke=y/2,_e={},Ie={};_e.x=pe,Ie.x=we,_e.y=Ie.y=(Fe+Se)/2;var Oe={x:pe,y:Fe},Qe={x:we,y:Fe},et={x:we,y:Se},_t={x:pe,y:Se};return H===">"?(Oe.x-=ke,Qe.x-=ke,et.x-=ke,_t.x-=ke):H==="/"?(et.x-=ke,_t.x-=ke,_e.x-=ke/2,Ie.x-=ke/2):H==="\\"?(Oe.x-=ke,Qe.x-=ke,_e.x-=ke/2,Ie.x-=ke/2):H==="<"&&(_e.x-=ke,Ie.x-=ke),X(Oe),X(_t),X(_e),X(Qe),X(et),X(Ie),"M"+U(Oe.x,Oe.y)+"L"+U(Qe.x,Qe.y)+"L"+U(Ie.x,Ie.y)+"L"+U(et.x,et.y)+"L"+U(_t.x,_t.y)+"L"+U(_e.x,_e.y)+"Z"},Q=l[c?"tiling":"marker"].pad,te=function(re){return l.textposition.indexOf(re)!==-1},ce=te("top"),ge=te("left"),Ce=te("right"),be=te("bottom"),he=function(re){var pe=$(re.x0),we=$(re.x1),Fe=Y(re.y0),Se=Y(re.y1),ke=we-pe,_e=Se-Fe;if(!ke||!_e)return"";var Ie=l.marker.cornerradius||0,Oe=Math.min(Ie,ke/2,_e/2);Oe&&re.data&&re.data.data&&re.data.data.label&&(ce&&(Oe=Math.min(Oe,Q.t)),ge&&(Oe=Math.min(Oe,Q.l)),Ce&&(Oe=Math.min(Oe,Q.r)),be&&(Oe=Math.min(Oe,Q.b)));var Qe=function(et,_t){return Oe?"a"+U(Oe,Oe)+" 0 0 1 "+U(et,_t):""};return"M"+U(pe,Fe+Oe)+Qe(Oe,-Oe)+"L"+U(we-Oe,Fe)+Qe(Oe,Oe)+"L"+U(we,Se-Oe)+Qe(-Oe,Oe)+"L"+U(pe+Oe,Se)+Qe(-Oe,-Oe)+"Z"},oe=function(re,pe){var we=re.x0,Fe=re.x1,Se=re.y0,ke=re.y1,_e=re.textBB,Ie=ce||pe.isHeader&&!be,Oe=Ie?"start":be?"end":"middle",Qe=te("right"),et=te("left")||pe.onPathbar,_t=et?-1:Qe?1:0;if(pe.isHeader){if(we+=(c?Q:Q.l)-Zze,Fe-=(c?Q:Q.r)-Zze,we>=Fe){var ut=(we+Fe)/2;we=ut,Fe=ut}var vt;be?(vt=ke-(c?Q:Q.b),Se{"use strict";var $Xt=vi(),WXt=am(),YXt=Qc(),XXt=YXt.clearMinTextSize,ZXt=Ed().resizeText,Qze=Jze();eBe.exports=function(t,r,i,n,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!i;if(XXt(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&&WXt.hasTransition(i)){n&&(f=n());var d=$Xt.transition().duration(i.duration).ease(i.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(p){Qze(t,p,this,i,s)})})}else c.each(function(p){Qze(t,p,this,i,s)}),l.uniformtext.mode&&ZXt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var aBe=W((qGr,nBe)=>{"use strict";var tBe=vi(),pI=it(),rBe=Ji(),KXt=uo(),JXt=yK(),iBe=hI().styleOne,MK=vb(),_2=am(),QXt=tE(),eZt=cI().formatSliceLabel,SK=!1;nBe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=x.textposition.indexOf("left")!==-1,A=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=!y&&!x.marker.pad.t||y&&!x.marker.pad.b,S=JXt(i,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),C=S.descendants(),k=1/0,D=-1/0;C.forEach(function(I){var B=I.depth;B>=x._maxDepth?(I.x0=I.x1=(I.x0+I.x1)/2,I.y0=I.y1=(I.y0+I.y1)/2):(k=Math.min(k,B),D=Math.max(D,B))}),n=n.data(C,_2.getPtId),x._maxVisibleLayers=isFinite(D)?D-k+1:0,n.enter().append("g").classed("slice",!0),p(n,SK,w,[o,s],c),n.order();var F=null;if(d&&g){var P=_2.getPtId(g);n.each(function(I){F===null&&_2.getPtId(I)===P&&(F={x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1})})}var R=function(){return F||{x0:0,x1:o,y0:0,y1:s}},L=n;return d&&(L=L.transition().each("end",function(){var I=tBe.select(this);_2.setSliceCursor(I,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(I){var B=_2.isHeader(I,x);I._x0=l(I.x0),I._x1=l(I.x1),I._y0=u(I.y0),I._y1=u(I.y1),I._hoverX=l(I.x1-x.marker.pad.r),I._hoverY=u(y?I.y1-x.marker.pad.b/2:I.y0+x.marker.pad.t/2);var O=tBe.select(this),$=pI.ensureSingle(O,"path","surface",function(U){U.style("pointer-events",b?"none":"all")});d?$.transition().attrTween("d",function(U){var V=v(U,SK,R(),[o,s]);return function(X){return c(V(X))}}):$.attr("d",c),O.call(QXt,i,t,r,{styleOne:iBe,eventDataKeys:MK.eventDataKeys,transitionTime:MK.CLICK_TRANSITION_TIME,transitionEasing:MK.CLICK_TRANSITION_EASING}).call(_2.setSliceCursor,t,{isTransitioning:t._transitioning}),$.call(iBe,I,x,t,{hovered:!1}),I.x0===I.x1||I.y0===I.y1?I._text="":B?I._text=E?"":_2.getPtLabel(I)||"":I._text=eZt(I,i,x,r,_)||"";var Y=pI.ensureSingle(O,"g","slicetext"),K=pI.ensureSingle(Y,"text","",function(U){U.attr("data-notex",1)}),j=pI.ensureUniformFontSize(t,_2.determineTextFont(x,I,_.font)),q=I._text||" ",J=B&&q.indexOf("
")===-1;K.text(q).classed("slicetext",!0).attr("text-anchor",A?"end":T||J?"start":"middle").call(rBe.font,j).call(KXt.convertToTspans,t),I.textBB=rBe.bBox(K.node()),I.transform=f(I,{fontSize:j.size,isHeader:B}),I.transform.fontSize=j.size,d?K.transition().attrTween("transform",function(U){var V=m(U,SK,R(),[o,s]);return function(X){return h(V(X))}}):K.attr("transform",h(I))}),F}});var sBe=W((OGr,oBe)=>{"use strict";var tZt=AK(),rZt=aBe();oBe.exports=function(t,r,i,n){return tZt(t,r,i,n,{type:"treemap",drawDescendants:rZt})}});var uBe=W((NGr,lBe)=>{"use strict";lBe.exports={moduleType:"trace",name:"treemap",basePlotModule:Mze(),categories:[],animatable:!0,attributes:fI(),layoutAttributes:pK(),supplyDefaults:Ize(),supplyLayoutDefaults:zze(),calc:gK().calc,crossTraceCalc:gK().crossTraceCalc,plot:sBe(),style:hI().style,colorbar:Ac(),meta:{}}});var fBe=W((UGr,cBe)=>{"use strict";cBe.exports=uBe()});var dBe=W(b4=>{"use strict";var hBe=Ko();b4.name="icicle";b4.plot=function(e,t,r,i){hBe.plotBasePlot(b4.name,e,t,r,i)};b4.clean=function(e,t,r,i){hBe.cleanBasePlot(b4.name,e,t,r,i)}});var EK=W((GGr,gBe)=>{"use strict";var{hovertemplateAttrs:iZt,texttemplateAttrs:nZt,templatefallbackAttrs:pBe}=Ga(),aZt=Eo(),oZt=us().attributes,nE=nb(),F0=US(),vI=fI(),vBe=vb(),sZt=tn().extendFlat,lZt=Du().pattern;gBe.exports={labels:F0.labels,parents:F0.parents,values:F0.values,branchvalues:F0.branchvalues,count:F0.count,level:F0.level,maxdepth:F0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:vI.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:sZt({colors:F0.marker.colors,line:F0.marker.line,pattern:lZt,editType:"calc"},aZt("marker",{colorAttr:"colors",anim:!1})),leaf:F0.leaf,pathbar:vI.pathbar,text:nE.text,textinfo:F0.textinfo,texttemplate:nZt({editType:"plot"},{keys:vBe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:pBe({editType:"plot"}),hovertext:nE.hovertext,hoverinfo:F0.hoverinfo,hovertemplate:iZt({},{keys:vBe.eventDataKeys}),hovertemplatefallback:pBe(),textfont:nE.textfont,insidetextfont:nE.insidetextfont,outsidetextfont:vI.outsidetextfont,textposition:vI.textposition,sort:nE.sort,root:F0.root,domain:oZt({name:"icicle",trace:!0,editType:"calc"})}});var kK=W((HGr,mBe)=>{"use strict";mBe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var bBe=W((jGr,_Be)=>{"use strict";var yBe=it(),uZt=EK(),cZt=ni(),fZt=us().defaults,hZt=E0().handleText,dZt=Uy().TEXTPAD,pZt=ab().handleMarkerDefaults,xBe=Jo(),vZt=xBe.hasColorscale,gZt=xBe.handleDefaults;_Be.exports=function(t,r,i,n){function a(d,p){return yBe.coerce(t,r,uZt,d,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",yBe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";hZt(t,r,n,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),pZt(t,r,n,a);var h=r._hasColorscale=vZt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&gZt(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:cZt.contrast(n.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*dZt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),fZt(r,n,a),r._length=null}});var TBe=W(($Gr,wBe)=>{"use strict";var mZt=it(),yZt=kK();wBe.exports=function(t,r){function i(n,a){return mZt.coerce(t,r,yZt,n,a)}i("iciclecolorway",r.colorway),i("extendiciclecolors")}});var DK=W(CK=>{"use strict";var ABe=HS();CK.calc=function(e,t){return ABe.calc(e,t)};CK.crossTraceCalc=function(e){return ABe._runCrossTraceCalc("icicle",e)}});var SBe=W((YGr,MBe)=>{"use strict";var xZt=VS(),_Zt=mK();MBe.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.orientation==="h",s=i.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=xZt.partition().padding(i.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||n||a)&&_Zt(c,r,{swapXY:o,flipX:n,flipY:a}),c}});var FK=W((XGr,FBe)=>{"use strict";var EBe=vi(),kBe=ni(),CBe=it(),bZt=Qc().resizeText,wZt=lI();function TZt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");bZt(e,t,"icicle"),t.each(function(r){var i=EBe.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){EBe.select(this).call(DBe,o,a,e)})})}function DBe(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=CBe.castOption(r,o,"marker.line.color")||kBe.defaultLine,l=CBe.castOption(r,o,"marker.line.width")||0;e.call(wZt,t,r,i).style("stroke-width",l).call(kBe.stroke,s).style("opacity",a?r.leaf.opacity:null)}FBe.exports={style:TZt,styleOne:DBe}});var zBe=W((ZGr,RBe)=>{"use strict";var LBe=vi(),gI=it(),PBe=Ji(),AZt=uo(),MZt=SBe(),IBe=FK().styleOne,LK=vb(),w4=am(),SZt=tE(),EZt=cI().formatSliceLabel,PK=!1;RBe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=x.textposition.indexOf("left")!==-1,A=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=MZt(i,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),S=E.descendants(),C=1/0,k=-1/0;S.forEach(function(L){var I=L.depth;I>=x._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(C=Math.min(C,I),k=Math.max(k,I))}),n=n.data(S,w4.getPtId),x._maxVisibleLayers=isFinite(k)?k-C+1:0,n.enter().append("g").classed("slice",!0),p(n,PK,w,[o,s],c),n.order();var D=null;if(d&&g){var F=w4.getPtId(g);n.each(function(L){D===null&&w4.getPtId(L)===F&&(D={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return D||{x0:0,x1:o,y0:0,y1:s}},R=n;return d&&(R=R.transition().each("end",function(){var L=LBe.select(this);w4.setSliceCursor(L,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){L._x0=l(L.x0),L._x1=l(L.x1),L._y0=u(L.y0),L._y1=u(L.y1),L._hoverX=l(L.x1-x.tiling.pad),L._hoverY=u(y?L.y1-x.tiling.pad/2:L.y0+x.tiling.pad/2);var I=LBe.select(this),B=gI.ensureSingle(I,"path","surface",function(K){K.style("pointer-events",b?"none":"all")});d?B.transition().attrTween("d",function(K){var j=v(K,PK,P(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(q){return c(j(q))}}):B.attr("d",c),I.call(SZt,i,t,r,{styleOne:IBe,eventDataKeys:LK.eventDataKeys,transitionTime:LK.CLICK_TRANSITION_TIME,transitionEasing:LK.CLICK_TRANSITION_EASING}).call(w4.setSliceCursor,t,{isTransitioning:t._transitioning}),B.call(IBe,L,x,t,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":L._text=EZt(L,i,x,r,_)||"";var O=gI.ensureSingle(I,"g","slicetext"),$=gI.ensureSingle(O,"text","",function(K){K.attr("data-notex",1)}),Y=gI.ensureUniformFontSize(t,w4.determineTextFont(x,L,_.font));$.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",A?"end":T?"start":"middle").call(PBe.font,Y).call(AZt.convertToTspans,t),L.textBB=PBe.bBox($.node()),L.transform=f(L,{fontSize:Y.size}),L.transform.fontSize=Y.size,d?$.transition().attrTween("transform",function(K){var j=m(K,PK,P(),[o,s]);return function(q){return h(j(q))}}):$.attr("transform",h(L))}),D}});var qBe=W((KGr,BBe)=>{"use strict";var kZt=AK(),CZt=zBe();BBe.exports=function(t,r,i,n){return kZt(t,r,i,n,{type:"icicle",drawDescendants:CZt})}});var NBe=W((JGr,OBe)=>{"use strict";OBe.exports={moduleType:"trace",name:"icicle",basePlotModule:dBe(),categories:[],animatable:!0,attributes:EK(),layoutAttributes:kK(),supplyDefaults:bBe(),supplyLayoutDefaults:TBe(),calc:DK().calc,crossTraceCalc:DK().crossTraceCalc,plot:qBe(),style:FK().style,colorbar:Ac(),meta:{}}});var VBe=W((QGr,UBe)=>{"use strict";UBe.exports=NBe()});var HBe=W(T4=>{"use strict";var GBe=Ko();T4.name="funnelarea";T4.plot=function(e,t,r,i){GBe.plotBasePlot(T4.name,e,t,r,i)};T4.clean=function(e,t,r,i){GBe.cleanBasePlot(T4.name,e,t,r,i)}});var IK=W((tHr,$Be)=>{"use strict";var Cc=nb(),DZt=Wa(),FZt=us().attributes,{hovertemplateAttrs:LZt,texttemplateAttrs:PZt,templatefallbackAttrs:jBe}=Ga(),yb=tn().extendFlat;$Be.exports={labels:Cc.labels,label0:Cc.label0,dlabel:Cc.dlabel,values:Cc.values,marker:{colors:Cc.marker.colors,line:{color:yb({},Cc.marker.line.color,{dflt:null}),width:yb({},Cc.marker.line.width,{dflt:1}),editType:"calc"},pattern:Cc.marker.pattern,editType:"calc"},text:Cc.text,hovertext:Cc.hovertext,scalegroup:yb({},Cc.scalegroup,{}),textinfo:yb({},Cc.textinfo,{flags:["label","text","value","percent"]}),texttemplate:PZt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:jBe({editType:"plot"}),hoverinfo:yb({},DZt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:LZt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:jBe(),textposition:yb({},Cc.textposition,{values:["inside","none"],dflt:"inside"}),textfont:Cc.textfont,insidetextfont:Cc.insidetextfont,title:{text:Cc.title.text,font:Cc.title.font,position:yb({},Cc.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:FZt({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 RK=W((rHr,WBe)=>{"use strict";var IZt=BP().hiddenlabels;WBe.exports={hiddenlabels:IZt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ZBe=W((iHr,XBe)=>{"use strict";var YBe=it(),RZt=IK(),zZt=us().defaults,BZt=E0().handleText,qZt=ab().handleLabelsAndValues,OZt=ab().handleMarkerDefaults;XBe.exports=function(t,r,i,n){function a(v,m){return YBe.coerce(t,r,RZt,v,m)}var o=a("labels"),s=a("values"),l=qZt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,OZt(t,r,n,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");BZt(t,r,n,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");zZt(r,n,a);var p=a("title.text");p&&(a("title.position"),YBe.coerceFont(a,"title.font",n.font)),a("aspectratio"),a("baseratio")}});var JBe=W((nHr,KBe)=>{"use strict";var NZt=it(),UZt=RK();KBe.exports=function(t,r){function i(n,a){return NZt.coerce(t,r,UZt,n,a)}i("hiddenlabels"),i("funnelareacolorway",r.colorway),i("extendfunnelareacolors")}});var zK=W((aHr,eqe)=>{"use strict";var QBe=a4();function VZt(e,t){return QBe.calc(e,t)}function GZt(e){QBe.crossTraceCalc(e,{type:"funnelarea"})}eqe.exports={calc:VZt,crossTraceCalc:GZt}});var aqe=W((oHr,nqe)=>{"use strict";var xb=vi(),BK=Ji(),b2=it(),HZt=b2.strScale,tqe=b2.strTranslate,rqe=uo(),jZt=I_(),$Zt=jZt.toMoveInsideBar,iqe=Qc(),WZt=iqe.recordMinTextSize,YZt=iqe.clearMinTextSize,XZt=Ly(),A4=UP(),ZZt=A4.attachFxHandlers,KZt=A4.determineInsideTextFont,JZt=A4.layoutAreas,QZt=A4.prerenderTitles,eKt=A4.positionTitleOutside,tKt=A4.formatSliceLabel;nqe.exports=function(t,r){var i=t._context.staticPlot,n=t._fullLayout;YZt("funnelarea",n),QZt(r,t),JZt(r,n._size),b2.makeTraceGroups(n._funnelarealayer,r,"trace").each(function(a){var o=xb.select(this),s=a[0],l=s.trace;iKt(a),o.each(function(){var u=xb.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){xb.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,p=s.cy,v=xb.select(this),m=v.selectAll("path.surface").data([f]);m.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),v.call(ZZt,t,a);var g="M"+(d+f.TR[0])+","+(p+f.TR[1])+qK(f.TR,f.BR)+qK(f.BR,f.BL)+qK(f.BL,f.TL)+"Z";m.attr("d",g),tKt(t,f,s);var w=XZt.castOption(l.textposition,f.pts),b=v.selectAll("g.slicetext").data(f.text&&w!=="none"?[0]:[]);b.enter().append("g").classed("slicetext",!0),b.exit().remove(),b.each(function(){var _=b2.ensureSingle(xb.select(this),"text","",function(C){C.attr("data-notex",1)}),M=b2.ensureUniformFontSize(t,KZt(l,f,n.font));_.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(BK.font,M).call(rqe.convertToTspans,t);var x=BK.bBox(_.node()),T,A,y,E=Math.min(f.BL[1],f.BR[1])+p,S=Math.max(f.TL[1],f.TR[1])+p;A=Math.max(f.TL[0],f.BL[0])+d,y=Math.min(f.TR[0],f.BR[0])+d,T=$Zt(A,y,E,S,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),T.fontSize=M.size,WZt(l.type,T,n),a[h].transform=T,b2.setTransormAndDisplay(_,T)})});var c=xb.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=b2.ensureSingle(xb.select(this),"text","",function(p){p.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=b2.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(BK.font,l.title.font).call(rqe.convertToTspans,t);var d=eKt(s,n._size);f.attr("transform",tqe(d.x,d.y)+HZt(Math.min(1,d.scale))+tqe(d.tx,d.ty))})})})};function qK(e,t){var r=t[0]-e[0],i=t[1]-e[1];return"l"+r+","+i}function rKt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function iKt(e){if(!e.length)return;var t=e[0],r=t.trace,i=r.aspectratio,n=r.baseratio;n>.999&&(n=.999);var a=Math.pow(n,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var k=Math.sqrt(u);return{x:k,y:-k}}function f(){var k=c();return[k.x,k.y]}var h,d=[];d.push(f());var p,v;for(p=e.length-1;p>-1;p--)if(v=e[p],!v.hidden){var m=v.v/l;u+=m,d.push(f())}var g=1/0,w=-1/0;for(p=0;p-1;p--)if(v=e[p],!v.hidden){E+=1;var S=d[E][0],C=d[E][1];v.TL=[-S,C],v.TR=[S,C],v.BL=A,v.BR=y,v.pxmid=rKt(v.TR,v.BR),A=v.TL,y=v.TR}}});var lqe=W((sHr,sqe)=>{"use strict";var oqe=vi(),nKt=Sw(),aKt=Qc().resizeText;sqe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");aKt(t,r,"funnelarea"),r.each(function(i){var n=i[0],a=n.trace,o=oqe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){oqe.select(this).call(nKt,s,a,t)})})}});var cqe=W((lHr,uqe)=>{"use strict";uqe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:HBe(),categories:["pie-like","funnelarea","showLegend"],attributes:IK(),layoutAttributes:RK(),supplyDefaults:ZBe(),supplyLayoutDefaults:JBe(),calc:zK().calc,crossTraceCalc:zK().crossTraceCalc,plot:aqe(),style:lqe(),styleOne:Sw(),meta:{}}});var hqe=W((uHr,fqe)=>{"use strict";fqe.exports=cqe()});var nc=W((cHr,dqe)=>{"use strict";(()=>{var e={3065(n,a,o){n.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(n,a,o){"use strict";n.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,p){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(v){return d[v]}),this._mode=p,this._active=d[p],this._active||(this._mode="turntable",this._active=d.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(d){for(var p=this._controllerList,v=0;v0)throw new Error("Invalid string. Length must be a multiple of 4");var M=b.indexOf("=");M===-1&&(M=_);var x=M===_?0:4-M%4;return[M,x]}function d(b){var _=h(b),M=_[0],x=_[1];return(M+x)*3/4-x}function p(b,_,M){return(_+M)*3/4-M}function v(b){var _,M=h(b),x=M[0],T=M[1],A=new l(p(b,x,T)),y=0,E=T>0?x-4:x,S;for(S=0;S>16&255,A[y++]=_>>8&255,A[y++]=_&255;return T===2&&(_=s[b.charCodeAt(S)]<<2|s[b.charCodeAt(S+1)]>>4,A[y++]=_&255),T===1&&(_=s[b.charCodeAt(S)]<<10|s[b.charCodeAt(S+1)]<<4|s[b.charCodeAt(S+2)]>>2,A[y++]=_>>8&255,A[y++]=_&255),A}function m(b){return o[b>>18&63]+o[b>>12&63]+o[b>>6&63]+o[b&63]}function g(b,_,M){for(var x,T=[],A=_;AE?E:y+A));return x===1?(_=b[M-1],T.push(o[_>>2]+o[_<<4&63]+"==")):x===2&&(_=(b[M-2]<<8)+b[M-1],T.push(o[_>>10]+o[_>>4&63]+o[_<<2&63]+"=")),T.join("")}},3865(n,a,o){"use strict";var s=o(869);n.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(n){"use strict";n.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842(n,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);n.exports=d;function d(p,v){if(s(p))return v?h(p,d(v)):[p[0].clone(),p[1].clone()];var m=0,g,w;if(l(p))g=p.clone();else if(typeof p=="string")g=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))g=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),m-=256;g=u(p)}}if(s(v))g.mul(v[1]),w=v[0].clone();else if(l(v))w=v.clone();else if(typeof v=="string")w=c(v);else if(!v)w=u(1);else if(v===Math.floor(v))w=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),m+=256;w=u(v)}return m>0?g=g.ushln(m):m<0&&(w=w.ushln(-m)),f(g,w)}},6330(n,a,o){"use strict";var s=o(1533);n.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u.cmp(new s(0))}},1369(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d20?52:h+32}},1533(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651(n,a,o){"use strict";var s=o(6859),l=o(2361);n.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(n,a,o){"use strict";var s=o(2651),l=o(5716);n.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<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(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return new s(u)}},6504(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){return s(u[0])*s(u[1])}},5572(n,a,o){"use strict";var s=o(869);n.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(n,a,o){"use strict";var s=o(1369),l=o(4025);n.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),p=d.div,v=s(p),m=d.mod,g=f.negative!==h.negative?-1:1;if(m.cmpn(0)===0)return g*v;if(v){var w=l(v)+4,b=s(m.ushln(w).divRound(h));return g*(v+b*Math.pow(2,-w))}else{var _=h.bitLength()-m.bitLength()+53,b=s(m.ushln(_).divRound(h));return _<1023?g*b*Math.pow(2,-_):(b*=Math.pow(2,-1023),g*b*Math.pow(2,1023-_))}}},2478(n){"use strict";function a(f,h,d,p,v){for(var m=v+1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b>=0?(m=g,v=g-1):p=g+1}return m}function o(f,h,d,p,v){for(var m=v+1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b>0?(m=g,v=g-1):p=g+1}return m}function s(f,h,d,p,v){for(var m=p-1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b<0?(m=g,p=g+1):v=g-1}return m}function l(f,h,d,p,v){for(var m=p-1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b<=0?(m=g,p=g+1):v=g-1}return m}function u(f,h,d,p,v){for(;p<=v;){var m=p+v>>>1,g=f[m],w=d!==void 0?d(g,h):g-h;if(w===0)return m;w<=0?p=m+1:v=m-1}return-1}function c(f,h,d,p,v,m){return typeof d=="function"?m(f,h,d,p===void 0?0:p|0,v===void 0?f.length-1:v|0):m(f,h,void 0,d===void 0?0:d|0,p===void 0?f.length-1:p|0)}n.exports={ge:function(f,h,d,p,v){return c(f,h,d,p,v,a)},gt:function(f,h,d,p,v){return c(f,h,d,p,v,o)},lt:function(f,h,d,p,v){return c(f,h,d,p,v,s)},le:function(f,h,d,p,v){return c(f,h,d,p,v,l)},eq:function(f,h,d,p,v){return c(f,h,d,p,v,u)}}},8828(n,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.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},a.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},a.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}a.countTrailingZeros=s,a.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},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.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,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.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},a.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},a.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},a.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},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859(n,a,o){n=o.nmd(n),(function(s,l){"use strict";function u(R,L){if(!R)throw new Error(L||"Assertion failed")}function c(R,L){R.super_=L;var I=function(){};I.prototype=L.prototype,R.prototype=new I,R.prototype.constructor=R}function f(R,L,I){if(f.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((L==="le"||L==="be")&&(I=L,L=10),this._init(R||0,L||10,I||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(R){}f.isBN=function(L){return L instanceof f?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===f.wordSize&&Array.isArray(L.words)},f.max=function(L,I){return L.cmp(I)>0?L:I},f.min=function(L,I){return L.cmp(I)<0?L:I},f.prototype._init=function(L,I,B){if(typeof L=="number")return this._initNumber(L,I,B);if(typeof L=="object")return this._initArray(L,I,B);I==="hex"&&(I=16),u(I===(I|0)&&I>=2&&I<=36),L=L.toString().replace(/\s+/g,"");var O=0;L[0]==="-"&&(O++,this.negative=1),O=0;O-=3)Y=L[O]|L[O-1]<<8|L[O-2]<<16,this.words[$]|=Y<>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);else if(B==="le")for(O=0,$=0;O>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);return this.strip()};function d(R,L){var I=R.charCodeAt(L);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function p(R,L,I){var B=d(R,I);return I-1>=L&&(B|=d(R,I-1)<<4),B}f.prototype._parseHex=function(L,I,B){this.length=Math.ceil((L.length-I)/6),this.words=new Array(this.length);for(var O=0;O=I;O-=2)K=p(L,I,O)<<$,this.words[Y]|=K&67108863,$>=18?($-=18,Y+=1,this.words[Y]|=K>>>26):$+=8;else{var j=L.length-I;for(O=j%2===0?I+1:I;O=18?($-=18,Y+=1,this.words[Y]|=K>>>26):$+=8}this.strip()};function v(R,L,I,B){for(var O=0,$=Math.min(R.length,I),Y=L;Y<$;Y++){var K=R.charCodeAt(Y)-48;O*=B,K>=49?O+=K-49+10:K>=17?O+=K-17+10:O+=K}return O}f.prototype._parseBase=function(L,I,B){this.words=[0],this.length=1;for(var O=0,$=1;$<=67108863;$*=I)O++;O--,$=$/I|0;for(var Y=L.length-B,K=Y%O,j=Math.min(Y,Y-K)+B,q=0,J=B;J1&&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 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"],g=[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];f.prototype.toString=function(L,I){L=L||10,I=I|0||1;var B;if(L===16||L==="hex"){B="";for(var O=0,$=0,Y=0;Y>>24-O&16777215,O+=2,O>=26&&(O-=26,Y--),$!==0||Y!==this.length-1?B=m[6-j.length]+j+B:B=j+B}for($!==0&&(B=$.toString(16)+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(L===(L|0)&&L>=2&&L<=36){var q=g[L],J=w[L];B="";var U=this.clone();for(U.negative=0;!U.isZero();){var V=U.modn(J).toString(L);U=U.idivn(J),U.isZero()?B=V+B:B=m[q-V.length]+V+B}for(this.isZero()&&(B="0"+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(L,I){return u(typeof h!="undefined"),this.toArrayLike(h,L,I)},f.prototype.toArray=function(L,I){return this.toArrayLike(Array,L,I)},f.prototype.toArrayLike=function(L,I,B){var O=this.byteLength(),$=B||Math.max(1,O);u(O<=$,"byte array longer than desired length"),u($>0,"Requested array length <= 0"),this.strip();var Y=I==="le",K=new L($),j,q,J=this.clone();if(Y){for(q=0;!J.isZero();q++)j=J.andln(255),J.iushrn(8),K[q]=j;for(;q<$;q++)K[q]=0}else{for(q=0;q<$-O;q++)K[q]=0;for(q=0;!J.isZero();q++)j=J.andln(255),J.iushrn(8),K[$-q-1]=j}return K},Math.clz32?f.prototype._countBits=function(L){return 32-Math.clz32(L)}:f.prototype._countBits=function(L){var I=L,B=0;return I>=4096&&(B+=13,I>>>=13),I>=64&&(B+=7,I>>>=7),I>=8&&(B+=4,I>>>=4),I>=2&&(B+=2,I>>>=2),B+I},f.prototype._zeroBits=function(L){if(L===0)return 26;var I=L,B=0;return(I&8191)===0&&(B+=13,I>>>=13),(I&127)===0&&(B+=7,I>>>=7),(I&15)===0&&(B+=4,I>>>=4),(I&3)===0&&(B+=2,I>>>=2),(I&1)===0&&B++,B},f.prototype.bitLength=function(){var L=this.words[this.length-1],I=this._countBits(L);return(this.length-1)*26+I};function b(R){for(var L=new Array(R.bitLength()),I=0;I>>O}return L}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,I=0;IL.length?this.clone().ior(L):L.clone().ior(this)},f.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},f.prototype.iuand=function(L){var I;this.length>L.length?I=L:I=this;for(var B=0;BL.length?this.clone().iand(L):L.clone().iand(this)},f.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},f.prototype.iuxor=function(L){var I,B;this.length>L.length?(I=this,B=L):(I=L,B=this);for(var O=0;OL.length?this.clone().ixor(L):L.clone().ixor(this)},f.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},f.prototype.inotn=function(L){u(typeof L=="number"&&L>=0);var I=Math.ceil(L/26)|0,B=L%26;this._expand(I),B>0&&I--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-B,O++);O=0);var B=L/26|0,O=L%26;return this._expand(B+1),I?this.words[B]=this.words[B]|1<L.length?(B=this,O=L):(B=L,O=this);for(var $=0,Y=0;Y>>26;for(;$!==0&&Y>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;YL.length?this.clone().iadd(L):L.clone().iadd(this)},f.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var I=this.iadd(L);return L.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var B=this.cmp(L);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,$;B>0?(O=this,$=L):(O=L,$=this);for(var Y=0,K=0;K<$.length;K++)I=(O.words[K]|0)-($.words[K]|0)+Y,Y=I>>26,this.words[K]=I&67108863;for(;Y!==0&&K>26,this.words[K]=I&67108863;if(Y===0&&K>>26,U=j&67108863,V=Math.min(q,L.length-1),X=Math.max(0,q-R.length+1);X<=V;X++){var H=q-X|0;O=R.words[H]|0,$=L.words[X]|0,Y=O*$+U,J+=Y/67108864|0,U=Y&67108863}I.words[q]=U|0,j=J|0}return j!==0?I.words[q]=j|0:I.length--,I.strip()}var M=function(L,I,B){var O=L.words,$=I.words,Y=B.words,K=0,j,q,J,U=O[0]|0,V=U&8191,X=U>>>13,H=O[1]|0,G=H&8191,Q=H>>>13,te=O[2]|0,ce=te&8191,ge=te>>>13,Ce=O[3]|0,be=Ce&8191,he=Ce>>>13,oe=O[4]|0,Ee=oe&8191,ye=oe>>>13,ue=O[5]|0,ee=ue&8191,ae=ue>>>13,xe=O[6]|0,re=xe&8191,pe=xe>>>13,we=O[7]|0,Fe=we&8191,Se=we>>>13,ke=O[8]|0,_e=ke&8191,Ie=ke>>>13,Oe=O[9]|0,Qe=Oe&8191,et=Oe>>>13,_t=$[0]|0,ut=_t&8191,vt=_t>>>13,Xe=$[1]|0,mt=Xe&8191,bt=Xe>>>13,Ne=$[2]|0,Ue=Ne&8191,Ge=Ne>>>13,je=$[3]|0,Re=je&8191,Ve=je>>>13,ct=$[4]|0,Tt=ct&8191,Xt=ct>>>13,Vt=$[5]|0,lr=Vt&8191,ur=Vt>>>13,Bt=$[6]|0,Zt=Bt&8191,kr=Bt>>>13,$e=$[7]|0,tt=$e&8191,st=$e>>>13,xt=$[8]|0,Je=xt&8191,Ct=xt>>>13,ir=$[9]|0,hr=ir&8191,Ur=ir>>>13;B.negative=L.negative^I.negative,B.length=19,j=Math.imul(V,ut),q=Math.imul(V,vt),q=q+Math.imul(X,ut)|0,J=Math.imul(X,vt);var si=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(si>>>26)|0,si&=67108863,j=Math.imul(G,ut),q=Math.imul(G,vt),q=q+Math.imul(Q,ut)|0,J=Math.imul(Q,vt),j=j+Math.imul(V,mt)|0,q=q+Math.imul(V,bt)|0,q=q+Math.imul(X,mt)|0,J=J+Math.imul(X,bt)|0;var ei=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ei>>>26)|0,ei&=67108863,j=Math.imul(ce,ut),q=Math.imul(ce,vt),q=q+Math.imul(ge,ut)|0,J=Math.imul(ge,vt),j=j+Math.imul(G,mt)|0,q=q+Math.imul(G,bt)|0,q=q+Math.imul(Q,mt)|0,J=J+Math.imul(Q,bt)|0,j=j+Math.imul(V,Ue)|0,q=q+Math.imul(V,Ge)|0,q=q+Math.imul(X,Ue)|0,J=J+Math.imul(X,Ge)|0;var Lr=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,j=Math.imul(be,ut),q=Math.imul(be,vt),q=q+Math.imul(he,ut)|0,J=Math.imul(he,vt),j=j+Math.imul(ce,mt)|0,q=q+Math.imul(ce,bt)|0,q=q+Math.imul(ge,mt)|0,J=J+Math.imul(ge,bt)|0,j=j+Math.imul(G,Ue)|0,q=q+Math.imul(G,Ge)|0,q=q+Math.imul(Q,Ue)|0,J=J+Math.imul(Q,Ge)|0,j=j+Math.imul(V,Re)|0,q=q+Math.imul(V,Ve)|0,q=q+Math.imul(X,Re)|0,J=J+Math.imul(X,Ve)|0;var $i=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+($i>>>26)|0,$i&=67108863,j=Math.imul(Ee,ut),q=Math.imul(Ee,vt),q=q+Math.imul(ye,ut)|0,J=Math.imul(ye,vt),j=j+Math.imul(be,mt)|0,q=q+Math.imul(be,bt)|0,q=q+Math.imul(he,mt)|0,J=J+Math.imul(he,bt)|0,j=j+Math.imul(ce,Ue)|0,q=q+Math.imul(ce,Ge)|0,q=q+Math.imul(ge,Ue)|0,J=J+Math.imul(ge,Ge)|0,j=j+Math.imul(G,Re)|0,q=q+Math.imul(G,Ve)|0,q=q+Math.imul(Q,Re)|0,J=J+Math.imul(Q,Ve)|0,j=j+Math.imul(V,Tt)|0,q=q+Math.imul(V,Xt)|0,q=q+Math.imul(X,Tt)|0,J=J+Math.imul(X,Xt)|0;var Tn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,j=Math.imul(ee,ut),q=Math.imul(ee,vt),q=q+Math.imul(ae,ut)|0,J=Math.imul(ae,vt),j=j+Math.imul(Ee,mt)|0,q=q+Math.imul(Ee,bt)|0,q=q+Math.imul(ye,mt)|0,J=J+Math.imul(ye,bt)|0,j=j+Math.imul(be,Ue)|0,q=q+Math.imul(be,Ge)|0,q=q+Math.imul(he,Ue)|0,J=J+Math.imul(he,Ge)|0,j=j+Math.imul(ce,Re)|0,q=q+Math.imul(ce,Ve)|0,q=q+Math.imul(ge,Re)|0,J=J+Math.imul(ge,Ve)|0,j=j+Math.imul(G,Tt)|0,q=q+Math.imul(G,Xt)|0,q=q+Math.imul(Q,Tt)|0,J=J+Math.imul(Q,Xt)|0,j=j+Math.imul(V,lr)|0,q=q+Math.imul(V,ur)|0,q=q+Math.imul(X,lr)|0,J=J+Math.imul(X,ur)|0;var hn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(re,ut),q=Math.imul(re,vt),q=q+Math.imul(pe,ut)|0,J=Math.imul(pe,vt),j=j+Math.imul(ee,mt)|0,q=q+Math.imul(ee,bt)|0,q=q+Math.imul(ae,mt)|0,J=J+Math.imul(ae,bt)|0,j=j+Math.imul(Ee,Ue)|0,q=q+Math.imul(Ee,Ge)|0,q=q+Math.imul(ye,Ue)|0,J=J+Math.imul(ye,Ge)|0,j=j+Math.imul(be,Re)|0,q=q+Math.imul(be,Ve)|0,q=q+Math.imul(he,Re)|0,J=J+Math.imul(he,Ve)|0,j=j+Math.imul(ce,Tt)|0,q=q+Math.imul(ce,Xt)|0,q=q+Math.imul(ge,Tt)|0,J=J+Math.imul(ge,Xt)|0,j=j+Math.imul(G,lr)|0,q=q+Math.imul(G,ur)|0,q=q+Math.imul(Q,lr)|0,J=J+Math.imul(Q,ur)|0,j=j+Math.imul(V,Zt)|0,q=q+Math.imul(V,kr)|0,q=q+Math.imul(X,Zt)|0,J=J+Math.imul(X,kr)|0;var ta=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ta>>>26)|0,ta&=67108863,j=Math.imul(Fe,ut),q=Math.imul(Fe,vt),q=q+Math.imul(Se,ut)|0,J=Math.imul(Se,vt),j=j+Math.imul(re,mt)|0,q=q+Math.imul(re,bt)|0,q=q+Math.imul(pe,mt)|0,J=J+Math.imul(pe,bt)|0,j=j+Math.imul(ee,Ue)|0,q=q+Math.imul(ee,Ge)|0,q=q+Math.imul(ae,Ue)|0,J=J+Math.imul(ae,Ge)|0,j=j+Math.imul(Ee,Re)|0,q=q+Math.imul(Ee,Ve)|0,q=q+Math.imul(ye,Re)|0,J=J+Math.imul(ye,Ve)|0,j=j+Math.imul(be,Tt)|0,q=q+Math.imul(be,Xt)|0,q=q+Math.imul(he,Tt)|0,J=J+Math.imul(he,Xt)|0,j=j+Math.imul(ce,lr)|0,q=q+Math.imul(ce,ur)|0,q=q+Math.imul(ge,lr)|0,J=J+Math.imul(ge,ur)|0,j=j+Math.imul(G,Zt)|0,q=q+Math.imul(G,kr)|0,q=q+Math.imul(Q,Zt)|0,J=J+Math.imul(Q,kr)|0,j=j+Math.imul(V,tt)|0,q=q+Math.imul(V,st)|0,q=q+Math.imul(X,tt)|0,J=J+Math.imul(X,st)|0;var ca=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ca>>>26)|0,ca&=67108863,j=Math.imul(_e,ut),q=Math.imul(_e,vt),q=q+Math.imul(Ie,ut)|0,J=Math.imul(Ie,vt),j=j+Math.imul(Fe,mt)|0,q=q+Math.imul(Fe,bt)|0,q=q+Math.imul(Se,mt)|0,J=J+Math.imul(Se,bt)|0,j=j+Math.imul(re,Ue)|0,q=q+Math.imul(re,Ge)|0,q=q+Math.imul(pe,Ue)|0,J=J+Math.imul(pe,Ge)|0,j=j+Math.imul(ee,Re)|0,q=q+Math.imul(ee,Ve)|0,q=q+Math.imul(ae,Re)|0,J=J+Math.imul(ae,Ve)|0,j=j+Math.imul(Ee,Tt)|0,q=q+Math.imul(Ee,Xt)|0,q=q+Math.imul(ye,Tt)|0,J=J+Math.imul(ye,Xt)|0,j=j+Math.imul(be,lr)|0,q=q+Math.imul(be,ur)|0,q=q+Math.imul(he,lr)|0,J=J+Math.imul(he,ur)|0,j=j+Math.imul(ce,Zt)|0,q=q+Math.imul(ce,kr)|0,q=q+Math.imul(ge,Zt)|0,J=J+Math.imul(ge,kr)|0,j=j+Math.imul(G,tt)|0,q=q+Math.imul(G,st)|0,q=q+Math.imul(Q,tt)|0,J=J+Math.imul(Q,st)|0,j=j+Math.imul(V,Je)|0,q=q+Math.imul(V,Ct)|0,q=q+Math.imul(X,Je)|0,J=J+Math.imul(X,Ct)|0;var dn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(dn>>>26)|0,dn&=67108863,j=Math.imul(Qe,ut),q=Math.imul(Qe,vt),q=q+Math.imul(et,ut)|0,J=Math.imul(et,vt),j=j+Math.imul(_e,mt)|0,q=q+Math.imul(_e,bt)|0,q=q+Math.imul(Ie,mt)|0,J=J+Math.imul(Ie,bt)|0,j=j+Math.imul(Fe,Ue)|0,q=q+Math.imul(Fe,Ge)|0,q=q+Math.imul(Se,Ue)|0,J=J+Math.imul(Se,Ge)|0,j=j+Math.imul(re,Re)|0,q=q+Math.imul(re,Ve)|0,q=q+Math.imul(pe,Re)|0,J=J+Math.imul(pe,Ve)|0,j=j+Math.imul(ee,Tt)|0,q=q+Math.imul(ee,Xt)|0,q=q+Math.imul(ae,Tt)|0,J=J+Math.imul(ae,Xt)|0,j=j+Math.imul(Ee,lr)|0,q=q+Math.imul(Ee,ur)|0,q=q+Math.imul(ye,lr)|0,J=J+Math.imul(ye,ur)|0,j=j+Math.imul(be,Zt)|0,q=q+Math.imul(be,kr)|0,q=q+Math.imul(he,Zt)|0,J=J+Math.imul(he,kr)|0,j=j+Math.imul(ce,tt)|0,q=q+Math.imul(ce,st)|0,q=q+Math.imul(ge,tt)|0,J=J+Math.imul(ge,st)|0,j=j+Math.imul(G,Je)|0,q=q+Math.imul(G,Ct)|0,q=q+Math.imul(Q,Je)|0,J=J+Math.imul(Q,Ct)|0,j=j+Math.imul(V,hr)|0,q=q+Math.imul(V,Ur)|0,q=q+Math.imul(X,hr)|0,J=J+Math.imul(X,Ur)|0;var Vn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,j=Math.imul(Qe,mt),q=Math.imul(Qe,bt),q=q+Math.imul(et,mt)|0,J=Math.imul(et,bt),j=j+Math.imul(_e,Ue)|0,q=q+Math.imul(_e,Ge)|0,q=q+Math.imul(Ie,Ue)|0,J=J+Math.imul(Ie,Ge)|0,j=j+Math.imul(Fe,Re)|0,q=q+Math.imul(Fe,Ve)|0,q=q+Math.imul(Se,Re)|0,J=J+Math.imul(Se,Ve)|0,j=j+Math.imul(re,Tt)|0,q=q+Math.imul(re,Xt)|0,q=q+Math.imul(pe,Tt)|0,J=J+Math.imul(pe,Xt)|0,j=j+Math.imul(ee,lr)|0,q=q+Math.imul(ee,ur)|0,q=q+Math.imul(ae,lr)|0,J=J+Math.imul(ae,ur)|0,j=j+Math.imul(Ee,Zt)|0,q=q+Math.imul(Ee,kr)|0,q=q+Math.imul(ye,Zt)|0,J=J+Math.imul(ye,kr)|0,j=j+Math.imul(be,tt)|0,q=q+Math.imul(be,st)|0,q=q+Math.imul(he,tt)|0,J=J+Math.imul(he,st)|0,j=j+Math.imul(ce,Je)|0,q=q+Math.imul(ce,Ct)|0,q=q+Math.imul(ge,Je)|0,J=J+Math.imul(ge,Ct)|0,j=j+Math.imul(G,hr)|0,q=q+Math.imul(G,Ur)|0,q=q+Math.imul(Q,hr)|0,J=J+Math.imul(Q,Ur)|0;var ra=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ra>>>26)|0,ra&=67108863,j=Math.imul(Qe,Ue),q=Math.imul(Qe,Ge),q=q+Math.imul(et,Ue)|0,J=Math.imul(et,Ge),j=j+Math.imul(_e,Re)|0,q=q+Math.imul(_e,Ve)|0,q=q+Math.imul(Ie,Re)|0,J=J+Math.imul(Ie,Ve)|0,j=j+Math.imul(Fe,Tt)|0,q=q+Math.imul(Fe,Xt)|0,q=q+Math.imul(Se,Tt)|0,J=J+Math.imul(Se,Xt)|0,j=j+Math.imul(re,lr)|0,q=q+Math.imul(re,ur)|0,q=q+Math.imul(pe,lr)|0,J=J+Math.imul(pe,ur)|0,j=j+Math.imul(ee,Zt)|0,q=q+Math.imul(ee,kr)|0,q=q+Math.imul(ae,Zt)|0,J=J+Math.imul(ae,kr)|0,j=j+Math.imul(Ee,tt)|0,q=q+Math.imul(Ee,st)|0,q=q+Math.imul(ye,tt)|0,J=J+Math.imul(ye,st)|0,j=j+Math.imul(be,Je)|0,q=q+Math.imul(be,Ct)|0,q=q+Math.imul(he,Je)|0,J=J+Math.imul(he,Ct)|0,j=j+Math.imul(ce,hr)|0,q=q+Math.imul(ce,Ur)|0,q=q+Math.imul(ge,hr)|0,J=J+Math.imul(ge,Ur)|0;var ds=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ds>>>26)|0,ds&=67108863,j=Math.imul(Qe,Re),q=Math.imul(Qe,Ve),q=q+Math.imul(et,Re)|0,J=Math.imul(et,Ve),j=j+Math.imul(_e,Tt)|0,q=q+Math.imul(_e,Xt)|0,q=q+Math.imul(Ie,Tt)|0,J=J+Math.imul(Ie,Xt)|0,j=j+Math.imul(Fe,lr)|0,q=q+Math.imul(Fe,ur)|0,q=q+Math.imul(Se,lr)|0,J=J+Math.imul(Se,ur)|0,j=j+Math.imul(re,Zt)|0,q=q+Math.imul(re,kr)|0,q=q+Math.imul(pe,Zt)|0,J=J+Math.imul(pe,kr)|0,j=j+Math.imul(ee,tt)|0,q=q+Math.imul(ee,st)|0,q=q+Math.imul(ae,tt)|0,J=J+Math.imul(ae,st)|0,j=j+Math.imul(Ee,Je)|0,q=q+Math.imul(Ee,Ct)|0,q=q+Math.imul(ye,Je)|0,J=J+Math.imul(ye,Ct)|0,j=j+Math.imul(be,hr)|0,q=q+Math.imul(be,Ur)|0,q=q+Math.imul(he,hr)|0,J=J+Math.imul(he,Ur)|0;var mo=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(mo>>>26)|0,mo&=67108863,j=Math.imul(Qe,Tt),q=Math.imul(Qe,Xt),q=q+Math.imul(et,Tt)|0,J=Math.imul(et,Xt),j=j+Math.imul(_e,lr)|0,q=q+Math.imul(_e,ur)|0,q=q+Math.imul(Ie,lr)|0,J=J+Math.imul(Ie,ur)|0,j=j+Math.imul(Fe,Zt)|0,q=q+Math.imul(Fe,kr)|0,q=q+Math.imul(Se,Zt)|0,J=J+Math.imul(Se,kr)|0,j=j+Math.imul(re,tt)|0,q=q+Math.imul(re,st)|0,q=q+Math.imul(pe,tt)|0,J=J+Math.imul(pe,st)|0,j=j+Math.imul(ee,Je)|0,q=q+Math.imul(ee,Ct)|0,q=q+Math.imul(ae,Je)|0,J=J+Math.imul(ae,Ct)|0,j=j+Math.imul(Ee,hr)|0,q=q+Math.imul(Ee,Ur)|0,q=q+Math.imul(ye,hr)|0,J=J+Math.imul(ye,Ur)|0;var Rs=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,j=Math.imul(Qe,lr),q=Math.imul(Qe,ur),q=q+Math.imul(et,lr)|0,J=Math.imul(et,ur),j=j+Math.imul(_e,Zt)|0,q=q+Math.imul(_e,kr)|0,q=q+Math.imul(Ie,Zt)|0,J=J+Math.imul(Ie,kr)|0,j=j+Math.imul(Fe,tt)|0,q=q+Math.imul(Fe,st)|0,q=q+Math.imul(Se,tt)|0,J=J+Math.imul(Se,st)|0,j=j+Math.imul(re,Je)|0,q=q+Math.imul(re,Ct)|0,q=q+Math.imul(pe,Je)|0,J=J+Math.imul(pe,Ct)|0,j=j+Math.imul(ee,hr)|0,q=q+Math.imul(ee,Ur)|0,q=q+Math.imul(ae,hr)|0,J=J+Math.imul(ae,Ur)|0;var ho=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ho>>>26)|0,ho&=67108863,j=Math.imul(Qe,Zt),q=Math.imul(Qe,kr),q=q+Math.imul(et,Zt)|0,J=Math.imul(et,kr),j=j+Math.imul(_e,tt)|0,q=q+Math.imul(_e,st)|0,q=q+Math.imul(Ie,tt)|0,J=J+Math.imul(Ie,st)|0,j=j+Math.imul(Fe,Je)|0,q=q+Math.imul(Fe,Ct)|0,q=q+Math.imul(Se,Je)|0,J=J+Math.imul(Se,Ct)|0,j=j+Math.imul(re,hr)|0,q=q+Math.imul(re,Ur)|0,q=q+Math.imul(pe,hr)|0,J=J+Math.imul(pe,Ur)|0;var ka=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ka>>>26)|0,ka&=67108863,j=Math.imul(Qe,tt),q=Math.imul(Qe,st),q=q+Math.imul(et,tt)|0,J=Math.imul(et,st),j=j+Math.imul(_e,Je)|0,q=q+Math.imul(_e,Ct)|0,q=q+Math.imul(Ie,Je)|0,J=J+Math.imul(Ie,Ct)|0,j=j+Math.imul(Fe,hr)|0,q=q+Math.imul(Fe,Ur)|0,q=q+Math.imul(Se,hr)|0,J=J+Math.imul(Se,Ur)|0;var ao=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ao>>>26)|0,ao&=67108863,j=Math.imul(Qe,Je),q=Math.imul(Qe,Ct),q=q+Math.imul(et,Je)|0,J=Math.imul(et,Ct),j=j+Math.imul(_e,hr)|0,q=q+Math.imul(_e,Ur)|0,q=q+Math.imul(Ie,hr)|0,J=J+Math.imul(Ie,Ur)|0;var zs=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(zs>>>26)|0,zs&=67108863,j=Math.imul(Qe,hr),q=Math.imul(Qe,Ur),q=q+Math.imul(et,hr)|0,J=Math.imul(et,Ur);var _a=(K+j|0)+((q&8191)<<13)|0;return K=(J+(q>>>13)|0)+(_a>>>26)|0,_a&=67108863,Y[0]=si,Y[1]=ei,Y[2]=Lr,Y[3]=$i,Y[4]=Tn,Y[5]=hn,Y[6]=ta,Y[7]=ca,Y[8]=dn,Y[9]=Vn,Y[10]=ra,Y[11]=ds,Y[12]=mo,Y[13]=Rs,Y[14]=ho,Y[15]=ka,Y[16]=ao,Y[17]=zs,Y[18]=_a,K!==0&&(Y[19]=K,B.length++),B};Math.imul||(M=_);function x(R,L,I){I.negative=L.negative^R.negative,I.length=R.length+L.length;for(var B=0,O=0,$=0;$>>26)|0,O+=Y>>>26,Y&=67108863}I.words[$]=K,B=Y,Y=O}return B!==0?I.words[$]=B:I.length--,I.strip()}function T(R,L,I){var B=new A;return B.mulp(R,L,I)}f.prototype.mulTo=function(L,I){var B,O=this.length+L.length;return this.length===10&&L.length===10?B=M(this,L,I):O<63?B=_(this,L,I):O<1024?B=x(this,L,I):B=T(this,L,I),B};function A(R,L){this.x=R,this.y=L}A.prototype.makeRBT=function(L){for(var I=new Array(L),B=f.prototype._countBits(L)-1,O=0;O>=1;return O},A.prototype.permute=function(L,I,B,O,$,Y){for(var K=0;K>>1)$++;return 1<<$+1+O},A.prototype.conjugate=function(L,I,B){if(!(B<=1))for(var O=0;O>>13,B[2*Y+1]=$&8191,$=$>>>13;for(Y=2*I;Y>=26,I+=O/67108864|0,I+=$>>>26,this.words[B]=$&67108863}return I!==0&&(this.words[B]=I,this.length++),L===0&&(this.length=1,this._normSign()),this},f.prototype.muln=function(L){return this.clone().imuln(L)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(L){var I=b(L);if(I.length===0)return new f(1);for(var B=this,O=0;O=0);var I=L%26,B=(L-I)/26,O=67108863>>>26-I<<26-I,$;if(I!==0){var Y=0;for($=0;$>>26-I}Y&&(this.words[$]=Y,this.length++)}if(B!==0){for($=this.length-1;$>=0;$--)this.words[$+B]=this.words[$];for($=0;$=0);var O;I?O=(I-I%26)/26:O=0;var $=L%26,Y=Math.min((L-$)/26,this.length),K=67108863^67108863>>>$<<$,j=B;if(O-=Y,O=Math.max(0,O),j){for(var q=0;qY)for(this.length-=Y,q=0;q=0&&(J!==0||q>=O);q--){var U=this.words[q]|0;this.words[q]=J<<26-$|U>>>$,J=U&K}return j&&J!==0&&(j.words[j.length++]=J),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(L,I,B){return u(this.negative===0),this.iushrn(L,I,B)},f.prototype.shln=function(L){return this.clone().ishln(L)},f.prototype.ushln=function(L){return this.clone().iushln(L)},f.prototype.shrn=function(L){return this.clone().ishrn(L)},f.prototype.ushrn=function(L){return this.clone().iushrn(L)},f.prototype.testn=function(L){u(typeof L=="number"&&L>=0);var I=L%26,B=(L-I)/26,O=1<=0);var I=L%26,B=(L-I)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(I!==0&&B++,this.length=Math.min(B,this.length),I!==0){var O=67108863^67108863>>>I<=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},f.prototype.isubn=function(L){if(u(typeof L=="number"),u(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I>26)-(j/67108864|0),this.words[$+B]=Y&67108863}for(;$>26,this.words[$+B]=Y&67108863;if(K===0)return this.strip();for(u(K===-1),K=0,$=0;$>26,this.words[$]=Y&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(L,I){var B=this.length-L.length,O=this.clone(),$=L,Y=$.words[$.length-1]|0,K=this._countBits(Y);B=26-K,B!==0&&($=$.ushln(B),O.iushln(B),Y=$.words[$.length-1]|0);var j=O.length-$.length,q;if(I!=="mod"){q=new f(null),q.length=j+1,q.words=new Array(q.length);for(var J=0;J=0;V--){var X=(O.words[$.length+V]|0)*67108864+(O.words[$.length+V-1]|0);for(X=Math.min(X/Y|0,67108863),O._ishlnsubmul($,X,V);O.negative!==0;)X--,O.negative=0,O._ishlnsubmul($,1,V),O.isZero()||(O.negative^=1);q&&(q.words[V]=X)}return q&&q.strip(),O.strip(),I!=="div"&&B!==0&&O.iushrn(B),{div:q||null,mod:O}},f.prototype.divmod=function(L,I,B){if(u(!L.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var O,$,Y;return this.negative!==0&&L.negative===0?(Y=this.neg().divmod(L,I),I!=="mod"&&(O=Y.div.neg()),I!=="div"&&($=Y.mod.neg(),B&&$.negative!==0&&$.iadd(L)),{div:O,mod:$}):this.negative===0&&L.negative!==0?(Y=this.divmod(L.neg(),I),I!=="mod"&&(O=Y.div.neg()),{div:O,mod:Y.mod}):(this.negative&L.negative)!==0?(Y=this.neg().divmod(L.neg(),I),I!=="div"&&($=Y.mod.neg(),B&&$.negative!==0&&$.isub(L)),{div:Y.div,mod:$}):L.length>this.length||this.cmp(L)<0?{div:new f(0),mod:this}:L.length===1?I==="div"?{div:this.divn(L.words[0]),mod:null}:I==="mod"?{div:null,mod:new f(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new f(this.modn(L.words[0]))}:this._wordDiv(L,I)},f.prototype.div=function(L){return this.divmod(L,"div",!1).div},f.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},f.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},f.prototype.divRound=function(L){var I=this.divmod(L);if(I.mod.isZero())return I.div;var B=I.mod.abs(),O=L.abs().iushrn(1),$=L.words[0]&1,Y=B.cmp(O);if(Y<0||$===1&&Y===0)return I.div;var K=new f(1);return K.negative=this.negative^L.negative,I.div.iadd(K)},f.prototype.modn=function(L){u(L<=67108863);for(var I=(1<<26)%L,B=0,O=this.length-1;O>=0;O--)B=(I*B+(this.words[O]|0))%L;return B},f.prototype.idivn=function(L){u(L<=67108863);for(var I=0,B=this.length-1;B>=0;B--){var O=(this.words[B]|0)+I*67108864;this.words[B]=O/L|0,I=O%L}return this.strip()},f.prototype.divn=function(L){return this.clone().idivn(L)},f.prototype.egcd=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),Y=new f(0),K=new f(1),j=0;I.isEven()&&B.isEven();)I.iushrn(1),B.iushrn(1),++j;for(var q=B.clone(),J=I.clone();!I.isZero();){for(var U=0,V=1;(I.words[0]&V)===0&&U<26;++U,V<<=1);if(U>0)for(I.iushrn(U);U-- >0;)(O.isOdd()||$.isOdd())&&(O.iadd(q),$.isub(J)),O.iushrn(1),$.iushrn(1);for(var X=0,H=1;(B.words[0]&H)===0&&X<26;++X,H<<=1);if(X>0)for(B.iushrn(X);X-- >0;)(Y.isOdd()||K.isOdd())&&(Y.iadd(q),K.isub(J)),Y.iushrn(1),K.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub(Y),$.isub(K)):(B.isub(I),Y.isub(O),K.isub($))}return{a:Y,b:K,gcd:B.iushln(j)}},f.prototype._invmp=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),Y=B.clone();I.cmpn(1)>0&&B.cmpn(1)>0;){for(var K=0,j=1;(I.words[0]&j)===0&&K<26;++K,j<<=1);if(K>0)for(I.iushrn(K);K-- >0;)O.isOdd()&&O.iadd(Y),O.iushrn(1);for(var q=0,J=1;(B.words[0]&J)===0&&q<26;++q,J<<=1);if(q>0)for(B.iushrn(q);q-- >0;)$.isOdd()&&$.iadd(Y),$.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub($)):(B.isub(I),$.isub(O))}var U;return I.cmpn(1)===0?U=O:U=$,U.cmpn(0)<0&&U.iadd(L),U},f.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var I=this.clone(),B=L.clone();I.negative=0,B.negative=0;for(var O=0;I.isEven()&&B.isEven();O++)I.iushrn(1),B.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=I.cmp(B);if($<0){var Y=I;I=B,B=Y}else if($===0||B.cmpn(1)===0)break;I.isub(B)}while(!0);return B.iushln(O)},f.prototype.invm=function(L){return this.egcd(L).a.umod(L)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(L){return this.words[0]&L},f.prototype.bincn=function(L){u(typeof L=="number");var I=L%26,B=(L-I)/26,O=1<>>26,K&=67108863,this.words[Y]=K}return $!==0&&(this.words[Y]=$,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(L){var I=L<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var B;if(this.length>1)B=1;else{I&&(L=-L),u(L<=67108863,"Number is too big");var O=this.words[0]|0;B=O===L?0:OL.length)return 1;if(this.length=0;B--){var O=this.words[B]|0,$=L.words[B]|0;if(O!==$){O<$?I=-1:O>$&&(I=1);break}}return I},f.prototype.gtn=function(L){return this.cmpn(L)===1},f.prototype.gt=function(L){return this.cmp(L)===1},f.prototype.gten=function(L){return this.cmpn(L)>=0},f.prototype.gte=function(L){return this.cmp(L)>=0},f.prototype.ltn=function(L){return this.cmpn(L)===-1},f.prototype.lt=function(L){return this.cmp(L)===-1},f.prototype.lten=function(L){return this.cmpn(L)<=0},f.prototype.lte=function(L){return this.cmp(L)<=0},f.prototype.eqn=function(L){return this.cmpn(L)===0},f.prototype.eq=function(L){return this.cmp(L)===0},f.red=function(L){return new F(L)},f.prototype.toRed=function(L){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(L){return this.red=L,this},f.prototype.forceRed=function(L){return u(!this.red,"Already a number in reduction context"),this._forceRed(L)},f.prototype.redAdd=function(L){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},f.prototype.redIAdd=function(L){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},f.prototype.redSub=function(L){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},f.prototype.redISub=function(L){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},f.prototype.redShl=function(L){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},f.prototype.redMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},f.prototype.redIMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},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(L){return u(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var y={k256:null,p224:null,p192:null,p25519:null};function E(R,L){this.name=R,this.p=new f(L,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}E.prototype._tmp=function(){var L=new f(null);return L.words=new Array(Math.ceil(this.n/13)),L},E.prototype.ireduce=function(L){var I=L,B;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),B=I.bitLength();while(B>this.n);var O=B0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},E.prototype.split=function(L,I){L.iushrn(this.n,0,I)},E.prototype.imulK=function(L){return L.imul(this.k)};function S(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(S,E),S.prototype.split=function(L,I){for(var B=4194303,O=Math.min(L.length,9),$=0;$>>22,Y=K}Y>>>=22,L.words[$-10]=Y,Y===0&&L.length>10?L.length-=10:L.length-=9},S.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var I=0,B=0;B>>=26,L.words[B]=$,I=O}return I!==0&&(L.words[L.length++]=I),L},f._prime=function(L){if(y[L])return y[L];var I;if(L==="k256")I=new S;else if(L==="p224")I=new C;else if(L==="p192")I=new k;else if(L==="p25519")I=new D;else throw new Error("Unknown prime "+L);return y[L]=I,I};function F(R){if(typeof R=="string"){var L=f._prime(R);this.m=L.p,this.prime=L}else u(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}F.prototype._verify1=function(L){u(L.negative===0,"red works only with positives"),u(L.red,"red works only with red numbers")},F.prototype._verify2=function(L,I){u((L.negative|I.negative)===0,"red works only with positives"),u(L.red&&L.red===I.red,"red works only with red numbers")},F.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},F.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},F.prototype.add=function(L,I){this._verify2(L,I);var B=L.add(I);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(L,I){this._verify2(L,I);var B=L.iadd(I);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(L,I){this._verify2(L,I);var B=L.sub(I);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(L,I){this._verify2(L,I);var B=L.isub(I);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(L,I){return this._verify1(L),this.imod(L.ushln(I))},F.prototype.imul=function(L,I){return this._verify2(L,I),this.imod(L.imul(I))},F.prototype.mul=function(L,I){return this._verify2(L,I),this.imod(L.mul(I))},F.prototype.isqr=function(L){return this.imul(L,L.clone())},F.prototype.sqr=function(L){return this.mul(L,L)},F.prototype.sqrt=function(L){if(L.isZero())return L.clone();var I=this.m.andln(3);if(u(I%2===1),I===3){var B=this.m.add(new f(1)).iushrn(2);return this.pow(L,B)}for(var O=this.m.subn(1),$=0;!O.isZero()&&O.andln(1)===0;)$++,O.iushrn(1);u(!O.isZero());var Y=new f(1).toRed(this),K=Y.redNeg(),j=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new f(2*q*q).toRed(this);this.pow(q,j).cmp(K)!==0;)q.redIAdd(K);for(var J=this.pow(q,O),U=this.pow(L,O.addn(1).iushrn(1)),V=this.pow(L,O),X=$;V.cmp(Y)!==0;){for(var H=V,G=0;H.cmp(Y)!==0;G++)H=H.redSqr();u(G=0;$--){for(var J=I.words[$],U=q-1;U>=0;U--){var V=J>>U&1;if(Y!==O[0]&&(Y=this.sqr(Y)),V===0&&K===0){j=0;continue}K<<=1,K|=V,j++,!(j!==B&&($!==0||U!==0))&&(Y=this.mul(Y,O[K]),j=0,K=0)}q=26}return Y},F.prototype.convertTo=function(L){var I=L.umod(this.m);return I===L?I.clone():I},F.prototype.convertFrom=function(L){var I=L.clone();return I.red=null,I},f.mont=function(L){return new P(L)};function P(R){F.call(this,R),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(P,F),P.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},P.prototype.convertFrom=function(L){var I=this.imod(L.mul(this.rinv));return I.red=null,I},P.prototype.imul=function(L,I){if(L.isZero()||I.isZero())return L.words[0]=0,L.length=1,L;var B=L.imul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),Y=$;return $.cmp(this.m)>=0?Y=$.isub(this.m):$.cmpn(0)<0&&(Y=$.iadd(this.m)),Y._forceRed(this)},P.prototype.mul=function(L,I){if(L.isZero()||I.isZero())return new f(0)._forceRed(this);var B=L.mul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),Y=$;return $.cmp(this.m)>=0?Y=$.isub(this.m):$.cmpn(0)<0&&(Y=$.iadd(this.m)),Y._forceRed(this)},P.prototype.invm=function(L){var I=this.imod(L._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(n,this)},6204(n){"use strict";n.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(A<=0)){var y,E=s.mallocDouble(2*A*x),S=s.mallocInt32(x);if(x=f(w,A,E,S),x>0){if(A===1&&M)l.init(x),y=l.sweepComplete(A,_,0,x,E,S,0,x,E,S);else{var C=s.mallocDouble(2*A*T),k=s.mallocInt32(T);T=f(b,A,C,k),T>0&&(l.init(x+T),A===1?y=l.sweepBipartite(A,_,0,x,E,S,0,T,C,k):y=u(A,_,M,x,E,S,T,C,k),s.free(C),s.free(k))}s.free(E),s.free(S)}return y}}}var d;function p(w,b){d.push([w,b])}function v(w){return d=[],h(w,w,p,!0),d}function m(w,b){return d=[],h(w,b,p,!1),d}function g(w,b,_){switch(arguments.length){case 1:return v(w);case 2:return typeof b=="function"?h(w,w,b,!0):m(w,b);case 3:return h(w,b,_,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(n,a){"use strict";function o(){function u(h,d,p,v,m,g,w,b,_,M,x){for(var T=2*h,A=v,y=T*v;A_-b?u(h,d,p,v,m,g,w,b,_,M,x):c(h,d,p,v,m,g,w,b,_,M,x)}return f}function s(){function u(p,v,m,g,w,b,_,M,x,T,A){for(var y=2*p,E=g,S=y*g;ET-x?g?u(p,v,m,w,b,_,M,x,T,A,y):c(p,v,m,w,b,_,M,x,T,A,y):g?f(p,v,m,w,b,_,M,x,T,A,y):h(p,v,m,w,b,_,M,x,T,A,y)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150(n,a,o){"use strict";n.exports=R;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),p=o(8105),v=128,m=1<<22,g=1<<22,w=p("!(lo>=p0)&&!(p1>=hi)"),b=p("lo===p0"),_=p("lo0;){J-=1;var X=J*A,H=S[X],G=S[X+1],Q=S[X+2],te=S[X+3],ce=S[X+4],ge=S[X+5],Ce=J*y,be=C[Ce],he=C[Ce+1],oe=ge&1,Ee=!!(ge&16),ye=$,ue=Y,ee=j,ae=q;if(oe&&(ye=j,ue=q,ee=$,ae=Y),!(ge&2&&(Q=_(L,H,G,Q,ye,ue,he),G>=Q))&&!(ge&4&&(G=M(L,H,G,Q,ye,ue,be),G>=Q))){var xe=Q-G,re=ce-te;if(Ee){if(L*xe*(xe+re)p&&m[T+d]>M;--x,T-=w){for(var A=T,y=T+w,E=0;E>>1,M=2*h,x=_,T=m[M*_+d];w=C?(x=S,T=C):E>=D?(x=y,T=E):(x=k,T=D):C>=D?(x=S,T=C):D>=E?(x=y,T=E):(x=k,T=D);for(var R=M*(b-1),L=M*x,F=0;F=p0)&&!(p1>=hi)":d};function o(p){return a[p]}function s(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(C===_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function l(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(C<_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function u(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function c(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function f(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(C<=_&&_<=k)if(A===S)A+=1,T+=M;else{for(var D=0;M>D;++D){var F=w[x+D];w[x+D]=w[T],w[T++]=F}var P=b[S];b[S]=b[A],b[A++]=P}}return A}function h(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(C<_&&_<=k)if(A===S)A+=1,T+=M;else{for(var D=0;M>D;++D){var F=w[x+D];w[x+D]=w[T],w[T++]=F}var P=b[S];b[S]=b[A],b[A++]=P}}return A}function d(p,v,m,g,w,b,_,M){for(var x=2*p,T=x*m,A=T,y=m,E=v,S=p+v,C=m;g>C;++C,T+=x){var k=w[T+E],D=w[T+S];if(!(k>=_)&&!(M>=D))if(y===C)y+=1,A+=x;else{for(var F=0;x>F;++F){var P=w[T+F];w[T+F]=w[A],w[A++]=P}var R=b[C];b[C]=b[y],b[y++]=R}}return y}},4192(n){"use strict";n.exports=o;var a=32;function o(v,m){m<=4*a?s(0,m-1,v):p(0,m-1,v)}function s(v,m,g){for(var w=2*(v+1),b=v+1;b<=m;++b){for(var _=g[w++],M=g[w++],x=b,T=w-2;x-- >v;){var A=g[T-2],y=g[T-1];if(A<_)break;if(A===_&&yg[m+1]:!0}function d(v,m,g,w){v*=2;var b=w[v];return b>1,x=M-w,T=M+w,A=b,y=x,E=M,S=T,C=_,k=v+1,D=m-1,F=0;h(A,y,g)&&(F=A,A=y,y=F),h(S,C,g)&&(F=S,S=C,C=F),h(A,E,g)&&(F=A,A=E,E=F),h(y,E,g)&&(F=y,y=E,E=F),h(A,S,g)&&(F=A,A=S,S=F),h(E,S,g)&&(F=E,E=S,S=F),h(y,C,g)&&(F=y,y=C,C=F),h(y,E,g)&&(F=y,y=E,E=F),h(S,C,g)&&(F=S,S=C,C=F);for(var P=g[2*y],R=g[2*y+1],L=g[2*S],I=g[2*S+1],B=2*A,O=2*E,$=2*C,Y=2*b,K=2*M,j=2*_,q=0;q<2;++q){var J=g[B+q],U=g[O+q],V=g[$+q];g[Y+q]=J,g[K+q]=U,g[j+q]=V}u(x,v,g),u(T,m,g);for(var X=k;X<=D;++X)if(d(X,P,R,g))X!==k&&l(X,k,g),++k;else if(!d(X,L,I,g))for(;;)if(d(D,L,I,g)){d(D,P,R,g)?(c(X,k,D,g),++k,--D):(l(X,D,g),--D);break}else{if(--D>>1;u(w,U);for(var V=0,X=0,K=0;K=c)H=H-c|0,_(p,v,X--,H);else if(H>=0)_(h,d,V--,H);else if(H<=-c){H=-H-c|0;for(var G=0;G>>1;u(w,U);for(var V=0,X=0,H=0,K=0;K>1===w[2*K+3]>>1&&(Q=2,K+=1),G<0){for(var te=-(G>>1)-1,ce=0;ce>1)-1;Q===0?_(h,d,V--,te):Q===1?_(p,v,X--,te):Q===2&&_(m,g,H--,te)}}}function A(E,S,C,k,D,F,P,R,L,I,B,O){var $=0,Y=2*E,K=S,j=S+E,q=1,J=1;k?J=c:q=c;for(var U=D;U>>1;u(w,G);for(var Q=0,U=0;U=c?(ce=!k,V-=c):(ce=!!k,V-=1),ce)M(h,d,Q++,V);else{var ge=O[V],Ce=Y*V,be=B[Ce+S+1],he=B[Ce+S+1+E];e:for(var oe=0;oe>>1;u(w,V);for(var X=0,j=0;j=c)h[X++]=q-c;else{q-=1;var G=B[q],Q=$*q,te=I[Q+S+1],ce=I[Q+S+1+E];e:for(var ge=0;ge=0;--ge)if(h[ge]===q){for(var oe=ge+1;oef)throw new RangeError('The value "'+ue+'" is invalid for option "size"');var ee=new Uint8Array(ue);return Object.setPrototypeOf(ee,p.prototype),ee}function p(ue,ee,ae){if(typeof ue=="number"){if(typeof ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ue)}return v(ue,ee,ae)}p.poolSize=8192;function v(ue,ee,ae){if(typeof ue=="string")return b(ue,ee);if(ArrayBuffer.isView(ue))return M(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(oe(ue,ArrayBuffer)||ue&&oe(ue.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(oe(ue,SharedArrayBuffer)||ue&&oe(ue.buffer,SharedArrayBuffer)))return x(ue,ee,ae);if(typeof ue=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var xe=ue.valueOf&&ue.valueOf();if(xe!=null&&xe!==ue)return p.from(xe,ee,ae);var re=T(ue);if(re)return re;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ue[Symbol.toPrimitive]=="function")return p.from(ue[Symbol.toPrimitive]("string"),ee,ae);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue)}p.from=function(ue,ee,ae){return v(ue,ee,ae)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function m(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 g(ue,ee,ae){return m(ue),ue<=0?d(ue):ee!==void 0?typeof ae=="string"?d(ue).fill(ee,ae):d(ue).fill(ee):d(ue)}p.alloc=function(ue,ee,ae){return g(ue,ee,ae)};function w(ue){return m(ue),d(ue<0?0:A(ue)|0)}p.allocUnsafe=function(ue){return w(ue)},p.allocUnsafeSlow=function(ue){return w(ue)};function b(ue,ee){if((typeof ee!="string"||ee==="")&&(ee="utf8"),!p.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var ae=E(ue,ee)|0,xe=d(ae),re=xe.write(ue,ee);return re!==ae&&(xe=xe.slice(0,re)),xe}function _(ue){for(var ee=ue.length<0?0:A(ue.length)|0,ae=d(ee),xe=0;xe=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return ue|0}function y(ue){return+ue!=ue&&(ue=0),p.alloc(+ue)}p.isBuffer=function(ee){return ee!=null&&ee._isBuffer===!0&&ee!==p.prototype},p.compare=function(ee,ae){if(oe(ee,Uint8Array)&&(ee=p.from(ee,ee.offset,ee.byteLength)),oe(ae,Uint8Array)&&(ae=p.from(ae,ae.offset,ae.byteLength)),!p.isBuffer(ee)||!p.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ee===ae)return 0;for(var xe=ee.length,re=ae.length,pe=0,we=Math.min(xe,re);pere.length?p.from(we).copy(re,pe):Uint8Array.prototype.set.call(re,we,pe);else if(p.isBuffer(we))we.copy(re,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=we.length}return re};function E(ue,ee){if(p.isBuffer(ue))return ue.length;if(ArrayBuffer.isView(ue)||oe(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);var ae=ue.length,xe=arguments.length>2&&arguments[2]===!0;if(!xe&&ae===0)return 0;for(var re=!1;;)switch(ee){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":return ce(ue).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return be(ue).length;default:if(re)return xe?-1:ce(ue).length;ee=(""+ee).toLowerCase(),re=!0}}p.byteLength=E;function S(ue,ee,ae){var xe=!1;if((ee===void 0||ee<0)&&(ee=0),ee>this.length||((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)||(ae>>>=0,ee>>>=0,ae<=ee))return"";for(ue||(ue="utf8");;)switch(ue){case"hex":return q(this,ee,ae);case"utf8":case"utf-8":return O(this,ee,ae);case"ascii":return K(this,ee,ae);case"latin1":case"binary":return j(this,ee,ae);case"base64":return B(this,ee,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,ee,ae);default:if(xe)throw new TypeError("Unknown encoding: "+ue);ue=(ue+"").toLowerCase(),xe=!0}}p.prototype._isBuffer=!0;function C(ue,ee,ae){var xe=ue[ee];ue[ee]=ue[ae],ue[ae]=xe}p.prototype.swap16=function(){var ee=this.length;if(ee%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;aeae&&(ee+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(ee,ae,xe,re,pe){if(oe(ee,Uint8Array)&&(ee=p.from(ee,ee.offset,ee.byteLength)),!p.isBuffer(ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ee);if(ae===void 0&&(ae=0),xe===void 0&&(xe=ee?ee.length:0),re===void 0&&(re=0),pe===void 0&&(pe=this.length),ae<0||xe>ee.length||re<0||pe>this.length)throw new RangeError("out of range index");if(re>=pe&&ae>=xe)return 0;if(re>=pe)return-1;if(ae>=xe)return 1;if(ae>>>=0,xe>>>=0,re>>>=0,pe>>>=0,this===ee)return 0;for(var we=pe-re,Fe=xe-ae,Se=Math.min(we,Fe),ke=this.slice(re,pe),_e=ee.slice(ae,xe),Ie=0;Ie2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,Ee(ae)&&(ae=re?0:ue.length-1),ae<0&&(ae=ue.length+ae),ae>=ue.length){if(re)return-1;ae=ue.length-1}else if(ae<0)if(re)ae=0;else return-1;if(typeof ee=="string"&&(ee=p.from(ee,xe)),p.isBuffer(ee))return ee.length===0?-1:D(ue,ee,ae,xe,re);if(typeof ee=="number")return ee=ee&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(ue,ee,ae):Uint8Array.prototype.lastIndexOf.call(ue,ee,ae):D(ue,[ee],ae,xe,re);throw new TypeError("val must be string, number or Buffer")}function D(ue,ee,ae,xe,re){var pe=1,we=ue.length,Fe=ee.length;if(xe!==void 0&&(xe=String(xe).toLowerCase(),xe==="ucs2"||xe==="ucs-2"||xe==="utf16le"||xe==="utf-16le")){if(ue.length<2||ee.length<2)return-1;pe=2,we/=2,Fe/=2,ae/=2}function Se(Qe,et){return pe===1?Qe[et]:Qe.readUInt16BE(et*pe)}var ke;if(re){var _e=-1;for(ke=ae;kewe&&(ae=we-Fe),ke=ae;ke>=0;ke--){for(var Ie=!0,Oe=0;Oere&&(xe=re)):xe=re;var pe=ee.length;xe>pe/2&&(xe=pe/2);for(var we=0;we>>0,isFinite(xe)?(xe=xe>>>0,re===void 0&&(re="utf8")):(re=xe,xe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-ae;if((xe===void 0||xe>pe)&&(xe=pe),ee.length>0&&(xe<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var we=!1;;)switch(re){case"hex":return F(this,ee,ae,xe);case"utf8":case"utf-8":return P(this,ee,ae,xe);case"ascii":case"latin1":case"binary":return R(this,ee,ae,xe);case"base64":return L(this,ee,ae,xe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ee,ae,xe);default:if(we)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),we=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(ue,ee,ae){return ee===0&&ae===ue.length?l.fromByteArray(ue):l.fromByteArray(ue.slice(ee,ae))}function O(ue,ee,ae){ae=Math.min(ue.length,ae);for(var xe=[],re=ee;re239?4:pe>223?3:pe>191?2:1;if(re+Fe<=ae){var Se,ke,_e,Ie;switch(Fe){case 1:pe<128&&(we=pe);break;case 2:Se=ue[re+1],(Se&192)===128&&(Ie=(pe&31)<<6|Se&63,Ie>127&&(we=Ie));break;case 3:Se=ue[re+1],ke=ue[re+2],(Se&192)===128&&(ke&192)===128&&(Ie=(pe&15)<<12|(Se&63)<<6|ke&63,Ie>2047&&(Ie<55296||Ie>57343)&&(we=Ie));break;case 4:Se=ue[re+1],ke=ue[re+2],_e=ue[re+3],(Se&192)===128&&(ke&192)===128&&(_e&192)===128&&(Ie=(pe&15)<<18|(Se&63)<<12|(ke&63)<<6|_e&63,Ie>65535&&Ie<1114112&&(we=Ie))}}we===null?(we=65533,Fe=1):we>65535&&(we-=65536,xe.push(we>>>10&1023|55296),we=56320|we&1023),xe.push(we),re+=Fe}return Y(xe)}var $=4096;function Y(ue){var ee=ue.length;if(ee<=$)return String.fromCharCode.apply(String,ue);for(var ae="",xe=0;xexe)&&(ae=xe);for(var re="",pe=ee;pexe&&(ee=xe),ae<0?(ae+=xe,ae<0&&(ae=0)):ae>xe&&(ae=xe),aeae)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee],pe=1,we=0;++we>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee+--ae],pe=1;ae>0&&(pe*=256);)re+=this[ee+--ae]*pe;return re},p.prototype.readUint8=p.prototype.readUInt8=function(ee,ae){return ee=ee>>>0,ae||U(ee,1,this.length),this[ee]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,2,this.length),this[ee]|this[ee+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,2,this.length),this[ee]<<8|this[ee+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+this[ee+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]*16777216+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},p.prototype.readIntLE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee],pe=1,we=0;++we=pe&&(re-=Math.pow(2,8*ae)),re},p.prototype.readIntBE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=ae,pe=1,we=this[ee+--re];re>0&&(pe*=256);)we+=this[ee+--re]*pe;return pe*=128,we>=pe&&(we-=Math.pow(2,8*ae)),we},p.prototype.readInt8=function(ee,ae){return ee=ee>>>0,ae||U(ee,1,this.length),this[ee]&128?(255-this[ee]+1)*-1:this[ee]},p.prototype.readInt16LE=function(ee,ae){ee=ee>>>0,ae||U(ee,2,this.length);var xe=this[ee]|this[ee+1]<<8;return xe&32768?xe|4294901760:xe},p.prototype.readInt16BE=function(ee,ae){ee=ee>>>0,ae||U(ee,2,this.length);var xe=this[ee+1]|this[ee]<<8;return xe&32768?xe|4294901760:xe},p.prototype.readInt32LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},p.prototype.readInt32BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},p.prototype.readFloatLE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),u.read(this,ee,!0,23,4)},p.prototype.readFloatBE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),u.read(this,ee,!1,23,4)},p.prototype.readDoubleLE=function(ee,ae){return ee=ee>>>0,ae||U(ee,8,this.length),u.read(this,ee,!0,52,8)},p.prototype.readDoubleBE=function(ee,ae){return ee=ee>>>0,ae||U(ee,8,this.length),u.read(this,ee,!1,52,8)};function V(ue,ee,ae,xe,re,pe){if(!p.isBuffer(ue))throw new TypeError('"buffer" argument must be a Buffer instance');if(ee>re||eeue.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,xe=xe>>>0,!re){var pe=Math.pow(2,8*xe)-1;V(this,ee,ae,xe,pe,0)}var we=1,Fe=0;for(this[ae]=ee&255;++Fe>>0,xe=xe>>>0,!re){var pe=Math.pow(2,8*xe)-1;V(this,ee,ae,xe,pe,0)}var we=xe-1,Fe=1;for(this[ae+we]=ee&255;--we>=0&&(Fe*=256);)this[ae+we]=ee/Fe&255;return ae+xe},p.prototype.writeUint8=p.prototype.writeUInt8=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,1,255,0),this[ae]=ee&255,ae+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,65535,0),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,65535,0),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,4294967295,0),this[ae+3]=ee>>>24,this[ae+2]=ee>>>16,this[ae+1]=ee>>>8,this[ae]=ee&255,ae+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,4294967295,0),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4},p.prototype.writeIntLE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*xe-1);V(this,ee,ae,xe,pe-1,-pe)}var we=0,Fe=1,Se=0;for(this[ae]=ee&255;++we>0)-Se&255;return ae+xe},p.prototype.writeIntBE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*xe-1);V(this,ee,ae,xe,pe-1,-pe)}var we=xe-1,Fe=1,Se=0;for(this[ae+we]=ee&255;--we>=0&&(Fe*=256);)ee<0&&Se===0&&this[ae+we+1]!==0&&(Se=1),this[ae+we]=(ee/Fe>>0)-Se&255;return ae+xe},p.prototype.writeInt8=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,1,127,-128),ee<0&&(ee=255+ee+1),this[ae]=ee&255,ae+1},p.prototype.writeInt16LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,32767,-32768),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},p.prototype.writeInt16BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,32767,-32768),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},p.prototype.writeInt32LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,2147483647,-2147483648),this[ae]=ee&255,this[ae+1]=ee>>>8,this[ae+2]=ee>>>16,this[ae+3]=ee>>>24,ae+4},p.prototype.writeInt32BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4};function X(ue,ee,ae,xe,re,pe){if(ae+xe>ue.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function H(ue,ee,ae,xe,re){return ee=+ee,ae=ae>>>0,re||X(ue,ee,ae,4,34028234663852886e22,-34028234663852886e22),u.write(ue,ee,ae,xe,23,4),ae+4}p.prototype.writeFloatLE=function(ee,ae,xe){return H(this,ee,ae,!0,xe)},p.prototype.writeFloatBE=function(ee,ae,xe){return H(this,ee,ae,!1,xe)};function G(ue,ee,ae,xe,re){return ee=+ee,ae=ae>>>0,re||X(ue,ee,ae,8,17976931348623157e292,-17976931348623157e292),u.write(ue,ee,ae,xe,52,8),ae+8}p.prototype.writeDoubleLE=function(ee,ae,xe){return G(this,ee,ae,!0,xe)},p.prototype.writeDoubleBE=function(ee,ae,xe){return G(this,ee,ae,!1,xe)},p.prototype.copy=function(ee,ae,xe,re){if(!p.isBuffer(ee))throw new TypeError("argument should be a Buffer");if(xe||(xe=0),!re&&re!==0&&(re=this.length),ae>=ee.length&&(ae=ee.length),ae||(ae=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),ee.length-ae>>0,xe=xe===void 0?this.length:xe>>>0,ee||(ee=0);var we;if(typeof ee=="number")for(we=ae;we55295&&ae<57344){if(!re){if(ae>56319){(ee-=3)>-1&&pe.push(239,191,189);continue}else if(we+1===xe){(ee-=3)>-1&&pe.push(239,191,189);continue}re=ae;continue}if(ae<56320){(ee-=3)>-1&&pe.push(239,191,189),re=ae;continue}ae=(re-55296<<10|ae-56320)+65536}else re&&(ee-=3)>-1&&pe.push(239,191,189);if(re=null,ae<128){if((ee-=1)<0)break;pe.push(ae)}else if(ae<2048){if((ee-=2)<0)break;pe.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((ee-=3)<0)break;pe.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((ee-=4)<0)break;pe.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return pe}function ge(ue){for(var ee=[],ae=0;ae>8,re=ae%256,pe.push(re),pe.push(xe);return pe}function be(ue){return l.toByteArray(te(ue))}function he(ue,ee,ae,xe){for(var re=0;re=ee.length||re>=ue.length);++re)ee[re+ae]=ue[re];return re}function oe(ue,ee){return ue instanceof ee||ue!=null&&ue.constructor!=null&&ue.constructor.name!=null&&ue.constructor.name===ee.name}function Ee(ue){return ue!==ue}var ye=(function(){for(var ue="0123456789abcdef",ee=new Array(256),ae=0;ae<16;++ae)for(var xe=ae*16,re=0;re<16;++re)ee[xe+re]=ue[ae]+ue[re];return ee})()},2538(n,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);n.exports=v;function f(m){return[Math.min(m[0],m[1]),Math.max(m[0],m[1])]}function h(m,g){return m[0]-g[0]||m[1]-g[1]}function d(m){return m.map(f).sort(h)}function p(m,g,w){return g in m?m[g]:w}function v(m,g,w){Array.isArray(g)?(w=w||{},g=g||[]):(w=g||{},g=[]);var b=!!p(w,"delaunay",!0),_=!!p(w,"interior",!0),M=!!p(w,"exterior",!0),x=!!p(w,"infinity",!1);if(!_&&!M||m.length===0)return[];var T=s(m,g);if(b||_!==M||x){for(var A=l(m.length,d(g)),y=0;y0;){for(var b=d.pop(),m=d.pop(),_=-1,M=-1,g=v[m],T=1;T=0||(h.flip(m,b),u(f,h,d,_,m,M),u(f,h,d,m,M,_),u(f,h,d,M,b,_),u(f,h,d,b,_,M))}}},5023(n,a,o){"use strict";var s=o(2478);n.exports=d;function l(p,v,m,g,w,b,_){this.cells=p,this.neighbor=v,this.flags=g,this.constraint=m,this.active=w,this.next=b,this.boundary=_}var u=l.prototype;function c(p,v){return p[0]-v[0]||p[1]-v[1]||p[2]-v[2]}u.locate=(function(){var p=[0,0,0];return function(v,m,g){var w=v,b=m,_=g;return m0||_.length>0;){for(;b.length>0;){var y=b.pop();if(M[y]!==-w){M[y]=w;for(var E=x[y],S=0;S<3;++S){var C=A[3*y+S];C>=0&&M[C]===0&&(T[3*y+S]?_.push(C):(b.push(C),M[C]=w))}}}var k=_;_=b,b=k,_.length=0,w=-w}var D=h(x,M,v);return m?D.concat(g.boundary):D}},8902(n,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;n.exports=_;function h(M,x,T,A,y){this.a=M,this.b=x,this.idx=T,this.lowerIds=A,this.upperIds=y}function d(M,x,T,A){this.a=M,this.b=x,this.type=T,this.idx=A}function p(M,x){var T=M.a[0]-x.a[0]||M.a[1]-x.a[1]||M.type-x.type;return T||M.type!==u&&(T=l(M.a,M.b,x.b),T)?T:M.idx-x.idx}function v(M,x){return l(M.a,M.b,x)}function m(M,x,T,A,y){for(var E=s.lt(x,A,v),S=s.gt(x,A,v),C=E;C1&&l(T[D[P-2]],T[D[P-1]],A)>0;)M.push([D[P-1],D[P-2],y]),P-=1;D.length=P,D.push(y);for(var F=k.upperIds,P=F.length;P>1&&l(T[F[P-2]],T[F[P-1]],A)<0;)M.push([F[P-2],F[P-1],y]),P-=1;F.length=P,F.push(y)}}function g(M,x){var T;return M.a[0]k[0]&&y.push(new d(k,C,f,E),new d(C,k,c,E))}y.sort(p);for(var D=y[0].a[0]-(1+Math.abs(y[0].a[0]))*Math.pow(2,-52),F=[new h([D,1],[D,0],-1,[],[],[],[])],P=[],E=0,R=y.length;E=0}})(),u.removeTriangle=function(h,d,p){var v=this.stars;c(v[h],d,p),c(v[d],p,h),c(v[p],h,d)},u.addTriangle=function(h,d,p){var v=this.stars;v[h].push(d,p),v[d].push(p,h),v[p].push(h,d)},u.opposite=function(h,d){for(var p=this.stars[d],v=1,m=p.length;v=0;--L){var J=P[L];I=J[0];var U=D[I],V=U[0],X=U[1],H=k[V],G=k[X];if((H[0]-G[0]||H[1]-G[1])<0){var Q=V;V=X,X=Q}U[0]=V;var te=U[1]=J[1],ce;for(R&&(ce=U[2]);L>0&&P[L-1][0]===I;){var J=P[--L],ge=J[1];R?D.push([te,ge,ce]):D.push([te,ge]),te=ge}R?D.push([te,X,ce]):D.push([te,X])}return B}function x(k,D,F){for(var P=D.length,R=new s(P),L=[],I=0;ID[2]?1:0)}function y(k,D,F){if(k.length!==0){if(D)for(var P=0;P0||I.length>0}function C(k,D,F){var P;if(F){P=D;for(var R=new Array(D.length),L=0;LM+1)throw new Error(b+" map requires nshades to be at least size "+w.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],p=w.map(function(C){return Math.round(C.index*M)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var A=w.map(function(C,k){var D=w[k].index,F=w[k].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=x[0]+(x[1]-x[0])*D),F}),y=[];for(T=0;T=0}function d(p,v,m,g){var w=s(v,m,g);if(w===0){var b=l(s(p,v,m)),_=l(s(p,v,g));if(b===_){if(b===0){var M=h(p,v,m),x=h(p,v,g);return M===x?0:M?1:-1}return 0}else{if(_===0)return b>0||h(p,v,g)?-1:1;if(b===0)return _>0||h(p,v,m)?1:-1}return l(_-b)}var T=s(p,v,m);if(T>0)return w>0&&s(p,v,g)>0?1:-1;if(T<0)return w>0||s(p,v,g)>0?1:-1;var A=s(p,v,g);return A>0||h(p,v,m)?1:-1}},8572(n){"use strict";n.exports=function(o){return o<0?-1:o>0?1:0}},8507(n){n.exports=s;var a=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]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var p=a(l[0],l[1]),v=a(u[0],u[1]);return a(p,l[2])-a(v,u[2])||a(p+l[2],h)-a(v+u[2],d);case 4:var m=l[0],g=l[1],w=l[2],b=l[3],_=u[0],M=u[1],x=u[2],T=u[3];return m+g+w+b-(_+M+x+T)||a(m,g,w,b)-a(_,M,x,T,_)||a(m+g,m+w,m+b,g+w,g+b,w+b)-a(_+M,_+x,_+T,M+x,M+T,x+T)||a(m+g+w,m+g+b,m+w+b,g+w+b)-a(_+M+x,_+M+T,_+x+T,M+x+T);default:for(var A=l.slice().sort(o),y=u.slice().sort(o),E=0;Eo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750(n,a,o){"use strict";n.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],p=0;p=d[_]&&(b+=1);g[w]=b}}return h}function f(h,d){try{return s(h,!0)}catch(g){var p=l(h);if(p.length<=d)return[];var v=u(h,p),m=s(v,!0);return c(m,p)}}},4769(n){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,p=3*f*f-4*f+1,v=-6*f*f+6*f,m=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=d*s[g]+p*l[g]+v*u[g]+m*c[g];return h}return d*s+p*l+v*u[g]+m*c}function o(s,l,u,c,f,h){var d=f-1,p=f*f,v=d*d,m=(1+2*f)*v,g=f*v,w=p*(3-2*f),b=p*d;if(s.length){h||(h=new Array(s.length));for(var _=s.length-1;_>=0;--_)h[_]=m*s[_]+g*l[_]+w*u[_]+b*c[_];return h}return m*s+g*l+w*u+b*c}n.exports=o,n.exports.derivative=a},7642(n,a,o){"use strict";var s=o(8954),l=o(1682);n.exports=h;function u(d,p){this.point=d,this.index=p}function c(d,p){for(var v=d.point,m=p.point,g=v.length,w=0;w=2)return!1;F[R]=L}return!0}):D=D.filter(function(F){for(var P=0;P<=m;++P){var R=E[F[P]];if(R<0)return!1;F[P]=R}return!0}),m&1)for(var b=0;b>>31},n.exports.exponent=function(w){var b=n.exports.hi(w);return(b<<1>>>21)-1023},n.exports.fraction=function(w){var b=n.exports.lo(w),_=n.exports.hi(w),M=_&(1<<20)-1;return _&2146435072&&(M+=1048576),[b,M]},n.exports.denormalized=function(w){var b=n.exports.hi(w);return!(b&2146435072)}},1338(n){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}n.exports=s},3134(n,a,o){"use strict";n.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=m-1)for(var T=b.length-1,y=p-v[m-1],A=0;A=m-1)for(var x=b.length-1,T=p-v[m-1],A=0;A=0;--m)if(p[--v])return!1;return!0},f.jump=function(p){var v=this.lastT(),m=this.dimension;if(!(p0;--A)g.push(u(M[A-1],x[A-1],arguments[A])),w.push(0)}},f.push=function(p){var v=this.lastT(),m=this.dimension;if(!(p1e-6?1/_:0;this._time.push(p);for(var y=m;y>0;--y){var E=u(x[y-1],T[y-1],arguments[y]);g.push(E),w.push((E-g[b++])*A)}}},f.set=function(p){var v=this.dimension;if(!(p0;--M)m.push(u(b[M-1],_[M-1],arguments[M])),g.push(0)}},f.move=function(p){var v=this.lastT(),m=this.dimension;if(!(p<=v||arguments.length!==m+1)){var g=this._state,w=this._velocity,b=g.length-this.dimension,_=this.bounds,M=_[0],x=_[1],T=p-v,A=T>1e-6?1/T:0;this._time.push(p);for(var y=m;y>0;--y){var E=arguments[y];g.push(u(M[y-1],x[y-1],g[b++]+E)),w.push(E*A)}}},f.idle=function(p){var v=this.lastT();if(!(p=0;--A)g.push(u(M[A],x[A],g[b]+T*w[b])),w.push(0),b+=1}};function h(p){for(var v=new Array(p),m=0;m=0;--k){var y=E[k];S[k]<=0?E[k]=new s(y._color,y.key,y.value,E[k+1],y.right,y._count+1):E[k]=new s(y._color,y.key,y.value,y.left,E[k+1],y._count+1)}for(var k=E.length-1;k>1;--k){var D=E[k-1],y=E[k];if(D._color===o||y._color===o)break;var F=E[k-2];if(F.left===D)if(D.left===y){var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.left=D.right,D._color=o,D.right=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.left===F?R.left=D:R.right=D}break}}else{var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(D.right=y.left,F._color=a,F.left=y.right,y._color=o,y.left=D,y.right=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.left===F?R.left=y:R.right=y}break}}else if(D.right===y){var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.right=D.left,D._color=o,D.left=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.right===F?R.right=D:R.left=D}break}}else{var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(D.left=y.right,F._color=a,F.right=y.left,y._color=o,y.right=D,y.left=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.right===F?R.right=y:R.left=y}break}}}return E[0]._color=o,new f(A,E[0])};function d(x,T){if(T.left){var A=d(x,T.left);if(A)return A}var A=x(T.key,T.value);if(A)return A;if(T.right)return d(x,T.right)}function p(x,T,A,y){var E=T(x,y.key);if(E<=0){if(y.left){var S=p(x,T,A,y.left);if(S)return S}var S=A(y.key,y.value);if(S)return S}if(y.right)return p(x,T,A,y.right)}function v(x,T,A,y,E){var S=A(x,E.key),C=A(T,E.key),k;if(S<=0&&(E.left&&(k=v(x,T,A,y,E.left),k)||C>0&&(k=y(E.key,E.value),k)))return k;if(C>0&&E.right)return v(x,T,A,y,E.right)}h.forEach=function(T,A,y){if(this.root)switch(arguments.length){case 1:return d(T,this.root);case 2:return p(A,this._compare,T,this.root);case 3:return this._compare(A,y)>=0?void 0:v(A,y,this._compare,T,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],T=this.root;T;)x.push(T),T=T.left;return new m(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],T=this.root;T;)x.push(T),T=T.right;return new m(this,x)}}),h.at=function(x){if(x<0)return new m(this,[]);for(var T=this.root,A=[];;){if(A.push(T),T.left){if(x=T.right._count)break;T=T.right}else break}return new m(this,[])},h.ge=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S<=0&&(E=y.length),S<=0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.gt=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S<0&&(E=y.length),S<0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.lt=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S>0&&(E=y.length),S<=0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.le=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S>=0&&(E=y.length),S<0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.find=function(x){for(var T=this._compare,A=this.root,y=[];A;){var E=T(x,A.key);if(y.push(A),E===0)return new m(this,y);E<=0?A=A.left:A=A.right}return new m(this,[])},h.remove=function(x){var T=this.find(x);return T?T.remove():this},h.get=function(x){for(var T=this._compare,A=this.root;A;){var y=T(x,A.key);if(y===0)return A.value;y<=0?A=A.left:A=A.right}};function m(x,T){this.tree=x,this._stack=T}var g=m.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new m(this.tree,this._stack.slice())};function w(x,T){x.key=T.key,x.value=T.value,x.left=T.left,x.right=T.right,x._color=T._color,x._count=T._count}function b(x){for(var T,A,y,E,S=x.length-1;S>=0;--S){if(T=x[S],S===0){T._color=o;return}if(A=x[S-1],A.left===T){if(y=A.right,y.right&&y.right._color===a){if(y=A.right=l(y),E=y.right=l(y.right),A.right=y.left,y.left=A,y.right=E,y._color=A._color,T._color=o,A._color=o,E._color=o,c(A),c(y),S>1){var C=x[S-2];C.left===A?C.left=y:C.right=y}x[S-1]=y;return}else if(y.left&&y.left._color===a){if(y=A.right=l(y),E=y.left=l(y.left),A.right=E.left,y.left=E.right,E.left=A,E.right=y,E._color=A._color,A._color=o,y._color=o,T._color=o,c(A),c(y),c(E),S>1){var C=x[S-2];C.left===A?C.left=E:C.right=E}x[S-1]=E;return}if(y._color===o)if(A._color===a){A._color=o,A.right=u(a,y);return}else{A.right=u(a,y);continue}else{if(y=l(y),A.right=y.left,y.left=A,y._color=A._color,A._color=a,c(A),c(y),S>1){var C=x[S-2];C.left===A?C.left=y:C.right=y}x[S-1]=y,x[S]=A,S+11){var C=x[S-2];C.right===A?C.right=y:C.left=y}x[S-1]=y;return}else if(y.right&&y.right._color===a){if(y=A.left=l(y),E=y.right=l(y.right),A.left=E.right,y.right=E.left,E.right=A,E.left=y,E._color=A._color,A._color=o,y._color=o,T._color=o,c(A),c(y),c(E),S>1){var C=x[S-2];C.right===A?C.right=E:C.left=E}x[S-1]=E;return}if(y._color===o)if(A._color===a){A._color=o,A.left=u(a,y);return}else{A.left=u(a,y);continue}else{if(y=l(y),A.left=y.right,y.right=A,y._color=A._color,A._color=a,c(A),c(y),S>1){var C=x[S-2];C.right===A?C.right=y:C.left=y}x[S-1]=y,x[S]=A,S+1=0;--y){var A=x[y];A.left===x[y+1]?T[y]=new s(A._color,A.key,A.value,T[y+1],A.right,A._count):T[y]=new s(A._color,A.key,A.value,A.left,T[y+1],A._count)}if(A=T[T.length-1],A.left&&A.right){var E=T.length;for(A=A.left;A.right;)T.push(A),A=A.right;var S=T[E-1];T.push(new s(A._color,S.key,S.value,A.left,A.right,A._count)),T[E-1].key=A.key,T[E-1].value=A.value;for(var y=T.length-2;y>=E;--y)A=T[y],T[y]=new s(A._color,A.key,A.value,A.left,T[y+1],A._count);T[E-1].left=T[E]}if(A=T[T.length-1],A._color===a){var C=T[T.length-2];C.left===A?C.left=null:C.right===A&&(C.right=null),T.pop();for(var y=0;y0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var x=0,T=this._stack;if(T.length===0){var A=this.tree.root;return A?A._count:0}else T[T.length-1].left&&(x=T[T.length-1].left._count);for(var y=T.length-2;y>=0;--y)T[y+1]===T[y].right&&(++x,T[y].left&&(x+=T[y].left._count));return x},enumerable:!0}),g.next=function(){var x=this._stack;if(x.length!==0){var T=x[x.length-1];if(T.right)for(T=T.right;T;)x.push(T),T=T.left;else for(x.pop();x.length>0&&x[x.length-1].right===T;)T=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var T=x.length-1;T>0;--T)if(x[T-1].left===x[T])return!0;return!1}}),g.update=function(x){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var A=new Array(T.length),y=T[T.length-1];A[A.length-1]=new s(y._color,y.key,x,y.left,y.right,y._count);for(var E=T.length-2;E>=0;--E)y=T[E],y.left===T[E+1]?A[E]=new s(y._color,y.key,y.value,A[E+1],y.right,y._count):A[E]=new s(y._color,y.key,y.value,y.left,A[E+1],y._count);return new f(this.tree._compare,A[0])},g.prev=function(){var x=this._stack;if(x.length!==0){var T=x[x.length-1];if(T.left)for(T=T.left;T;)x.push(T),T=T.right;else for(x.pop();x.length>0&&x[x.length-1].left===T;)T=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var T=x.length-1;T>0;--T)if(x[T-1].right===x[T])return!0;return!1}});function _(x,T){return xT?1:0}function M(x){return new f(x||_,null)}},3837(n,a,o){"use strict";n.exports=k;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,p=DataView;function v(D){return d.isView(D)&&!(D instanceof p)}function m(D){return Array.isArray(D)||v(D)}function g(D,F){return D[0]=F[0],D[1]=F[1],D[2]=F[2],D}function w(D){this.gl=D,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(D)}var b=w.prototype;b.update=function(D){D=D||{};function F(V,X,H){if(H in D){var G=D[H],Q=this[H],te;(V?m(G)&&m(G[0]):m(G))?this[H]=te=[X(G[0]),X(G[1]),X(G[2])]:this[H]=te=[X(G),X(G),X(G)];for(var ce=0;ce<3;++ce)if(te[ce]!==Q[ce])return!0}return!1}var P=F.bind(this,!1,Number),R=F.bind(this,!1,Boolean),L=F.bind(this,!1,String),I=F.bind(this,!0,function(V){if(m(V)){if(V.length===3)return[+V[0],+V[1],+V[2],1];if(V.length===4)return[+V[0],+V[1],+V[2],+V[3]]}return[0,0,0,1]}),B,O=!1,$=!1;if("bounds"in D)for(var Y=D.bounds,K=0;K<2;++K)for(var j=0;j<3;++j)Y[K][j]!==this.bounds[K][j]&&($=!0),this.bounds[K][j]=Y[K][j];if("ticks"in D){B=D.ticks,O=!0,this.autoTicks=!1;for(var K=0;K<3;++K)this.tickSpacing[K]=0}else P("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in D||"tickSpacing"in D||(this.autoTicks=!0),$=!0,O=!0,this._firstInit=!1),$&&this.autoTicks&&(B=f.create(this.bounds,this.tickSpacing),O=!0),O){for(var K=0;K<3;++K)B[K].sort(function(X,H){return X.x-H.x});f.equal(B,this.ticks)?O=!1:this.ticks=B}R("tickEnable"),L("tickFont")&&(O=!0),L("tickFontStyle")&&(O=!0),L("tickFontWeight")&&(O=!0),L("tickFontVariant")&&(O=!0),P("tickSize"),P("tickAngle"),P("tickPad"),I("tickColor");var q=L("labels");L("labelFont")&&(q=!0),L("labelFontStyle")&&(q=!0),L("labelFontWeight")&&(q=!0),L("labelFontVariant")&&(q=!0),R("labelEnable"),P("labelSize"),P("labelPad"),I("labelColor"),R("lineEnable"),R("lineMirror"),P("lineWidth"),I("lineColor"),R("lineTickEnable"),R("lineTickMirror"),P("lineTickLength"),P("lineTickWidth"),I("lineTickColor"),R("gridEnable"),P("gridWidth"),I("gridColor"),R("zeroEnable"),I("zeroLineColor"),P("zeroLineWidth"),R("backgroundEnable"),I("backgroundColor");var J=[{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]}],U=[{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&&(q||O)&&this._text.update(this.bounds,this.labels,J,this.ticks,U):this._text=s(this.gl,this.bounds,this.labels,J,this.ticks,U),this._lines&&O&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function _(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new _,new _,new _];function x(D,F,P,R,L){for(var I=D.primalOffset,B=D.primalMinor,O=D.mirrorOffset,$=D.mirrorMinor,Y=R[F],K=0;K<3;++K)if(F!==K){var j=I,q=O,J=B,U=$;Y&1<0?(J[K]=-1,U[K]=0):(J[K]=0,U[K]=1)}}var T=[0,0,0],A={model:h,view:h,projection:h,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(D){};var y=0,E=[0,0,0],S=[0,0,0],C=[0,0,0];b.draw=function(D){D=D||A;for(var H=this.gl,F=D.model||h,P=D.view||h,R=D.projection||h,L=this.bounds,I=D._ortho||!1,B=c(F,P,R,L,I),O=B.cubeEdges,$=B.axis,Y=P[12],K=P[13],j=P[14],q=P[15],J=I?2:1,U=J*this.pixelRatio*(R[3]*Y+R[7]*K+R[11]*j+R[15]*q)/H.drawingBufferHeight,V=0;V<3;++V)this.lastCubeProps.cubeEdges[V]=O[V],this.lastCubeProps.axis[V]=$[V];for(var X=M,V=0;V<3;++V)x(M[V],V,this.bounds,O,$);for(var H=this.gl,G=T,V=0;V<3;++V)this.backgroundEnable[V]?G[V]=$[V]:G[V]=0;this._background.draw(F,P,R,L,G,this.backgroundColor),this._lines.bind(F,P,R,this);for(var V=0;V<3;++V){var Q=[0,0,0];$[V]>0?Q[V]=L[1][V]:Q[V]=L[0][V];for(var te=0;te<2;++te){var ce=(V+1+te)%3,ge=(V+1+(te^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,ge,this.bounds,Q,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var te=0;te<2;++te){var ce=(V+1+te)%3,ge=(V+1+(te^1))%3;this.zeroEnable[ge]&&Math.min(L[0][ge],L[1][ge])<=0&&Math.max(L[0][ge],L[1][ge])>=0&&this._lines.drawZero(ce,ge,this.bounds,Q,this.zeroLineColor[ge],this.zeroLineWidth[ge]*this.pixelRatio)}}for(var V=0;V<3;++V){this.lineEnable[V]&&this._lines.drawAxisLine(V,this.bounds,X[V].primalOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio),this.lineMirror[V]&&this._lines.drawAxisLine(V,this.bounds,X[V].mirrorOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio);for(var Ce=g(E,X[V].primalMinor),be=g(S,X[V].mirrorMinor),he=this.lineTickLength,te=0;te<3;++te){var oe=U/F[5*te];Ce[te]*=he[te]*oe,be[te]*=he[te]*oe}this.lineTickEnable[V]&&this._lines.drawAxisTicks(V,X[V].primalOffset,Ce,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio),this.lineTickMirror[V]&&this._lines.drawAxisTicks(V,X[V].mirrorOffset,be,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,P,R,this.pixelRatio);var Ee,ye=.5,ue,ee;function ae(Se){ee=[0,0,0],ee[Se]=1}function xe(Se,ke,_e){var Ie=(Se+1)%3,Oe=(Se+2)%3,Qe=ke[Ie],et=ke[Oe],_t=_e[Ie],ut=_e[Oe];if(Qe>0&&ut>0){ae(Ie);return}else if(Qe>0&&ut<0){ae(Ie);return}else if(Qe<0&&ut>0){ae(Ie);return}else if(Qe<0&&ut<0){ae(Ie);return}else if(et>0&&_t>0){ae(Oe);return}else if(et>0&&_t<0){ae(Oe);return}else if(et<0&&_t>0){ae(Oe);return}else if(et<0&&_t<0){ae(Oe);return}}for(var V=0;V<3;++V){for(var re=X[V].primalMinor,pe=X[V].mirrorMinor,we=g(C,X[V].primalOffset),te=0;te<3;++te)this.lineTickEnable[V]&&(we[te]+=U*re[te]*Math.max(this.lineTickLength[te],0)/F[5*te]);var Fe=[0,0,0];if(Fe[V]=1,this.tickEnable[V]){this.tickAngle[V]===-3600?(this.tickAngle[V]=0,this.tickAlign[V]="auto"):this.tickAlign[V]=-1,ue=1,Ee=[this.tickAlign[V],ye,ue],Ee[0]==="auto"?Ee[0]=y:Ee[0]=parseInt(""+Ee[0]),ee=[0,0,0],xe(V,re,pe);for(var te=0;te<3;++te)we[te]+=U*re[te]*this.tickPad[te]/F[5*te];this._text.drawTicks(V,this.tickSize[V],this.tickAngle[V],we,this.tickColor[V],Fe,ee,Ee)}if(this.labelEnable[V]){ue=0,ee=[0,0,0],this.labels[V].length>4&&(ae(V),ue=1),Ee=[this.labelAlign[V],ye,ue],Ee[0]==="auto"?Ee[0]=y:Ee[0]=parseInt(""+Ee[0]);for(var te=0;te<3;++te)we[te]+=U*re[te]*this.labelPad[te]/F[5*te];we[V]+=.5*(L[0][V]+L[1][V]),this._text.drawLabel(V,this.labelSize[V],this.labelAngle[V],we,this.labelColor[V],[0,0,0],ee,Ee)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function k(D,F){var P=new w(D);return P.update(F),P}},5304(n,a,o){"use strict";n.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,p,v,m){this.gl=d,this.buffer=p,this.vao=v,this.shader=m}var f=c.prototype;f.draw=function(d,p,v,m,g,w){for(var b=!1,_=0;_<3;++_)b=b||g[_];if(b){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:p,projection:v,bounds:m,enable:g,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var p=[],v=[],m=0,g=0;g<3;++g)for(var w=(g+1)%3,b=(g+2)%3,_=[0,0,0],M=[0,0,0],x=-1;x<=1;x+=2){v.push(m,m+2,m+1,m+1,m+2,m+3),_[g]=x,M[g]=x;for(var T=-1;T<=1;T+=2){_[w]=T;for(var A=-1;A<=1;A+=2)_[b]=A,p.push(_[0],_[1],_[2],M[0],M[1],M[2]),m+=1}var y=w;w=b,b=y}var E=s(d,new Float32Array(p)),S=s(d,new Uint16Array(v),d.ELEMENT_ARRAY_BUFFER),C=l(d,[{buffer:E,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:E,type:d.FLOAT,size:3,offset:12,stride:24}],S),k=u(d);return k.attributes.position.location=0,k.attributes.normal.location=1,new c(d,E,C,k)}},6429(n,a,o){"use strict";n.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),p=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)h[T]=[1,1,1,1],d[T]=[1,1,1]})();function m(T,A,y){for(var E=0;E<4;++E){T[E]=y[12+E];for(var S=0;S<3;++S)T[E]+=A[S]*y[4*S+E]}}var g=[[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 A=0;A$&&(P|=1<$){P|=1<d[k][1])&&(X=k);for(var H=-1,k=0;k<3;++k){var G=X^1<d[Q][0]&&(Q=G)}}var te=b;te[0]=te[1]=te[2]=0,te[s.log2(H^X)]=X&H,te[s.log2(X^Q)]=X&Q;var ce=Q^7;ce===P||ce===V?(ce=H^7,te[s.log2(Q^ce)]=ce&Q):te[s.log2(H^ce)]=ce&H;for(var ge=_,Ce=P,I=0;I<3;++I)Ce&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); } `]),h=s([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);a.Q=function(v){return l(v,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); } `]),p=s([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);a.bg=function(v){return l(v,d,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(n,a,o){"use strict";n.exports=w;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function p(b,_,M,x){this.gl=b,this.shader=_,this.buffer=M,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=p.prototype,m=[0,0];v.bind=function(b,_,M,x){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=b,T.view=_,T.projection=M,T.pixelScale=x,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},v.unbind=function(){this.vao.unbind()},v.update=function(b,_,M,x,T){var A=[];function y(I,B,O,$,Y,K){var j=[O.style,O.weight,O.variant,O.family].join("_"),q=h[j];q||(q=h[j]={});var J=q[B];J||(J=q[B]=g(B,{triangles:!0,font:O.family,fontStyle:O.style,fontWeight:O.weight,fontVariant:O.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Y,styletags:K}));for(var U=($||12)/12,V=J.positions,X=J.cells,H=0,G=X.length;H=0;--te){var ce=V[Q[te]];A.push(U*ce[0],-U*ce[1],I)}}for(var E=[0,0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0],D=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},P=0;P<3;++P){C[P]=A.length/d|0,y(.5*(b[0][P]+b[1][P]),_[P],M[P],12,D,F),k[P]=(A.length/d|0)-C[P],E[P]=A.length/d|0;for(var R=0;R=0&&(d=f.length-h-1);var p=Math.pow(10,d),v=Math.round(u*c*p),m=v+"";if(m.indexOf("e")>=0)return m;var g=v/p,w=v%p;v<0?(g=-Math.ceil(g)|0,w=-w|0):(g=Math.floor(g)|0,w=w|0);var b=""+g;if(v<0&&(b="-"+b),d){for(var _=""+w;_.length=u[0][h];--v)d.push({x:v*c[h],text:o(c[h],v)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hb)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(w,x,M),b}function p(g,w){for(var b=s.malloc(g.length,w),_=g.length,M=0;M<_;++M)b[M]=g[M];return b}function v(g,w){for(var b=1,_=w.length-1;_>=0;--_){if(w[_]!==b)return!1;b*=g[_]}return!0}h.update=function(g,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var b=g.dtype;if(c.indexOf(b)<0&&(b="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var _=gl.getExtension("OES_element_index_uint");_&&b!=="uint16"?b="uint32":b="uint16"}if(b===g.dtype&&v(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,g.data,w):this.length=d(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),w);else{var M=s.malloc(g.size,b),x=u(M,g.shape);l.assign(x,g),w<0?this.length=d(this.gl,this.type,this.length,this.usage,M,w):this.length=d(this.gl,this.type,this.length,this.usage,M.subarray(0,g.size),w),s.free(M)}}else if(Array.isArray(g)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=p(g,"uint16"):T=p(g,"float32"),w<0?this.length=d(this.gl,this.type,this.length,this.usage,T,w):this.length=d(this.gl,this.type,this.length,this.usage,T.subarray(0,g.length),w),s.free(T)}else if(typeof g=="object"&&typeof g.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,g,w);else if(typeof g=="number"||g===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function m(g,w,b,_){if(b=b||g.ARRAY_BUFFER,_=_||g.DYNAMIC_DRAW,b!==g.ARRAY_BUFFER&&b!==g.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(_!==g.DYNAMIC_DRAW&&_!==g.STATIC_DRAW&&_!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=g.createBuffer(),x=new f(g,b,M,0,_);return x.update(w),x}n.exports=m},6405(n,a,o){"use strict";var s=o(2931);n.exports=function(u,c){var f=u.positions,h=u.vectors,d={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]),d;for(var p=0,v=1/0,m=-1/0,g=1/0,w=-1/0,b=1/0,_=-1/0,M=null,x=null,T=[],A=1/0,y=!1,E=u.coneSizemode==="raw",S=0;Sp&&(p=s.length(k)),S&&!E){var D=2*s.distance(M,C)/(s.length(x)+s.length(k));D?(A=Math.min(A,D),y=!1):y=!0}y||(M=C,x=k),T.push(k)}var F=[v,g,b],P=[m,w,_];c&&(c[0]=F,c[1]=P),p===0&&(p=1);var R=1/p;isFinite(A)||(A=1),d.vectorScale=A;var L=u.coneSize||(E?1:.5);u.absoluteConeSize&&(L=u.absoluteConeSize*R),d.coneScale=L;for(var S=0,I=0;S=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(T){this.pickId=T};function w(T){for(var A=p({colormap:T,nshades:256,format:"rgba"}),y=new Uint8Array(256*4),E=0;E<256;++E){for(var S=A[E],C=0;C<3;++C)y[4*E+C]=S[C];y[4*E+3]=S[3]*255}return d(y,[256,256,4],[4,0,1])}function b(T){for(var A=T.length,y=new Array(A),E=0;E0){var I=this.triShader;I.bind(),I.uniforms=D,this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(T){T=T||{};for(var A=this.gl,y=T.model||v,E=T.view||v,S=T.projection||v,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)C[0][k]=Math.max(C[0][k],this.clipBounds[0][k]),C[1][k]=Math.min(C[1][k],this.clipBounds[1][k]);this._model=[].slice.call(y),this._view=[].slice.call(E),this._projection=[].slice.call(S),this._resolution=[A.drawingBufferWidth,A.drawingBufferHeight];var D={model:y,view:E,projection:S,clipBounds:C,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(T){if(!T||T.id!==this.pickId)return null;var A=T.value[0]+256*T.value[1]+65536*T.value[2],y=this.cells[A],E=this.positions[y[1]].slice(0,3),S={position:E,dataCoordinate:E,index:Math.floor(y[1]/48)};return this.traceType==="cone"?S.index=Math.floor(y[1]/48):this.traceType==="streamtube"&&(S.intensity=this.intensity[y[1]],S.velocity=this.vectors[y[1]].slice(0,3),S.divergence=this.vectors[y[1]][3],S.index=A),S},g.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 _(T,A){var y=s(T,A.meshShader.vertex,A.meshShader.fragment,null,A.meshShader.attributes);return y.attributes.position.location=0,y.attributes.color.location=2,y.attributes.uv.location=3,y.attributes.vector.location=4,y}function M(T,A){var y=s(T,A.pickShader.vertex,A.pickShader.fragment,null,A.pickShader.attributes);return y.attributes.position.location=0,y.attributes.id.location=1,y.attributes.vector.location=4,y}function x(T,A,y){var E=y.shaders;arguments.length===1&&(A=T,T=A.gl);var S=_(T,E),C=M(T,E),k=c(T,d(new Uint8Array([255,255,255,255]),[1,1,4]));k.generateMipmap(),k.minFilter=T.LINEAR_MIPMAP_LINEAR,k.magFilter=T.LINEAR;var D=l(T),F=l(T),P=l(T),R=l(T),L=l(T),I=u(T,[{buffer:D,type:T.FLOAT,size:4},{buffer:L,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:P,type:T.FLOAT,size:4},{buffer:R,type:T.FLOAT,size:2},{buffer:F,type:T.FLOAT,size:4}]),B=new m(T,k,S,C,D,F,L,P,R,I,y.traceType||"cone");return B.update(A),B}n.exports=x},614(n,a,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * conePosition); f_id = id; f_position = position.xyz; } `]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(n){n.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(n,a,o){var s=o(737);n.exports=function(u){return s[u]}},9165(n,a,o){"use strict";n.exports=m;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(g,w,b,_){this.gl=g,this.shader=_,this.buffer=w,this.vao=b,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var w=this.gl,b=this.shader.uniforms;this.shader.bind();var _=b.view=g.view||c,M=b.projection=g.projection||c;b.model=g.model||c,b.clipBounds=this.clipBounds,b.opacity=this.opacity;var x=_[12],T=_[13],A=_[14],y=_[15],E=g._ortho||!1,S=E?2:1,C=S*this.pixelRatio*(M[3]*x+M[7]*T+M[11]*A+M[15]*y)/w.drawingBufferHeight;this.vao.bind();for(var k=0;k<3;++k)w.lineWidth(this.lineWidth[k]*this.pixelRatio),b.capSize=this.capSize[k]*C,this.lineCount[k]&&w.drawArrays(w.LINES,this.lineOffset[k],this.lineCount[k]);this.vao.unbind()};function d(g,w){for(var b=0;b<3;++b)g[0][b]=Math.min(g[0][b],w[b]),g[1][b]=Math.max(g[1][b],w[b])}var p=(function(){for(var g=new Array(3),w=0;w<3;++w){for(var b=[],_=1;_<=2;++_)for(var M=-1;M<=1;M+=2){var x=(_+w)%3,T=[0,0,0];T[x]=M,b.push(T)}g[w]=b}return g})();function v(g,w,b,_){for(var M=p[_],x=0;x0){var D=E.slice();D[A]+=C[1][A],M.push(E[0],E[1],E[2],k[0],k[1],k[2],k[3],0,0,0,D[0],D[1],D[2],k[0],k[1],k[2],k[3],0,0,0),d(this.bounds,D),T+=2+v(M,D,k,A)}}}this.lineCount[A]=T-this.lineOffset[A]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function m(g){var w=g.gl,b=s(w),_=l(w,[{buffer:b,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:b,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:b,type:w.FLOAT,size:3,offset:28,stride:40}]),M=u(w);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var x=new f(w,b,_,M);return x.update(g),x}},3436(n,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; }`]),c=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260(n,a,o){"use strict";var s=o(7766);n.exports=T;var l=null,u,c,f,h;function d(A){var y=A.getParameter(A.FRAMEBUFFER_BINDING),E=A.getParameter(A.RENDERBUFFER_BINDING),S=A.getParameter(A.TEXTURE_BINDING_2D);return[y,E,S]}function p(A,y){A.bindFramebuffer(A.FRAMEBUFFER,y[0]),A.bindRenderbuffer(A.RENDERBUFFER,y[1]),A.bindTexture(A.TEXTURE_2D,y[2])}function v(A,y){var E=A.getParameter(y.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(E+1);for(var S=0;S<=E;++S){for(var C=new Array(E),k=0;k1&&F.drawBuffersWEBGL(l[D]);var B=E.getExtension("WEBGL_depth_texture");B?P?A.depth=g(E,C,k,B.UNSIGNED_INT_24_8_WEBGL,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R&&(A.depth=g(E,C,k,E.UNSIGNED_SHORT,E.DEPTH_COMPONENT,E.DEPTH_ATTACHMENT)):R&&P?A._depth_rb=w(E,C,k,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R?A._depth_rb=w(E,C,k,E.DEPTH_COMPONENT16,E.DEPTH_ATTACHMENT):P&&(A._depth_rb=w(E,C,k,E.STENCIL_INDEX,E.STENCIL_ATTACHMENT));var O=E.checkFramebufferStatus(E.FRAMEBUFFER);if(O!==E.FRAMEBUFFER_COMPLETE){A._destroyed=!0,E.bindFramebuffer(E.FRAMEBUFFER,null),E.deleteFramebuffer(A.handle),A.handle=null,A.depth&&(A.depth.dispose(),A.depth=null),A._depth_rb&&(E.deleteRenderbuffer(A._depth_rb),A._depth_rb=null);for(var I=0;IC||E<0||E>C)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");A._shape[0]=y,A._shape[1]=E;for(var k=d(S),D=0;Dk||E<0||E>k)throw new Error("gl-fbo: Parameters are too large for FBO");S=S||{};var D=1;if("color"in S){if(D=Math.max(S.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(C){if(D>A.getParameter(C.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=A.UNSIGNED_BYTE,P=A.getExtension("OES_texture_float");if(S.float&&D>0){if(!P)throw new Error("gl-fbo: Context does not support floating point textures");F=A.FLOAT}else S.preferFloat&&D>0&&P&&(F=A.FLOAT);var R=!0;"depth"in S&&(R=!!S.depth);var L=!1;return"stencil"in S&&(L=!!S.stencil),new _(A,y,E,F,D,R,L,C)}},2992(n,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);n.exports=f;function f(h,d,p){"use strict";var v=u(d)||"of unknown name (see npm glsl-shader-name)",m="unknown type";p!==void 0&&(m=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s: `,m,v),w=s("%s%s",g,h),b=h.split(` `),_={},M=0;M max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),f=s([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714(n,a,o){"use strict";n.exports=A;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(y,E,S,C){return c[0]=C,c[1]=S,c[2]=E,c[3]=y,f[0]}var d=o(2478),p=o(9618),v=o(7319),m=v.createShader,g=v.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(y,E){for(var S=0,C=0;C<3;++C){var k=y[C]-E[C];S+=k*k}return Math.sqrt(S)}function _(y){for(var E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],S=0;S<3;++S)E[0][S]=Math.max(y[0][S],E[0][S]),E[1][S]=Math.min(y[1][S],E[1][S]);return E}function M(y,E,S,C){this.arcLength=y,this.position=E,this.index=S,this.dataCoordinate=C}function x(y,E,S,C,k,D){this.gl=y,this.shader=E,this.pickShader=S,this.buffer=C,this.vao=k,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=D,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=x.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(y){this.pickId=y},T.drawTransparent=T.draw=function(y){if(this.vertexCount){var E=this.gl,S=this.shader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,clipBounds:_(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},T.drawPick=function(y){if(this.vertexCount){var E=this.gl,S=this.pickShader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,pickId:this.pickId,clipBounds:_(this.clipBounds),screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},T.update=function(y){var E,S;this.dirty=!0;var C=!!y.connectGaps;"dashScale"in y&&(this.dashScale=y.dashScale),this.hasAlpha=!1,"opacity"in y&&(this.opacity=+y.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=[],D=[],F=[],P=0,R=0,L=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],I=y.position||y.positions;if(I){var B=y.color||y.colors||[0,0,0,1],O=y.lineWidth||1,$=!1;e:for(E=1;E0){for(var j=0;j<24;++j)k.push(k[k.length-12]);R+=2,$=!0}continue e}L[0][S]=Math.min(L[0][S],Y[S],K[S]),L[1][S]=Math.max(L[1][S],Y[S],K[S])}var q,J;Array.isArray(B[0])?(q=B.length>E-1?B[E-1]:B.length>0?B[B.length-1]:[0,0,0,1],J=B.length>E?B[E]:B.length>0?B[B.length-1]:[0,0,0,1]):q=J=B,q.length===3&&(q=[q[0],q[1],q[2],1]),J.length===3&&(J=[J[0],J[1],J[2],1]),!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0);var U;Array.isArray(O)?U=O.length>E-1?O[E-1]:O.length>0?O[O.length-1]:[0,0,0,1]:U=O;var V=P;if(P+=b(Y,K),$){for(S=0;S<2;++S)k.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],V,U,q[0],q[1],q[2],q[3]);R+=2,$=!1}k.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],V,U,q[0],q[1],q[2],q[3],Y[0],Y[1],Y[2],K[0],K[1],K[2],V,-U,q[0],q[1],q[2],q[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],P,-U,J[0],J[1],J[2],J[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],P,U,J[0],J[1],J[2],J[3]),R+=4}}if(this.buffer.update(k),D.push(P),F.push(I[I.length-1].slice()),this.bounds=L,this.vertexCount=R,this.points=F,this.arcLength=D,"dashes"in y){var X=y.dashes,H=X.slice();for(H.unshift(0),E=1;E1.0001)return null;S+=E[M]}return Math.abs(S-1)>.001?null:[x,h(p,E),E]}},840(n,a,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * (view * (model * vec4(p, 1.0))); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),c=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_color = color; f_data = position; f_uv = uv; }`]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),d=s([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),p=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; }`]),v=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),m=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),g=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); }`]),w=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:p,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:m,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:g,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201(n,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),p=o(6760),v=o(7608),m=o(9618),g=o(6729),w=o(7765),b=o(1888),_=o(840),M=o(7626),x=_.meshShader,T=_.wireShader,A=_.pointShader,y=_.pickShader,E=_.pointPickShader,S=_.contourShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(j,q,J,U,V,X,H,G,Q,te,ce,ge,Ce,be,he,oe,Ee,ye,ue,ee,ae,xe,re,pe,we,Fe,Se){this.gl=j,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=q,this.dirty=!0,this.triShader=J,this.lineShader=U,this.pointShader=V,this.pickShader=X,this.pointPickShader=H,this.contourShader=G,this.trianglePositions=Q,this.triangleColors=ce,this.triangleNormals=Ce,this.triangleUVs=ge,this.triangleIds=te,this.triangleVAO=be,this.triangleCount=0,this.lineWidth=1,this.edgePositions=he,this.edgeColors=Ee,this.edgeUVs=ye,this.edgeIds=oe,this.edgeVAO=ue,this.edgeCount=0,this.pointPositions=ee,this.pointColors=xe,this.pointUVs=re,this.pointSizes=pe,this.pointIds=ae,this.pointVAO=we,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Fe,this.contourVAO=Se,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=C,this._view=C,this._projection=C,this._resolution=[1,1]}var D=k.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(j){this.pickId=j};function F(j,q){if(!q||!q.length)return 1;for(var J=0;Jj&&J>0){var U=(q[J][0]-j)/(q[J][0]-q[J-1][0]);return q[J][1]*(1-U)+U*q[J-1][1]}}return 1}function P(j,q){for(var J=g({colormap:j,nshades:256,format:"rgba"}),U=new Uint8Array(256*4),V=0;V<256;++V){for(var X=J[V],H=0;H<3;++H)U[4*V+H]=X[H];q?U[4*V+3]=255*F(V/255,q):U[4*V+3]=255*X[3]}return m(U,[256,256,4],[4,0,1])}function R(j){for(var q=j.length,J=new Array(q),U=0;U0){var Ce=this.triShader;Ce.bind(),Ce.uniforms=G,this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ce=this.lineShader;Ce.bind(),Ce.uniforms=G,this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ce=this.pointShader;Ce.bind(),Ce.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ce=this.contourShader;Ce.bind(),Ce.uniforms=G,this.contourVAO.bind(),q.drawArrays(q.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(j){j=j||{};for(var q=this.gl,J=j.model||C,U=j.view||C,V=j.projection||C,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],H=0;H<3;++H)X[0][H]=Math.max(X[0][H],this.clipBounds[0][H]),X[1][H]=Math.min(X[1][H],this.clipBounds[1][H]);this._model=[].slice.call(J),this._view=[].slice.call(U),this._projection=[].slice.call(V),this._resolution=[q.drawingBufferWidth,q.drawingBufferHeight];var G={model:J,view:U,projection:V,clipBounds:X,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=G,this.triangleCount>0&&(this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(j){if(!j||j.id!==this.pickId)return null;for(var q=j.value[0]+256*j.value[1]+65536*j.value[2],J=this.cells[q],U=this.positions,V=new Array(J.length),X=0;XMath.abs(y))g.rotate(C,0,0,-A*E*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var k=-x.zoomSpeed*S*y/window.innerHeight*(C-g.lastT())/20;g.pan(C,0,0,b*(Math.exp(k)-1))}}},!0)},x.enableMouseListeners(),x}},799(n,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),c=s([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100(n,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),p=o(351),v=o(4772),m=o(4040),g=o(799),w=o(2431)({tablet:!0,featureDetect:!0});n.exports={createScene:T,createCamera:s};function b(){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 _(y,E){var S=null;try{S=y.getContext("webgl",E),S||(S=y.getContext("experimental-webgl",E))}catch(C){return null}return S}function M(y){var E=Math.round(Math.log(Math.abs(y))/Math.log(10));if(E<0){var S=Math.round(Math.pow(10,-E));return Math.ceil(y*S)/S}else if(E>0){var S=Math.round(Math.pow(10,E));return Math.ceil(y/S)*S}return Math.ceil(y)}function x(y){return typeof y=="boolean"?y:!0}function T(y){y=y||{},y.camera=y.camera||{};var E=y.canvas;if(!E)if(E=document.createElement("canvas"),y.container){var S=y.container;S.appendChild(E)}else document.body.appendChild(E);var C=y.gl;if(C||(y.glOptions&&(w=!!y.glOptions.preserveDrawingBuffer),C=_(E,y.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!C)throw new Error("webgl not supported");var k=y.bounds||[[-10,-10,-10],[10,10,10]],D=new b,F=h(C,C.drawingBufferWidth,C.drawingBufferHeight,{preferFloat:!w}),P=g(C),R=y.cameraObject&&y.cameraObject._ortho===!0||y.camera.projection&&y.camera.projection.type==="orthographic"||!1,L={eye:y.camera.eye||[2,0,0],center:y.camera.center||[0,0,0],up:y.camera.up||[0,1,0],zoomMin:y.camera.zoomMax||.1,zoomMax:y.camera.zoomMin||100,mode:y.camera.mode||"turntable",_ortho:R},I=y.axes||{},B=l(C,I);B.enable=!I.disable;var O=y.spikes||{},$=c(C,O),Y=[],K=[],j=[],q=[],J=!0,H=!0,U=new Array(16),V=new Array(16),X={view:null,projection:U,model:V,_ortho:!1},H=!0,G=[C.drawingBufferWidth,C.drawingBufferHeight],Q=y.cameraObject||s(E,L),te={gl:C,contextLost:!1,pixelRatio:y.pixelRatio||1,canvas:E,selection:D,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:k,objects:Y,shape:G,aspect:y.aspectRatio||[1,1,1],pickRadius:y.pickRadius||10,zNear:y.zNear||.01,zFar:y.zFar||1e3,fovy:y.fovy||Math.PI/4,clearColor:y.clearColor||[0,0,0,0],autoResize:x(y.autoResize),autoBounds:x(y.autoBounds),autoScale:!!y.autoScale,autoCenter:x(y.autoCenter),clipToBounds:x(y.clipToBounds),snapToData:!!y.snapToData,onselect:y.onselect||null,onrender:y.onrender||null,onclick:y.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(ee){this.aspect[0]=ee.x,this.aspect[1]=ee.y,this.aspect[2]=ee.z,H=!0},setBounds:function(ee,ae){this.bounds[0][ee]=ae.min,this.bounds[1][ee]=ae.max},setClearColor:function(ee){this.clearColor=ee},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ce=[C.drawingBufferWidth/te.pixelRatio|0,C.drawingBufferHeight/te.pixelRatio|0];function ge(){if(!te._stopped&&te.autoResize){var ee=E.parentNode,ae=1,xe=1;ee&&ee!==document.body?(ae=ee.clientWidth,xe=ee.clientHeight):(ae=window.innerWidth,xe=window.innerHeight);var re=Math.ceil(ae*te.pixelRatio)|0,pe=Math.ceil(xe*te.pixelRatio)|0;if(re!==E.width||pe!==E.height){E.width=re,E.height=pe;var we=E.style;we.position=we.position||"absolute",we.left="0px",we.top="0px",we.width=ae+"px",we.height=xe+"px",J=!0}}}te.autoResize&&ge(),window.addEventListener("resize",ge);function Ce(){for(var ee=Y.length,ae=q.length,xe=0;xe0&&j[ae-1]===0;)j.pop(),q.pop().dispose()}te.update=function(ee){te._stopped||(ee=ee||{},J=!0,H=!0)},te.add=function(ee){te._stopped||(ee.axes=B,Y.push(ee),K.push(-1),J=!0,H=!0,Ce())},te.remove=function(ee){if(!te._stopped){var ae=Y.indexOf(ee);ae<0||(Y.splice(ae,1),K.pop(),J=!0,H=!0,Ce())}},te.dispose=function(){if(!te._stopped&&(te._stopped=!0,window.removeEventListener("resize",ge),E.removeEventListener("webglcontextlost",be),te.mouseListener.enabled=!1,!te.contextLost)){B.dispose(),$.dispose();for(var ee=0;eeD.distance)continue;for(var _e=0;_e1e-6?(w=Math.acos(b),_=Math.sin(w),M=Math.sin((1-u)*w)/_,x=Math.sin(u*w)/_):(M=1-u,x=u),o[0]=M*c+x*p,o[1]=M*f+x*v,o[2]=M*h+x*m,o[3]=M*d+x*g,o}},5964(n){"use strict";n.exports=function(a){return!a&&a!==0?"":a.toString()}},9366(n,a,o){"use strict";var s=o(4359);n.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),p=l[d];if(p||(p=l[d]={}),c in p)return p[c];var v={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}};v.triangles=!0;var m=s(c,v);v.triangles=!1;var g=s(c,v),w,b;if(h&&h!==1){for(w=0;w max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),c=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),f=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * (view * (model * vec4(position, 1))); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),d=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:u,fragment:h,attributes:p},m={vertex:c,fragment:h,attributes:p},g={vertex:f,fragment:h,attributes:p},w={vertex:u,fragment:d,attributes:p},b={vertex:c,fragment:d,attributes:p},_={vertex:f,fragment:d,attributes:p};function M(x,T){var A=s(x,T),y=A.attributes;return y.position.location=0,y.color.location=1,y.glyph.location=2,y.id.location=3,A}a.createPerspective=function(x){return M(x,v)},a.createOrtho=function(x){return M(x,m)},a.createProject=function(x){return M(x,g)},a.createPickPerspective=function(x){return M(x,w)},a.createPickOrtho=function(x){return M(x,b)},a.createPickProject=function(x){return M(x,_)}},8418(n,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),p=o(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],m=ArrayBuffer,g=DataView;function w(V){return m.isView(V)&&!(V instanceof g)}function b(V){return Array.isArray(V)||w(V)}n.exports=U;function _(V,X){var H=V[0],G=V[1],Q=V[2],te=V[3];return V[0]=X[0]*H+X[4]*G+X[8]*Q+X[12]*te,V[1]=X[1]*H+X[5]*G+X[9]*Q+X[13]*te,V[2]=X[2]*H+X[6]*G+X[10]*Q+X[14]*te,V[3]=X[3]*H+X[7]*G+X[11]*Q+X[15]*te,V}function M(V,X,H,G){return _(G,G,H),_(G,G,X),_(G,G,V)}function x(V,X){this.index=V,this.dataCoordinate=this.position=X}function T(V){return V===!0||V>1?1:V}function A(V,X,H,G,Q,te,ce,ge,Ce,be,he,oe){this.gl=V,this.pixelRatio=1,this.shader=X,this.orthoShader=H,this.projectShader=G,this.pointBuffer=Q,this.colorBuffer=te,this.glyphBuffer=ce,this.idBuffer=ge,this.vao=Ce,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=be,this.pickOrthoShader=he,this.pickProjectShader=oe,this.points=[],this._selectResult=new x(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 y=A.prototype;y.pickSlots=1,y.setPickBase=function(V){this.pickId=V},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&!this.projectHasAlpha)return!0;return!1};var E=[0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0,1],D=[0,0,0,1],F=v.slice(),P=[0,0,0],R=[[0,0,0],[0,0,0]];function L(V){return V[0]=V[1]=V[2]=0,V}function I(V,X){return V[0]=X[0],V[1]=X[1],V[2]=X[2],V[3]=1,V}function B(V,X,H,G){return V[0]=X[0],V[1]=X[1],V[2]=X[2],V[H]=G,V}function O(V){for(var X=R,H=0;H<2;++H)for(var G=0;G<3;++G)X[H][G]=Math.max(Math.min(V[H][G],1e8),-1e8);return X}function $(V,X,H,G){var Q=X.axesProject,te=X.gl,ce=V.uniforms,ge=H.model||v,Ce=H.view||v,be=H.projection||v,he=X.axesBounds,oe=O(X.clipBounds),Ee;X.axes&&X.axes.lastCubeProps?Ee=X.axes.lastCubeProps.axis:Ee=[1,1,1],E[0]=2/te.drawingBufferWidth,E[1]=2/te.drawingBufferHeight,V.bind(),ce.view=Ce,ce.projection=be,ce.screenSize=E,ce.highlightId=X.highlightId,ce.highlightScale=X.highlightScale,ce.clipBounds=oe,ce.pickGroup=X.pickId/255,ce.pixelRatio=G;for(var ye=0;ye<3;++ye)if(Q[ye]){ce.scale=X.projectScale[ye],ce.opacity=X.projectOpacity[ye];for(var ue=F,ee=0;ee<16;++ee)ue[ee]=0;for(var ee=0;ee<4;++ee)ue[5*ee]=1;ue[5*ye]=0,Ee[ye]<0?ue[12+ye]=he[0][ye]:ue[12+ye]=he[1][ye],f(ue,ge,ue),ce.model=ue;var ae=(ye+1)%3,xe=(ye+2)%3,re=L(S),pe=L(C);re[ae]=1,pe[xe]=1;var we=M(be,Ce,ge,I(k,re)),Fe=M(be,Ce,ge,I(D,pe));if(Math.abs(we[1])>Math.abs(Fe[1])){var Se=we;we=Fe,Fe=Se,Se=re,re=pe,pe=Se;var ke=ae;ae=xe,xe=ke}we[0]<0&&(re[ae]=-1),Fe[1]>0&&(pe[xe]=-1);for(var _e=0,Ie=0,ee=0;ee<4;++ee)_e+=Math.pow(ge[4*ae+ee],2),Ie+=Math.pow(ge[4*xe+ee],2);re[ae]/=Math.sqrt(_e),pe[xe]/=Math.sqrt(Ie),ce.axes[0]=re,ce.axes[1]=pe,ce.fragClipBounds[0]=B(P,oe[0],ye,-1e8),ce.fragClipBounds[1]=B(P,oe[1],ye,1e8),X.vao.bind(),X.vao.draw(te.TRIANGLES,X.vertexCount),X.lineWidth>0&&(te.lineWidth(X.lineWidth*G),X.vao.draw(te.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var Y=[-1e8,-1e8,-1e8],K=[1e8,1e8,1e8],j=[Y,K];function q(V,X,H,G,Q,te,ce){var ge=H.gl;if((te===H.projectHasAlpha||ce)&&$(X,H,G,Q),te===H.hasAlpha||ce){V.bind();var Ce=V.uniforms;Ce.model=G.model||v,Ce.view=G.view||v,Ce.projection=G.projection||v,E[0]=2/ge.drawingBufferWidth,E[1]=2/ge.drawingBufferHeight,Ce.screenSize=E,Ce.highlightId=H.highlightId,Ce.highlightScale=H.highlightScale,Ce.fragClipBounds=j,Ce.clipBounds=H.axes.bounds,Ce.opacity=H.opacity,Ce.pickGroup=H.pickId/255,Ce.pixelRatio=Q,H.vao.bind(),H.vao.draw(ge.TRIANGLES,H.vertexCount),H.lineWidth>0&&(ge.lineWidth(H.lineWidth*Q),H.vao.draw(ge.LINES,H.lineVertexCount,H.vertexCount)),H.vao.unbind()}}y.draw=function(V){var X=this.useOrtho?this.orthoShader:this.shader;q(X,this.projectShader,this,V,this.pixelRatio,!1,!1)},y.drawTransparent=function(V){var X=this.useOrtho?this.orthoShader:this.shader;q(X,this.projectShader,this,V,this.pixelRatio,!0,!1)},y.drawPick=function(V){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;q(X,this.pickProjectShader,this,V,1,!0,!0)},y.pick=function(V){if(!V||V.id!==this.pickId)return null;var X=V.value[2]+(V.value[1]<<8)+(V.value[0]<<16);if(X>=this.pointCount||X<0)return null;var H=this.points[X],G=this._selectResult;G.index=X;for(var Q=0;Q<3;++Q)G.position[Q]=G.dataCoordinate[Q]=H[Q];return G},y.highlight=function(V){if(!V)this.highlightId=[1,1,1,1];else{var X=V.index,H=X&255,G=X>>8&255,Q=X>>16&255;this.highlightId=[H/255,G/255,Q/255,0]}};function J(V,X,H,G){var Q;b(V)?X0){var vt=0,Xe=xe,mt=[0,0,0,1],bt=[0,0,0,1],Ne=b(Ee)&&b(Ee[0]),Ue=b(ee)&&b(ee[0]);e:for(var G=0;G0?1-Ie[0][0]:Xt<0?1+Ie[1][0]:1,Vt*=Vt>0?1-Ie[0][1]:Vt<0?1+Ie[1][1]:1;for(var lr=[Xt,Vt],$e=ke.cells||[],tt=ke.positions||[],Fe=0;Fe<$e.length;++Fe)for(var ur=$e[Fe],Bt=0;Bt<3;++Bt){for(var Zt=0;Zt<3;++Zt)Qe[3*vt+Zt]=we[Zt];for(var Zt=0;Zt<4;++Zt)et[4*vt+Zt]=mt[Zt];ut[vt]=ae;var kr=tt[ur[Bt]];_t[2*vt]=Re*(ct*kr[0]-Tt*kr[1]+lr[0]),_t[2*vt+1]=Re*(Tt*kr[0]+ct*kr[1]+lr[1]),vt+=1}for(var $e=_e.edges,tt=_e.positions,Fe=0;Fe<$e.length;++Fe)for(var ur=$e[Fe],Bt=0;Bt<2;++Bt){for(var Zt=0;Zt<3;++Zt)Qe[3*Xe+Zt]=we[Zt];for(var Zt=0;Zt<4;++Zt)et[4*Xe+Zt]=bt[Zt];ut[Xe]=ae;var kr=tt[ur[Bt]];_t[2*Xe]=Re*(ct*kr[0]-Tt*kr[1]+lr[0]),_t[2*Xe+1]=Re*(Tt*kr[0]+ct*kr[1]+lr[1]),Xe+=1}}}this.bounds=[be,he],this.points=Q,this.pointCount=Q.length,this.vertexCount=xe,this.lineVertexCount=re,this.pointBuffer.update(Qe),this.colorBuffer.update(et),this.glyphBuffer.update(_t),this.idBuffer.update(ut),c.free(Qe),c.free(et),c.free(_t),c.free(ut)},y.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 U(V){var X=V.gl,H=h.createPerspective(X),G=h.createOrtho(X),Q=h.createProject(X),te=h.createPickPerspective(X),ce=h.createPickOrtho(X),ge=h.createPickProject(X),Ce=l(X),be=l(X),he=l(X),oe=l(X),Ee=u(X,[{buffer:Ce,size:3,type:X.FLOAT},{buffer:be,size:4,type:X.FLOAT},{buffer:he,size:2,type:X.FLOAT},{buffer:oe,size:4,type:X.UNSIGNED_BYTE,normalized:!0}]),ye=new A(X,H,G,Q,Ce,be,he,oe,Ee,te,ce,ge);return ye.update(V),ye}},3589(n,a,o){"use strict";n.exports=v;var s=o(2260),l=o(1888),u=o(9618),c=o(8828).nextPow2,f=function(m,g,w){for(var b=1e8,_=-1,M=-1,x=m.shape[0],T=m.shape[1],A=0;Athis.buffer.length){l.free(this.buffer);for(var b=this.buffer=l.mallocUint8(c(w*g*4)),_=0;_b)for(g=b;gw)for(g=w;g=0){for(var R=P.type.charAt(P.type.length-1)|0,L=new Array(R),I=0;I=0;)B+=1;D[F]=B}var O=new Array(b.length);function $(){x.program=c.program(T,x._vref,x._fref,k,D);for(var Y=0;Y=0){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+T);f(p,v,A[0],g,y,w,x)}else if(T.indexOf("mat")>=0){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+T);h(p,v,A,g,y,w,x)}else throw new s("","Unknown data type for attribute "+x+": "+T);break}}return w}},3327(n,a,o){"use strict";var s=o(216),l=o(8866);n.exports=f;function u(h){return function(){return h}}function c(h,d){for(var p=new Array(h),v=0;v4)throw new l("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+O+"iv"](v[D],F);break;case"v":h["uniform"+O+"fv"](v[D],F);break;default:throw new l("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(O=B.charCodeAt(B.length-1)-48,O<2||O>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+O+"fv"](v[D],!1,F);break}else throw new l("","Unknown uniform data type for "+name+": "+B)}}}}}function w(T,A){if(typeof A!="object")return[[T,A]];var y=[];for(var E in A){var S=A[E],C=T;parseInt(E)+""===E?C+="["+E+"]":C+="."+E,typeof S=="object"?y.push.apply(y,w(C,S)):y.push([C,S])}return y}function b(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 y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new l("","Invalid data type");return T.charAt(0)==="b"?c(y,!1):c(y,0)}else if(T.indexOf("mat")===0&&T.length===4){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+T);return c(y*y,0)}else throw new l("","Unknown uniform data type for "+name+": "+T)}}function _(T,A,y){if(typeof y=="object"){var E=M(y);Object.defineProperty(T,A,{get:u(E),set:g(y),enumerable:!0,configurable:!1})}else v[y]?Object.defineProperty(T,A,{get:m(y),set:g(y),enumerable:!0,configurable:!1}):T[A]=b(p[y].type)}function M(T){var A;if(Array.isArray(T)){A=new Array(T.length);for(var y=0;y1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var v=1;v1)for(var w=0;w 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * tubePosition); f_id = id; f_position = position.xyz; } `]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(n,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(_,M,x,T){for(var A=_.points,y=_.velocities,E=_.divergences,S=[],C=[],k=[],D=[],F=[],P=[],R=0,L=0,I=l.create(),B=l.create(),O=8,$=0;$0)for(var q=0;qM)return T-1}return T},d=function(_,M,x){return _x?x:_},p=function(_,M,x){var T=M.vectors,A=M.meshgrid,y=_[0],E=_[1],S=_[2],C=A[0].length,k=A[1].length,D=A[2].length,F=h(A[0],y),P=h(A[1],E),R=h(A[2],S),L=F+1,I=P+1,B=R+1;if(F=d(F,0,C-1),L=d(L,0,C-1),P=d(P,0,k-1),I=d(I,0,k-1),R=d(R,0,D-1),B=d(B,0,D-1),F<0||P<0||R<0||L>C-1||I>k-1||B>D-1)return s.create();var O=A[0][F],$=A[0][L],Y=A[1][P],K=A[1][I],j=A[2][R],q=A[2][B],J=(y-O)/($-O),U=(E-Y)/(K-Y),V=(S-j)/(q-j);isFinite(J)||(J=.5),isFinite(U)||(U=.5),isFinite(V)||(V=.5);var X,H,G,Q,te,ce;switch(x.reversedX&&(F=C-1-F,L=C-1-L),x.reversedY&&(P=k-1-P,I=k-1-I),x.reversedZ&&(R=D-1-R,B=D-1-B),x.filled){case 5:te=R,ce=B,G=P*D,Q=I*D,X=F*D*k,H=L*D*k;break;case 4:te=R,ce=B,X=F*D,H=L*D,G=P*D*C,Q=I*D*C;break;case 3:G=P,Q=I,te=R*k,ce=B*k,X=F*k*D,H=L*k*D;break;case 2:G=P,Q=I,X=F*k,H=L*k,te=R*k*C,ce=B*k*C;break;case 1:X=F,H=L,te=R*C,ce=B*C,G=P*C*D,Q=I*C*D;break;default:X=F,H=L,G=P*C,Q=I*C,te=R*C*k,ce=B*C*k;break}var ge=T[X+G+te],Ce=T[X+G+ce],be=T[X+Q+te],he=T[X+Q+ce],oe=T[H+G+te],Ee=T[H+G+ce],ye=T[H+Q+te],ue=T[H+Q+ce],ee=s.create(),ae=s.create(),xe=s.create(),re=s.create();s.lerp(ee,ge,oe,J),s.lerp(ae,Ce,Ee,J),s.lerp(xe,be,ye,J),s.lerp(re,he,ue,J);var pe=s.create(),we=s.create();s.lerp(pe,ee,xe,U),s.lerp(we,ae,re,U);var Fe=s.create();return s.lerp(Fe,pe,we,V),Fe},v=function(_,M){var x=M[0],T=M[1],A=M[2];return _[0]=x<0?-x:x,_[1]=T<0?-T:T,_[2]=A<0?-A:A,_},m=function(_){var M=1/0;_.sort(function(y,E){return y-E});for(var x=_.length,T=1;TL||ueI||eeB)},$=s.distance(M[0],M[1]),Y=10*$/T,K=Y*Y,j=1,q=0,J=x.length;J>1&&(j=g(x));for(var U=0;Uq&&(q=ge),te.push(ge),D.push({points:X,velocities:H,divergences:te});for(var Ce=0;CeK&&s.scale(be,be,Y/Math.sqrt(he)),s.add(be,be,V),G=C(be),s.squaredDistance(Q,be)-K>-1e-4*K){X.push(be),Q=be,H.push(G);var ce=k(be,G),ge=s.length(ce);isFinite(ge)&&ge>q&&(q=ge),te.push(ge)}V=be}}var oe=f(D,_.colormap,q,j);return y?oe.tubeScale=y:(q===0&&(q=1),oe.tubeScale=A*.5*j/q),oe};var w=o(6740),b=o(6405).createMesh;n.exports.createTubeMesh=function(_,M){return b(_,M,{shaders:w,traceType:"streamtube"})}},990(n,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute vec3 f; attribute vec3 normal; uniform vec3 objectOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 lightPosition, eyePosition; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 localCoordinate = vec3(uv.zw, f.x); worldCoordinate = objectOffset + localCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); gl_Position = clipPosition; kill = f.y; value = f.z; planeCoordinate = uv.xy; vColor = texture2D(colormap, vec2(value, value)); //Lighting geometry parameters vec4 cameraCoordinate = view * worldPosition; cameraCoordinate.xyz /= cameraCoordinate.w; lightDirection = lightPosition - cameraCoordinate.xyz; eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } `]),c=l([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float beckmannSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness) { return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color \u2014 in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),f=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);a.createShader=function(d){var p=s(d,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},a.createPickShader=function(d){var p=s(d,u,h,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},a.createContourShader=function(d){var p=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},a.createPickContourShader=function(d){var p=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},9499(n,a,o){"use strict";n.exports=X;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),p=o(9994),v=o(9618),m=o(3711),g=o(6760),w=o(7608),b=o(2478),_=o(6199),M=o(990),x=M.createShader,T=M.createContourShader,A=M.createPickShader,y=M.createPickContourShader,E=40,S=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[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 H=0;H<3;++H){var G=k[H],Q=(H+1)%3,te=(H+2)%3;G[Q+0]=1,G[te+3]=1,G[H+6]=1}})();function D(H,G,Q,te,ce){this.position=H,this.index=G,this.uv=Q,this.level=te,this.dataCoordinate=ce}var F=256;function P(H,G,Q,te,ce,ge,Ce,be,he,oe,Ee,ye,ue,ee,ae){this.gl=H,this.shape=G,this.bounds=Q,this.objectOffset=ae,this.intensityBounds=[],this._shader=te,this._pickShader=ce,this._coordinateBuffer=ge,this._vao=Ce,this._colorMap=be,this._contourShader=he,this._contourPickShader=oe,this._contourBuffer=Ee,this._contourVAO=ye,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ue,this._dynamicVAO=ee,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(f.mallocFloat(1024),[0,0]),v(f.mallocFloat(1024),[0,0]),v(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 R=P.prototype;R.genColormap=function(H,G){var Q=!1,te=p([h({colormap:H,nshades:F,format:"rgba"}).map(function(ce,ge){var Ce=G?L(ge/255,G):ce[3];return Ce<1&&(Q=!0),[ce[0],ce[1],ce[2],255*Ce]})]);return d.divseq(te,255),this.hasAlphaScale=Q,te},R.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},R.isOpaque=function(){return!this.isTransparent()},R.pickSlots=1,R.setPickBase=function(H){this.pickId=H};function L(H,G){if(!G||!G.length)return 1;for(var Q=0;QH&&Q>0){var te=(G[Q][0]-H)/(G[Q][0]-G[Q-1][0]);return G[Q][1]*(1-te)+te*G[Q-1][1]}}return 1}var I=[0,0,0],B={showSurface:!1,showContour:!1,projections:[S.slice(),S.slice(),S.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(H,G){var Q,te,ce,ge=G.axes&&G.axes.lastCubeProps.axis||I,Ce=G.showSurface,be=G.showContour;for(Q=0;Q<3;++Q)for(Ce=Ce||G.surfaceProject[Q],te=0;te<3;++te)be=be||G.contourProject[Q][te];for(Q=0;Q<3;++Q){var he=B.projections[Q];for(te=0;te<16;++te)he[te]=0;for(te=0;te<4;++te)he[5*te]=1;he[5*Q]=0,he[12+Q]=G.axesBounds[+(ge[Q]>0)][Q],g(he,H.model,he);var oe=B.clipBounds[Q];for(ce=0;ce<2;++ce)for(te=0;te<3;++te)oe[ce][te]=H.clipBounds[ce][te];oe[0][Q]=-1e8,oe[1][Q]=1e8}return B.showSurface=Ce,B.showContour=be,B}var $={model:S,view:S,projection:S,inverseModel:S.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},Y=S.slice(),K=[1,0,0,0,1,0,0,0,1];function j(H,G){H=H||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var te=$;te.model=H.model||S,te.view=H.view||S,te.projection=H.projection||S,te.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],te.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],te.objectOffset=this.objectOffset,te.contourColor=this.contourColor[0],te.inverseModel=w(te.inverseModel,te.model);for(var ce=0;ce<2;++ce)for(var ge=te.clipBounds[ce],Ce=0;Ce<3;++Ce)ge[Ce]=Math.min(Math.max(this.clipBounds[ce][Ce],-1e8),1e8);te.kambient=this.ambientLight,te.kdiffuse=this.diffuseLight,te.kspecular=this.specularLight,te.roughness=this.roughness,te.fresnel=this.fresnel,te.opacity=this.opacity,te.height=0,te.permutation=K,te.vertexColor=this.vertexColor;var be=Y;for(g(be,te.view,te.model),g(be,te.projection,be),w(be,be),ce=0;ce<3;++ce)te.eyePosition[ce]=be[12+ce]/be[15];var he=be[15];for(ce=0;ce<3;++ce)he+=this.lightPosition[ce]*be[4*ce+3];for(ce=0;ce<3;++ce){var oe=be[12+ce];for(Ce=0;Ce<3;++Ce)oe+=be[4*Ce+ce]*this.lightPosition[Ce];te.lightPosition[ce]=oe/he}var Ee=O(te,this);if(Ee.showSurface){for(this._shader.bind(),this._shader.uniforms=te,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=Ee.projections[ce],this._shader.uniforms.clipBounds=Ee.clipBounds[ce],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ee.showContour){var ye=this._contourShader;te.kambient=1,te.kdiffuse=0,te.kspecular=0,te.opacity=1,ye.bind(),ye.uniforms=te;var ue=this._contourVAO;for(ue.bind(),ce=0;ce<3;++ce)for(ye.uniforms.permutation=k[ce],Q.lineWidth(this.contourWidth[ce]*this.pixelRatio),Ce=0;Ce>4)/16)/255,ce=Math.floor(te),ge=te-ce,Ce=G[1]*(H.value[1]+(H.value[2]&15)/16)/255,be=Math.floor(Ce),he=Ce-be;ce+=1,be+=1;var oe=Q.position;oe[0]=oe[1]=oe[2]=0;for(var Ee=0;Ee<2;++Ee)for(var ye=Ee?ge:1-ge,ue=0;ue<2;++ue)for(var ee=ue?he:1-he,ae=ce+Ee,xe=be+ue,re=ye*ee,pe=0;pe<3;++pe)oe[pe]+=this._field[pe].get(ae,xe)*re;for(var we=this._pickResult.level,Fe=0;Fe<3;++Fe)if(we[Fe]=b.le(this.contourLevels[Fe],oe[Fe]),we[Fe]<0)this.contourLevels[Fe].length>0&&(we[Fe]=0);else if(we[Fe]Math.abs(ke-oe[Fe])&&(we[Fe]+=1)}for(Q.index[0]=ge<.5?ce:ce+1,Q.index[1]=he<.5?be:be+1,Q.uv[0]=te/G[0],Q.uv[1]=Ce/G[1],pe=0;pe<3;++pe)Q.dataCoordinate[pe]=this._field[pe].get(Q.index[0],Q.index[1]);return Q},R.padField=function(H,G){var Q=G.shape.slice(),te=H.shape.slice();d.assign(H.lo(1,1).hi(Q[0],Q[1]),G),d.assign(H.lo(1).hi(Q[0],1),G.hi(Q[0],1)),d.assign(H.lo(1,te[1]-1).hi(Q[0],1),G.lo(0,Q[1]-1).hi(Q[0],1)),d.assign(H.lo(0,1).hi(1,Q[1]),G.hi(1)),d.assign(H.lo(te[0]-1,1).hi(1,Q[1]),G.lo(Q[0]-1)),H.set(0,0,G.get(0,0)),H.set(0,te[1]-1,G.get(0,Q[1]-1)),H.set(te[0]-1,0,G.get(Q[0]-1,0)),H.set(te[0]-1,te[1]-1,G.get(Q[0]-1,Q[1]-1))};function J(H,G){return Array.isArray(H)?[G(H[0]),G(H[1]),G(H[2])]:[G(H),G(H),G(H)]}function U(H){return Array.isArray(H)?H.length===3?[H[0],H[1],H[2],1]:[H[0],H[1],H[2],H[3]]:[0,0,0,1]}function V(H){if(Array.isArray(H)){if(Array.isArray(H))return[U(H[0]),U(H[1]),U(H[2])];var G=U(H);return[G.slice(),G.slice(),G.slice()]}}R.update=function(H){H=H||{},this.objectOffset=H.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in H&&(this.contourWidth=J(H.contourWidth,Number)),"showContour"in H&&(this.showContour=J(H.showContour,Boolean)),"showSurface"in H&&(this.showSurface=!!H.showSurface),"contourTint"in H&&(this.contourTint=J(H.contourTint,Boolean)),"contourColor"in H&&(this.contourColor=V(H.contourColor)),"contourProject"in H&&(this.contourProject=J(H.contourProject,function(ra){return J(ra,Boolean)})),"surfaceProject"in H&&(this.surfaceProject=H.surfaceProject),"dynamicColor"in H&&(this.dynamicColor=V(H.dynamicColor)),"dynamicTint"in H&&(this.dynamicTint=J(H.dynamicTint,Number)),"dynamicWidth"in H&&(this.dynamicWidth=J(H.dynamicWidth,Number)),"opacity"in H&&(this.opacity=H.opacity),"opacityscale"in H&&(this.opacityscale=H.opacityscale),"colorBounds"in H&&(this.colorBounds=H.colorBounds),"vertexColor"in H&&(this.vertexColor=H.vertexColor?1:0),"colormap"in H&&this._colorMap.setPixels(this.genColormap(H.colormap,this.opacityscale));var G=H.field||H.coords&&H.coords[2]||null,Q=!1;if(G||(this._field[2].shape[0]||this._field[2].shape[2]?G=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):G=this._field[2].hi(0,0)),"field"in H||"coords"in H){var te=(G.shape[0]+2)*(G.shape[1]+2);te>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(te))),this._field[2]=v(this._field[2].data,[G.shape[0]+2,G.shape[1]+2]),this.padField(this._field[2],G),this.shape=G.shape.slice();for(var ce=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]=v(this._field[ge].data,[ce[0]+2,ce[1]+2]);if(H.coords){var Ce=H.coords;if(!Array.isArray(Ce)||Ce.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ge=0;ge<2;++ge){var be=Ce[ge];for(ue=0;ue<2;++ue)if(be.shape[ue]!==ce[ue])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ge],be)}}else if(H.ticks){var he=H.ticks;if(!Array.isArray(he)||he.length!==2)throw new Error("gl-surface: invalid ticks");for(ge=0;ge<2;++ge){var oe=he[ge];if((Array.isArray(oe)||oe.length)&&(oe=v(oe)),oe.shape[0]!==ce[ge])throw new Error("gl-surface: invalid tick length");var Ee=v(oe.data,ce);Ee.stride[ge]=oe.stride[0],Ee.stride[ge^1]=0,this.padField(this._field[ge],Ee)}}else{for(ge=0;ge<2;++ge){var ye=[0,0];ye[ge]=1,this._field[ge]=v(this._field[ge].data,[ce[0]+2,ce[1]+2],ye,0)}this._field[0].set(0,0,0);for(var ue=0;ue0){for(var dn=0;dn<5;++dn)ur.pop();Ne-=1}continue e}}}$e.push(Ne)}this._contourOffsets[Bt]=kr,this._contourCounts[Bt]=$e}var Vn=f.mallocFloat(ur.length);for(ge=0;geD||C<0||C>D)throw new Error("gl-texture2d: Invalid texture size");return E._shape=[S,C],E.bind(),k.texImage2D(k.TEXTURE_2D,0,E.format,S,C,0,E.format,E.type,null),E._mipLevels=[0],E}function g(E,S,C,k,D,F){this.gl=E,this.handle=S,this.format=D,this.type=F,this._shape=[C,k],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 P=this,R=[this._wrapS,this._wrapT];Object.defineProperties(R,[{get:function(){return P._wrapS},set:function(I){return P.wrapS=I}},{get:function(){return P._wrapT},set:function(I){return P.wrapT=I}}]),this._wrapVector=R;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return P._shape[0]},set:function(I){return P.width=I}},{get:function(){return P._shape[1]},set:function(I){return P.height=I}}]),this._shapeVector=L}var w=g.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,E),this._minFilter=E}},magFilter:{get:function(){return this._magFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,E),this._magFilter=E}},mipSamples:{get:function(){return this._anisoSamples},set:function(E){var S=this._anisoSamples;if(this._anisoSamples=Math.max(E,1)|0,S!==this._anisoSamples){var C=this.gl.getExtension("EXT_texture_filter_anisotropic");C&&this.gl.texParameterf(this.gl.TEXTURE_2D,C.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(E){if(this.bind(),h.indexOf(E)<0)throw new 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(),h.indexOf(E)<0)throw new 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]),E.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var S=0;S<2;++S)if(h.indexOf(E[S])<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);this._wrapS=E[0],this._wrapT=E[1];var C=this.gl;return this.bind(),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,this._wrapS),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,this._wrapT),E}},shape:{get:function(){return this._shapeVector},set:function(E){if(!Array.isArray(E))E=[E|0,E|0];else if(E.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return m(this,E[0]|0,E[1]|0),[E[0]|0,E[1]|0]}},width:{get:function(){return this._shape[0]},set:function(E){return E=E|0,m(this,E,this._shape[1]),E}},height:{get:function(){return this._shape[1]},set:function(E){return E=E|0,m(this,this._shape[0],E),E}}}),w.bind=function(E){var S=this.gl;return E!==void 0&&S.activeTexture(S.TEXTURE0+(E|0)),S.bindTexture(S.TEXTURE_2D,this.handle),E!==void 0?E|0:S.getParameter(S.ACTIVE_TEXTURE)-S.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var E=Math.min(this._shape[0],this._shape[1]),S=0;E>0;++S,E>>>=1)this._mipLevels.indexOf(S)<0&&this._mipLevels.push(S)},w.setPixels=function(E,S,C,k){var D=this.gl;this.bind(),Array.isArray(S)?(k=C,C=S[1]|0,S=S[0]|0):(S=S||0,C=C||0),k=k||0;var F=p(E)?E:E.raw;if(F){var P=this._mipLevels.indexOf(k)<0;P?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(k)):D.texSubImage2D(D.TEXTURE_2D,k,S,C,this.format,this.type,F)}else if(E.shape&&E.stride&&E.data){if(E.shape.length<2||S+E.shape[1]>this._shape[1]>>>k||C+E.shape[0]>this._shape[0]>>>k||S<0||C<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");_(D,S,C,k,this.format,this.type,this._mipLevels,E)}else throw new Error("gl-texture2d: Unsupported data type")};function b(E,S){return E.length===3?S[2]===1&&S[1]===E[0]*E[2]&&S[0]===E[2]:S[0]===1&&S[1]===E[0]}function _(E,S,C,k,D,F,P,R){var L=R.dtype,I=R.shape.slice();if(I.length<2||I.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,O=0,$=b(I,R.stride.slice());L==="float32"?B=E.FLOAT:L==="float64"?(B=E.FLOAT,$=!1,L="float32"):L==="uint8"?B=E.UNSIGNED_BYTE:(B=E.UNSIGNED_BYTE,$=!1,L="uint8");var Y=1;if(I.length===2)O=E.LUMINANCE,I=[I[0],I[1],1],R=s(R.data,I,[R.stride[0],R.stride[1],1],R.offset);else if(I.length===3){if(I[2]===1)O=E.ALPHA;else if(I[2]===2)O=E.LUMINANCE_ALPHA;else if(I[2]===3)O=E.RGB;else if(I[2]===4)O=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Y=I[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((O===E.LUMINANCE||O===E.ALPHA)&&(D===E.LUMINANCE||D===E.ALPHA)&&(O=D),O!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var K=R.size,j=P.indexOf(k)<0;if(j&&P.push(k),B===F&&$)R.offset===0&&R.data.length===K?j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data):j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data.subarray(R.offset,R.offset+K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data.subarray(R.offset,R.offset+K));else{var q;F===E.FLOAT?q=u.mallocFloat32(K):q=u.mallocUint8(K);var J=s(q,I,[I[2],I[2]*I[0],1]);B===E.FLOAT&&F===E.UNSIGNED_BYTE?v(J,R):l.assign(J,R),j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,q.subarray(0,K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,q.subarray(0,K)),F===E.FLOAT?u.freeFloat32(q):u.freeUint8(q)}}function M(E){var S=E.createTexture();return E.bindTexture(E.TEXTURE_2D,S),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),S}function x(E,S,C,k,D){var F=E.getParameter(E.MAX_TEXTURE_SIZE);if(S<0||S>F||C<0||C>F)throw new Error("gl-texture2d: Invalid texture shape");if(D===E.FLOAT&&!E.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,k,S,C,0,k,D,null),new g(E,P,S,C,k,D)}function T(E,S,C,k,D,F){var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,D,D,F,S),new g(E,P,C,k,D,F)}function A(E,S){var C=S.dtype,k=S.shape.slice(),D=E.getParameter(E.MAX_TEXTURE_SIZE);if(k[0]<0||k[0]>D||k[1]<0||k[1]>D)throw new Error("gl-texture2d: Invalid texture size");var F=b(k,S.stride.slice()),P=0;C==="float32"?P=E.FLOAT:C==="float64"?(P=E.FLOAT,F=!1,C="float32"):C==="uint8"?P=E.UNSIGNED_BYTE:(P=E.UNSIGNED_BYTE,F=!1,C="uint8");var R=0;if(k.length===2)R=E.LUMINANCE,k=[k[0],k[1],1],S=s(S.data,k,[S.stride[0],S.stride[1],1],S.offset);else if(k.length===3)if(k[2]===1)R=E.ALPHA;else if(k[2]===2)R=E.LUMINANCE_ALPHA;else if(k[2]===3)R=E.RGB;else if(k[2]===4)R=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");P===E.FLOAT&&!E.getExtension("OES_texture_float")&&(P=E.UNSIGNED_BYTE,F=!1);var L,I,B=S.size;if(F)S.offset===0&&S.data.length===B?L=S.data:L=S.data.subarray(S.offset,S.offset+B);else{var O=[k[2],k[2]*k[0],1];I=u.malloc(B,C);var $=s(I,k,O,0);(C==="float32"||C==="float64")&&P===E.UNSIGNED_BYTE?v($,S):l.assign($,S),L=I.subarray(0,B)}var Y=M(E);return E.texImage2D(E.TEXTURE_2D,0,R,k[0],k[1],0,R,P,L),F||u.free(I),new g(E,Y,k[0],k[1],R,P)}function y(E){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(E),typeof arguments[1]=="number")return x(E,arguments[1],arguments[2],arguments[3]||E.RGBA,arguments[4]||E.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(E,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var S=arguments[1],C=p(S)?S:S.raw;if(C)return T(E,C,S.width|0,S.height|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(S.shape&&S.data&&S.stride)return A(E,S)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(n){"use strict";function a(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(v)}},9226(n){n.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126(n){n.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091(n){n.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2];return o[0]=c*p-f*d,o[1]=f*h-u*p,o[2]=u*d-c*h,o}},5455(n,a,o){n.exports=o(7056)},7056(n){n.exports=a;function a(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(n,a,o){n.exports=o(6690)},6690(n){n.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613(n){n.exports=1e-6},9922(n,a,o){n.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],p=c[0],v=c[1],m=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-v)<=s*Math.max(1,Math.abs(h),Math.abs(v))&&Math.abs(d-m)<=s*Math.max(1,Math.abs(d),Math.abs(m))}},9265(n){n.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681(n){n.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137(n,a,o){n.exports=l;var s=o(1091)();function l(u,c,f,h,d,p){var v,m;for(c||(c=3),f||(f=0),h?m=Math.min(h*c+f,u.length):m=u.length,v=f;v0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=s[0],o[1]=c+h*v-d*p,o[2]=f+h*p+d*v,o}},109(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=c+d*p+h*v,o[1]=s[1],o[2]=f+d*v-h*p,o}},8692(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=c+h*v-d*p,o[1]=f+h*p+d*v,o[2]=s[2],o}},2447(n){n.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141(n,a,o){n.exports=o(2953)},5486(n,a,o){n.exports=o(3066)},2953(n){n.exports=a;function a(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(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229(n,a,o){n.exports=o(6843)},6843(n){n.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2],v=l[3],m=d*f-p*c,g=p*u-h*f,w=h*c-d*u;return m*=2,g*=2,w*=2,o[0]=u+v*m+d*w-p*g,o[1]=c+v*g+p*m-h*w,o[2]=f+v*w+h*g-d*m,o}},4361(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536(n){n.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390(n){n.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970(n,a,o){n.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(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131(n,a,o){var s=o(5177),l=o(9288);n.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(n){n.exports=a;function a(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(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960(n){n.exports=a;function a(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(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860(n){n.exports=a;function a(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(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2],v=l[3],m=v*u+d*f-p*c,g=v*c+p*u-h*f,w=v*f+h*c-d*u,b=-h*u-d*c-p*f;return o[0]=m*v+b*-h+g*-p-w*-d,o[1]=g*v+b*-d+w*-h-m*-p,o[2]=w*v+b*-p+m*-d-g*-h,o[3]=s[3],o}},1848(n,a,o){var s=o(4905),l=o(6468);n.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;Fe=re.slice(0,1).join("")}return Q(Fe),K+=Fe.length,L=L.slice(Fe.length),L.length}while(!0)}function ue(){return/[^a-fA-F0-9]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ee(){return P==="."||/[eE]/.test(P)?(L.push(P),F=b,R=P,k+1):P==="x"&&L.length===1&&L[0]==="0"?(F=y,L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ae(){return P==="f"&&(L.push(P),R=P,k+=1),/[eE]/.test(P)||(P==="-"||P==="+")&&/[eE]/.test(R)?(L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function xe(){if(/[^\d\w_]/.test(P)){var re=L.join("");return G[re]?F=x:H[re]?F=M:F=_,Q(L.join("")),F=h,k}return L.push(P),R=P,k+1}}},3508(n,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),n.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(n){n.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(n,a,o){var s=o(620);n.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(n){n.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(n){n.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(n,a,o){var s=o(5874);n.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236(n){n.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,m=-7,g=l?c-1:0,w=l?-1:1,b=o[s+g];for(g+=w,f=b&(1<<-m)-1,b>>=-m,m+=d;m>0;f=f*256+o[s+g],g+=w,m-=8);for(h=f&(1<<-m)-1,f>>=-m,m+=u;m>0;h=h*256+o[s+g],g+=w,m-=8);if(f===0)f=1-v;else{if(f===p)return h?NaN:(b?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-v}return(b?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,p,v=f*8-c-1,m=(1<>1,w=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=u?0:f-1,_=u?1:-1,M=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=m):(h=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+g>=1?s+=w/p:s+=w*Math.pow(2,1-g),s*p>=2&&(h++,p/=2),h+g>=m?(d=0,h=m):h+g>=1?(d=(s*p-1)*Math.pow(2,c),h=h+g):(d=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+b]=d&255,b+=_,d/=256,c-=8);for(h=h<0;o[l+b]=h&255,b+=_,h/=256,v-=8);o[l+b-_]|=M*128}},8954(n,a,o){"use strict";n.exports=g;var s=o(3250),l=o(6803).Fw;function u(w,b,_){this.vertices=w,this.adjacent=b,this.boundary=_,this.lastVisited=-1}u.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var b=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=b};function c(w,b,_){this.vertices=w,this.cell=b,this.index=_}function f(w,b){return l(w.vertices,b.vertices)}function h(w){return function(){var b=this.tuple;return w.apply(this,b)}}function d(w){var b=s[w+1];return b||(b=s),h(b)}var p=[];function v(w,b,_){this.dimension=w,this.vertices=b,this.simplices=_,this.interior=_.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var M=0;M<=w;++M)this.tuple[M]=this.vertices[M];var x=p[w];x||(x=p[w]=d(w)),this.orient=x}var m=v.prototype;m.handleBoundaryDegeneracy=function(w,b){var _=this.dimension,M=this.vertices.length-1,x=this.tuple,T=this.vertices,A=[w];for(w.lastVisited=-M;A.length>0;){w=A.pop();for(var y=w.adjacent,E=0;E<=_;++E){var S=y[E];if(!(!S.boundary||S.lastVisited<=-M)){for(var C=S.vertices,k=0;k<=_;++k){var D=C[k];D<0?x[k]=b:x[k]=T[D]}var F=this.orient();if(F>0)return S;S.lastVisited=-M,F===0&&A.push(S)}}}return null},m.walk=function(w,b){var _=this.vertices.length-1,M=this.dimension,x=this.vertices,T=this.tuple,A=b?this.interior.length*Math.random()|0:this.interior.length-1,y=this.interior[A];e:for(;!y.boundary;){for(var E=y.vertices,S=y.adjacent,C=0;C<=M;++C)T[C]=x[E[C]];y.lastVisited=_;for(var C=0;C<=M;++C){var k=S[C];if(!(k.lastVisited>=_)){var D=T[C];T[C]=w;var F=this.orient();if(T[C]=D,F<0){y=k;continue e}else k.boundary?k.lastVisited=-_:k.lastVisited=_}}return}return y},m.addPeaks=function(w,b){var _=this.vertices.length-1,M=this.dimension,x=this.vertices,T=this.tuple,A=this.interior,y=this.simplices,E=[b];b.lastVisited=_,b.vertices[b.vertices.indexOf(-1)]=_,b.boundary=!1,A.push(b);for(var S=[];E.length>0;){var b=E.pop(),C=b.vertices,k=b.adjacent,D=C.indexOf(_);if(!(D<0)){for(var F=0;F<=M;++F)if(F!==D){var P=k[F];if(!(!P.boundary||P.lastVisited>=_)){var R=P.vertices;if(P.lastVisited!==-_){for(var L=0,I=0;I<=M;++I)R[I]<0?(L=I,T[I]=w):T[I]=x[R[I]];var B=this.orient();if(B>0){R[L]=_,P.boundary=!1,A.push(P),E.push(P),P.lastVisited=_;continue}else P.lastVisited=-_}var O=P.adjacent,$=C.slice(),Y=k.slice(),K=new u($,Y,!0);y.push(K);var j=O.indexOf(b);if(!(j<0)){O[j]=K,Y[D]=P,$[F]=-1,Y[F]=b,k[F]=K,K.flip();for(var I=0;I<=M;++I){var q=$[I];if(!(q<0||q===_)){for(var J=new Array(M-1),U=0,V=0;V<=M;++V){var X=$[V];X<0||V===I||(J[U++]=X)}S.push(new c(J,K,I))}}}}}}}S.sort(f);for(var F=0;F+1=0?A[E++]=y[C]:S=C&1;if(S===(w&1)){var k=A[0];A[0]=A[1],A[1]=k}b.push(A)}}return b};function g(w,b){var _=w.length;if(_===0)throw new Error("Must have at least d+1 points");var M=w[0].length;if(_<=M)throw new Error("Must input at least d+1 points");var x=w.slice(0,M+1),T=s.apply(void 0,x);if(T===0)throw new Error("Input not in general position");for(var A=new Array(M+1),y=0;y<=M;++y)A[y]=y;T<0&&(A[0]=1,A[1]=0);for(var E=new u(A,new Array(M+1),!1),S=E.adjacent,C=new Array(M+2),y=0;y<=M;++y){for(var k=A.slice(),D=0;D<=M;++D)D===y&&(k[D]=-1);var F=k[0];k[0]=k[1],k[1]=F;var P=new u(k,new Array(M+1),!0);S[y]=P,C[y]=P}C[M+1]=E;for(var y=0;y<=M;++y)for(var k=S[y].vertices,R=S[y].adjacent,D=0;D<=M;++D){var L=k[D];if(L<0){R[D]=E;continue}for(var I=0;I<=M;++I)S[I].vertices.indexOf(L)<0&&(R[D]=S[I])}for(var B=new v(M,x,C),O=!!b,y=M+1;y<_;++y)B.insert(w[y],O);return B.boundary()}},3352(n,a,o){"use strict";var s=o(2478),l=0,u=1,c=2;n.exports=E;function f(S,C,k,D,F){this.mid=S,this.left=C,this.right=k,this.leftPoints=D,this.rightPoints=F,this.count=(C?C.count:0)+(k?k.count:0)+D.length}var h=f.prototype;function d(S,C){S.mid=C.mid,S.left=C.left,S.right=C.right,S.leftPoints=C.leftPoints,S.rightPoints=C.rightPoints,S.count=C.count}function p(S,C){var k=T(C);S.mid=k.mid,S.left=k.left,S.right=k.right,S.leftPoints=k.leftPoints,S.rightPoints=k.rightPoints,S.count=k.count}function v(S,C){var k=S.intervals([]);k.push(C),p(S,k)}function m(S,C){var k=S.intervals([]),D=k.indexOf(C);return D<0?l:(k.splice(D,1),p(S,k),u)}h.intervals=function(S){return S.push.apply(S,this.leftPoints),this.left&&this.left.intervals(S),this.right&&this.right.intervals(S),S},h.insert=function(S){var C=this.count-this.leftPoints.length;if(this.count+=1,S[1]3*(C+1)?v(this,S):this.left.insert(S):this.left=T([S]);else if(S[0]>this.mid)this.right?4*(this.right.count+1)>3*(C+1)?v(this,S):this.right.insert(S):this.right=T([S]);else{var k=s.ge(this.leftPoints,S,M),D=s.ge(this.rightPoints,S,x);this.leftPoints.splice(k,0,S),this.rightPoints.splice(D,0,S)}},h.remove=function(S){var C=this.count-this.leftPoints;if(S[1]3*(C-1))return m(this,S);var D=this.left.remove(S);return D===c?(this.left=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else if(S[0]>this.mid){if(!this.right)return l;var F=this.left?this.left.count:0;if(4*F>3*(C-1))return m(this,S);var D=this.right.remove(S);return D===c?(this.right=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===S?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===S){if(this.left&&this.right){for(var P=this,R=this.left;R.right;)P=R,R=R.right;if(P===this)R.right=this.right;else{var L=this.left,D=this.right;P.count-=R.count,P.right=R.left,R.left=L,R.right=D}d(this,R),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var L=s.ge(this.leftPoints,S,M);L=0&&S[D][1]>=C;--D){var F=k(S[D]);if(F)return F}}function b(S,C){for(var k=0;kthis.mid){if(this.right){var k=this.right.queryPoint(S,C);if(k)return k}return w(this.rightPoints,S,C)}else return b(this.leftPoints,C)},h.queryInterval=function(S,C,k){if(Sthis.mid&&this.right){var D=this.right.queryInterval(S,C,k);if(D)return D}return Cthis.mid?w(this.rightPoints,S,k):b(this.leftPoints,k)};function _(S,C){return S-C}function M(S,C){var k=S[0]-C[0];return k||S[1]-C[1]}function x(S,C){var k=S[1]-C[1];return k||S[0]-C[0]}function T(S){if(S.length===0)return null;for(var C=[],k=0;k>1],F=[],P=[],R=[],k=0;k1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},5219(n){"use strict";n.exports=function(a){for(var o=a.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(n){function a(o,s,l){return o*(1-l)+s*l}n.exports=a},2652(n,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),v=l(),m=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];n.exports=function(T,A,y,E,S,C){if(A||(A=[0,0,0]),y||(y=[0,0,0]),E||(E=[0,0,0]),S||(S=[0,0,0,1]),C||(C=[0,0,0,1]),!s(p,T)||(u(v,p),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(c(v)<1e-8)))return!1;var k=p[3],D=p[7],F=p[11],P=p[12],R=p[13],L=p[14],I=p[15];if(k!==0||D!==0||F!==0){m[0]=k,m[1]=D,m[2]=F,m[3]=I;var B=f(v,v);if(!B)return!1;h(v,v),b(S,m,v)}else S[0]=S[1]=S[2]=0,S[3]=1;if(A[0]=P,A[1]=R,A[2]=L,_(g,p),y[0]=d.length(g[0]),d.normalize(g[0],g[0]),E[0]=d.dot(g[0],g[1]),M(g[1],g[1],g[0],1,-E[0]),y[1]=d.length(g[1]),d.normalize(g[1],g[1]),E[0]/=y[1],E[1]=d.dot(g[0],g[2]),M(g[2],g[2],g[0],1,-E[1]),E[2]=d.dot(g[1],g[2]),M(g[2],g[2],g[1],1,-E[2]),y[2]=d.length(g[2]),d.normalize(g[2],g[2]),E[1]/=y[2],E[2]/=y[2],d.cross(w,g[1],g[2]),d.dot(g[0],w)<0)for(var O=0;O<3;O++)y[O]*=-1,g[O][0]*=-1,g[O][1]*=-1,g[O][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(C[0]=-C[0]),g[0][2]>g[2][0]&&(C[1]=-C[1]),g[1][0]>g[0][1]&&(C[2]=-C[2]),!0};function b(x,T,A){var y=T[0],E=T[1],S=T[2],C=T[3];return x[0]=A[0]*y+A[4]*E+A[8]*S+A[12]*C,x[1]=A[1]*y+A[5]*E+A[9]*S+A[13]*C,x[2]=A[2]*y+A[6]*E+A[10]*S+A[14]*C,x[3]=A[3]*y+A[7]*E+A[11]*S+A[15]*C,x}function _(x,T){x[0][0]=T[0],x[0][1]=T[1],x[0][2]=T[2],x[1][0]=T[4],x[1][1]=T[5],x[1][2]=T[6],x[2][0]=T[8],x[2][1]=T[9],x[2][2]=T[10]}function M(x,T,A,y,E){x[0]=T[0]*y+A[0]*E,x[1]=T[1]*y+A[1]*E,x[2]=T[2]*y+A[2]*E}},4335(n){n.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(n,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=m(),d=m(),p=m();n.exports=v;function v(b,_,M,x){if(c(_)===0||c(M)===0)return!1;var T=u(_,h.translate,h.scale,h.skew,h.perspective,h.quaternion),A=u(M,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!T||!A?!1:(s(p.translate,h.translate,d.translate,x),s(p.skew,h.skew,d.skew,x),s(p.scale,h.scale,d.scale,x),s(p.perspective,h.perspective,d.perspective,x),f(p.quaternion,h.quaternion,d.quaternion,x),l(b,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function m(){return{translate:g(),scale:g(1),skew:g(),perspective:w(),quaternion:w()}}function g(b){return[b||0,b||0,b||0]}function w(){return[0,0,0,1]}},7182(n,a,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();n.exports=function(f,h,d,p,v,m){return s.identity(f),s.fromRotationTranslation(f,m,h),f[3]=v[0],f[7]=v[1],f[11]=v[2],f[15]=v[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,d),f}},1811(n,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),p=o(7656),v=o(2504),m=o(3536),g=[0,0,0];n.exports=M;function w(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.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 b=w.prototype;b.recalcMatrix=function(x){var T=this._time,A=s.le(T,x),y=this.computedMatrix;if(!(A<0)){var E=this._components;if(A===T.length-1)for(var S=16*A,C=0;C<16;++C)y[C]=E[S++];else{for(var k=T[A+1]-T[A],S=16*A,D=this.prevMatrix,F=!0,C=0;C<16;++C)D[C]=E[S++];for(var P=this.nextMatrix,C=0;C<16;++C)P[C]=E[S++],F=F&&D[C]===P[C];if(k<1e-6||F)for(var C=0;C<16;++C)y[C]=D[C];else l(y,D,P,(x-T[A])/k)}var R=this.computedUp;R[0]=y[1],R[1]=y[5],R[2]=y[9],m(R,R);var L=this.computedInverse;u(L,y);var I=this.computedEye,B=L[15];I[0]=L[12]/B,I[1]=L[13]/B,I[2]=L[14]/B;for(var O=this.computedCenter,$=Math.exp(this.computedRadius[0]),C=0;C<3;++C)O[C]=I[C]-y[2+4*C]*$}},b.idle=function(x){if(!(x1&&s(u[d[g-2]],u[d[g-1]],m)<=0;)g-=1,d.pop();for(d.push(v),g=p.length;g>1&&s(u[p[g-2]],u[p[g-1]],m)>=0;)g-=1,p.pop();p.push(v)}for(var w=new Array(p.length+d.length-2),b=0,f=0,_=d.length;f<_;++f)w[b++]=d[f];for(var M=p.length-2;M>0;--M)w[b++]=p[M];return w}},351(n,a,o){"use strict";n.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,p={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function m(S){var C=!1;return"altKey"in S&&(C=C||S.altKey!==p.alt,p.alt=!!S.altKey),"shiftKey"in S&&(C=C||S.shiftKey!==p.shift,p.shift=!!S.shiftKey),"ctrlKey"in S&&(C=C||S.ctrlKey!==p.control,p.control=!!S.ctrlKey),"metaKey"in S&&(C=C||S.metaKey!==p.meta,p.meta=!!S.metaKey),C}function g(S,C){var k=s.x(C),D=s.y(C);"buttons"in C&&(S=C.buttons|0),(S!==f||k!==h||D!==d||m(C))&&(f=S|0,h=k||0,d=D||0,c&&c(f,h,d,p))}function w(S){g(0,S)}function b(){(f||h||d||p.shift||p.alt||p.meta||p.control)&&(h=d=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function _(S){m(S)&&c&&c(f,h,d,p)}function M(S){s.buttons(S)===0?g(0,S):g(f,S)}function x(S){g(f|s.buttons(S),S)}function T(S){g(f&~s.buttons(S),S)}function A(){v||(v=!0,u.addEventListener("mousemove",M),u.addEventListener("mousedown",x),u.addEventListener("mouseup",T),u.addEventListener("mouseleave",w),u.addEventListener("mouseenter",w),u.addEventListener("mouseout",w),u.addEventListener("mouseover",w),u.addEventListener("blur",b),u.addEventListener("keyup",_),u.addEventListener("keydown",_),u.addEventListener("keypress",_),u!==window&&(window.addEventListener("blur",b),window.addEventListener("keyup",_),window.addEventListener("keydown",_),window.addEventListener("keypress",_)))}function y(){v&&(v=!1,u.removeEventListener("mousemove",M),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",T),u.removeEventListener("mouseleave",w),u.removeEventListener("mouseenter",w),u.removeEventListener("mouseout",w),u.removeEventListener("mouseover",w),u.removeEventListener("blur",b),u.removeEventListener("keyup",_),u.removeEventListener("keydown",_),u.removeEventListener("keypress",_),u!==window&&(window.removeEventListener("blur",b),window.removeEventListener("keyup",_),window.removeEventListener("keydown",_),window.removeEventListener("keypress",_)))}A();var E={element:u};return Object.defineProperties(E,{enabled:{get:function(){return v},set:function(S){S?A():y()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),E}},24(n){var a={left:0,top:0};n.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687(n,a){"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(Y=1,q[U++]=p(A[C],b,_,M),C+=B,x>0)for($=1,k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++),U+=1,C+=B,$=2;$0)for($=1,k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++,be!==ce&&d(J[U+Q],he,R,I,ce,be,b,_,M)),U+=1,C+=B,$=2;$0){if($=1,q[U++]=p(A[C],b,_,M),C+=B,T>0)for(Y=1,k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++),U+=1,C+=B,Y=2;Y0)for(Y=1,k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++,be!==ce&&d(J[U+Q],he,I,F,be,ce,b,_,M)),U+=1,C+=B,Y=2;Y 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var m=f.getters||[],g=new Array(p),w=0;w=0?g[w]=!0:g[w]=!1;return u(f.vertex,f.cell,f.phase,v,d,g)}},6199(n,a,o){"use strict";var s=o(1338),l={zero:function(M,x,T,A){var y=M[0],E=T[0];A|=0;var S=0,C=E;for(S=0;S2&&S[1]>2&&A(E.pick(-1,-1).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,0).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,1).lo(1,1).hi(S[0]-2,S[1]-2)),S[1]>2&&(T(E.pick(0,-1).lo(1).hi(S[1]-2),y.pick(0,-1,1).lo(1).hi(S[1]-2)),x(y.pick(0,-1,0).lo(1).hi(S[1]-2))),S[1]>2&&(T(E.pick(S[0]-1,-1).lo(1).hi(S[1]-2),y.pick(S[0]-1,-1,1).lo(1).hi(S[1]-2)),x(y.pick(S[0]-1,-1,0).lo(1).hi(S[1]-2))),S[0]>2&&(T(E.pick(-1,0).lo(1).hi(S[0]-2),y.pick(-1,0,0).lo(1).hi(S[0]-2)),x(y.pick(-1,0,1).lo(1).hi(S[0]-2))),S[0]>2&&(T(E.pick(-1,S[1]-1).lo(1).hi(S[0]-2),y.pick(-1,S[1]-1,0).lo(1).hi(S[0]-2)),x(y.pick(-1,S[1]-1,1).lo(1).hi(S[0]-2))),y.set(0,0,0,0),y.set(0,0,1,0),y.set(S[0]-1,0,0,0),y.set(S[0]-1,0,1,0),y.set(0,S[1]-1,0,0),y.set(0,S[1]-1,1,0),y.set(S[0]-1,S[1]-1,0,0),y.set(S[0]-1,S[1]-1,1,0),y}}function _(M){var x=M.join(),S=p[x];if(S)return S;for(var T=M.length,A=[m,g],y=1;y<=T;++y)A.push(w(y));var E=b,S=E.apply(void 0,A);return p[x]=S,S}n.exports=function(x,T,A){if(Array.isArray(A)||(typeof A=="string"?A=s(T.dimension,A):A=s(T.dimension,"clamp")),T.size===0)return x;if(T.dimension===0)return x.set(0),x;var y=_(A);return y(x,T)}},4317(n){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,p=0<=h&&h0;){R<64?(x=R,R=0):(x=64,R-=64);for(var L=p[1]|0;L>0;){L<64?(T=L,L=0):(T=64,L-=64),g=F+R*y+L*E,_=P+R*C+L*k;var I=0,B=0,O=0,$=S,Y=y-A*S,K=E-x*y,j=D,q=C-A*D,J=k-x*C;for(O=0;O0;){k<64?(x=k,k=0):(x=64,k-=64);for(var D=p[0]|0;D>0;){D<64?(M=D,D=0):(M=64,D-=64),g=S+k*A+D*T,_=C+k*E+D*y;var F=0,P=0,R=A,L=T-x*A,I=E,B=y-x*E;for(P=0;P0;){P<64?(T=P,P=0):(T=64,P-=64);for(var R=p[0]|0;R>0;){R<64?(M=R,R=0):(M=64,R-=64);for(var L=p[1]|0;L>0;){L<64?(x=L,L=0):(x=64,L-=64),g=D+P*E+R*A+L*y,_=F+P*k+R*S+L*C;var I=0,B=0,O=0,$=E,Y=A-T*E,K=y-M*A,j=k,q=S-T*k,J=C-M*S;for(O=0;Ow;){I=0,B=F-x;t:for(R=0;R$)break t;B+=S,I+=C}for(I=F,B=F-x,R=0;R>1,L=R-D,I=R+D,B=F,O=L,$=R,Y=I,K=P,j=b+1,q=_-1,J=!0,U,V,X,H,G,Q,te,ce,ge,Ce=0,be=0,he=0,oe,Ee,ye,ue,ee,ae,xe,re,pe,we,Fe,Se,ke,_e,Ie,Oe,Qe=E,et=m(Qe),_t=m(Qe);Ee=T*B,ye=T*O,Oe=x;e:for(oe=0;oe0){V=B,B=O,O=V;break e}if(he<0)break e;Oe+=C}Ee=T*Y,ye=T*K,Oe=x;e:for(oe=0;oe0){V=Y,Y=K,K=V;break e}if(he<0)break e;Oe+=C}Ee=T*B,ye=T*$,Oe=x;e:for(oe=0;oe0){V=B,B=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*$,Oe=x;e:for(oe=0;oe0){V=O,O=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*B,ye=T*Y,Oe=x;e:for(oe=0;oe0){V=B,B=Y,Y=V;break e}if(he<0)break e;Oe+=C}Ee=T*$,ye=T*Y,Oe=x;e:for(oe=0;oe0){V=$,$=Y,Y=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*K,Oe=x;e:for(oe=0;oe0){V=O,O=K,K=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*$,Oe=x;e:for(oe=0;oe0){V=O,O=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*Y,ye=T*K,Oe=x;e:for(oe=0;oe0){V=Y,Y=K,K=V;break e}if(he<0)break e;Oe+=C}for(Ee=T*B,ye=T*O,ue=T*$,ee=T*Y,ae=T*K,xe=T*F,re=T*R,pe=T*P,Ie=0,Oe=x,oe=0;oe0)q--;else if(he<0){for(Ee=T*Q,ye=T*j,ue=T*q,Oe=x,oe=0;oe0)for(;;){te=x+q*T,Ie=0;e:for(oe=0;oe0){if(--qP){e:for(;;){for(te=x+j*T,Ie=0,Oe=x,oe=0;oe1&&w?_(g,w[0],w[1]):_(g)}var d={"uint32,1,0":function(v,m){return function(g){var w=g.data,b=g.offset|0,_=g.shape,M=g.stride,x=M[0]|0,T=_[0]|0,A=M[1]|0,y=_[1]|0,E=A,S=A,C=1;T<=32?v(0,T-1,w,b,x,A,T,y,E,S,C):m(0,T-1,w,b,x,A,T,y,E,S,C)}}};function p(v,m){var g=[m,v].join(","),w=d[g],b=c(v,m),_=h(v,m,b);return w(b,_)}n.exports=p},446(n,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],p=d.join(":"),v=l[p];return v||(l[p]=v=s(f,h)),v(c),c}n.exports=u},9618(n,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(m,g){return m[0]-g[0]}function c(){var m=this.stride,g=new Array(m.length),w;for(w=0;w=0&&(A=x|0,T+=E*A,y-=A),new b(this.data,y,E,T)},_.step=function(x){var T=this.shape[0],A=this.stride[0],y=this.offset,E=0,S=Math.ceil;return typeof x=="number"&&(E=x|0,E<0?(y+=A*(T-1),T=S(-T/E)):T=S(T/E),A*=E),new b(this.data,T,A,y)},_.transpose=function(x){x=x===void 0?0:x|0;var T=this.shape,A=this.stride;return new b(this.data,T[x],A[x],this.offset)},_.pick=function(x){var T=[],A=[],y=this.offset;typeof x=="number"&&x>=0?y=y+this.stride[0]*x|0:(T.push(this.shape[0]),A.push(this.stride[0]));var E=g[T.length+1];return E(this.data,T,A,y)},function(x,T,A,y){return new b(x,T[0],A[0],y)}},2:function(m,g,w){function b(M,x,T,A,y,E){this.data=M,this.shape=[x,T],this.stride=[A,y],this.offset=E|0}var _=b.prototype;return _.dtype=m,_.dimension=2,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(_,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),_.set=function(x,T,A){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T,A):this.data[this.offset+this.stride[0]*x+this.stride[1]*T]=A},_.get=function(x,T){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T):this.data[this.offset+this.stride[0]*x+this.stride[1]*T]},_.index=function(x,T){return this.offset+this.stride[0]*x+this.stride[1]*T},_.hi=function(x,T){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},_.lo=function(x,T){var A=this.offset,y=0,E=this.shape[0],S=this.shape[1],C=this.stride[0],k=this.stride[1];return typeof x=="number"&&x>=0&&(y=x|0,A+=C*y,E-=y),typeof T=="number"&&T>=0&&(y=T|0,A+=k*y,S-=y),new b(this.data,E,S,C,k,A)},_.step=function(x,T){var A=this.shape[0],y=this.shape[1],E=this.stride[0],S=this.stride[1],C=this.offset,k=0,D=Math.ceil;return typeof x=="number"&&(k=x|0,k<0?(C+=E*(A-1),A=D(-A/k)):A=D(A/k),E*=k),typeof T=="number"&&(k=T|0,k<0?(C+=S*(y-1),y=D(-y/k)):y=D(y/k),S*=k),new b(this.data,A,y,E,S,C)},_.transpose=function(x,T){x=x===void 0?0:x|0,T=T===void 0?1:T|0;var A=this.shape,y=this.stride;return new b(this.data,A[x],A[T],y[x],y[T],this.offset)},_.pick=function(x,T){var A=[],y=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(A.push(this.shape[0]),y.push(this.stride[0])),typeof T=="number"&&T>=0?E=E+this.stride[1]*T|0:(A.push(this.shape[1]),y.push(this.stride[1]));var S=g[A.length+1];return S(this.data,A,y,E)},function(x,T,A,y){return new b(x,T[0],T[1],A[0],A[1],y)}},3:function(m,g,w){function b(M,x,T,A,y,E,S,C){this.data=M,this.shape=[x,T,A],this.stride=[y,E,S],this.offset=C|0}var _=b.prototype;return _.dtype=m,_.dimension=3,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(_,"order",{get:function(){var x=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return x>T?T>A?[2,1,0]:x>A?[1,2,0]:[1,0,2]:x>A?[2,0,1]:A>T?[0,1,2]:[0,2,1]}}),_.set=function(x,T,A,y){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A,y):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A]=y},_.get=function(x,T,A){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A]},_.index=function(x,T,A){return this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A},_.hi=function(x,T,A){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|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)},_.lo=function(x,T,A){var y=this.offset,E=0,S=this.shape[0],C=this.shape[1],k=this.shape[2],D=this.stride[0],F=this.stride[1],P=this.stride[2];return typeof x=="number"&&x>=0&&(E=x|0,y+=D*E,S-=E),typeof T=="number"&&T>=0&&(E=T|0,y+=F*E,C-=E),typeof A=="number"&&A>=0&&(E=A|0,y+=P*E,k-=E),new b(this.data,S,C,k,D,F,P,y)},_.step=function(x,T,A){var y=this.shape[0],E=this.shape[1],S=this.shape[2],C=this.stride[0],k=this.stride[1],D=this.stride[2],F=this.offset,P=0,R=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(F+=C*(y-1),y=R(-y/P)):y=R(y/P),C*=P),typeof T=="number"&&(P=T|0,P<0?(F+=k*(E-1),E=R(-E/P)):E=R(E/P),k*=P),typeof A=="number"&&(P=A|0,P<0?(F+=D*(S-1),S=R(-S/P)):S=R(S/P),D*=P),new b(this.data,y,E,S,C,k,D,F)},_.transpose=function(x,T,A){x=x===void 0?0:x|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0;var y=this.shape,E=this.stride;return new b(this.data,y[x],y[T],y[A],E[x],E[T],E[A],this.offset)},_.pick=function(x,T,A){var y=[],E=[],S=this.offset;typeof x=="number"&&x>=0?S=S+this.stride[0]*x|0:(y.push(this.shape[0]),E.push(this.stride[0])),typeof T=="number"&&T>=0?S=S+this.stride[1]*T|0:(y.push(this.shape[1]),E.push(this.stride[1])),typeof A=="number"&&A>=0?S=S+this.stride[2]*A|0:(y.push(this.shape[2]),E.push(this.stride[2]));var C=g[y.length+1];return C(this.data,y,E,S)},function(x,T,A,y){return new b(x,T[0],T[1],T[2],A[0],A[1],A[2],y)}},4:function(m,g,w){function b(M,x,T,A,y,E,S,C,k,D){this.data=M,this.shape=[x,T,A,y],this.stride=[E,S,C,k],this.offset=D|0}var _=b.prototype;return _.dtype=m,_.dimension=4,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(x,T,A,y,E){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y,E):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y]=E},_.get=function(x,T,A,y){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y]},_.index=function(x,T,A,y){return this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y},_.hi=function(x,T,A,y){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof y!="number"||y<0?this.shape[3]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},_.lo=function(x,T,A,y){var E=this.offset,S=0,C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.stride[0],R=this.stride[1],L=this.stride[2],I=this.stride[3];return typeof x=="number"&&x>=0&&(S=x|0,E+=P*S,C-=S),typeof T=="number"&&T>=0&&(S=T|0,E+=R*S,k-=S),typeof A=="number"&&A>=0&&(S=A|0,E+=L*S,D-=S),typeof y=="number"&&y>=0&&(S=y|0,E+=I*S,F-=S),new b(this.data,C,k,D,F,P,R,L,I,E)},_.step=function(x,T,A,y){var E=this.shape[0],S=this.shape[1],C=this.shape[2],k=this.shape[3],D=this.stride[0],F=this.stride[1],P=this.stride[2],R=this.stride[3],L=this.offset,I=0,B=Math.ceil;return typeof x=="number"&&(I=x|0,I<0?(L+=D*(E-1),E=B(-E/I)):E=B(E/I),D*=I),typeof T=="number"&&(I=T|0,I<0?(L+=F*(S-1),S=B(-S/I)):S=B(S/I),F*=I),typeof A=="number"&&(I=A|0,I<0?(L+=P*(C-1),C=B(-C/I)):C=B(C/I),P*=I),typeof y=="number"&&(I=y|0,I<0?(L+=R*(k-1),k=B(-k/I)):k=B(k/I),R*=I),new b(this.data,E,S,C,k,D,F,P,R,L)},_.transpose=function(x,T,A,y){x=x===void 0?0:x|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0,y=y===void 0?3:y|0;var E=this.shape,S=this.stride;return new b(this.data,E[x],E[T],E[A],E[y],S[x],S[T],S[A],S[y],this.offset)},_.pick=function(x,T,A,y){var E=[],S=[],C=this.offset;typeof x=="number"&&x>=0?C=C+this.stride[0]*x|0:(E.push(this.shape[0]),S.push(this.stride[0])),typeof T=="number"&&T>=0?C=C+this.stride[1]*T|0:(E.push(this.shape[1]),S.push(this.stride[1])),typeof A=="number"&&A>=0?C=C+this.stride[2]*A|0:(E.push(this.shape[2]),S.push(this.stride[2])),typeof y=="number"&&y>=0?C=C+this.stride[3]*y|0:(E.push(this.shape[3]),S.push(this.stride[3]));var k=g[E.length+1];return k(this.data,E,S,C)},function(x,T,A,y){return new b(x,T[0],T[1],T[2],T[3],A[0],A[1],A[2],A[3],y)}},5:function(g,w,b){function _(x,T,A,y,E,S,C,k,D,F,P,R){this.data=x,this.shape=[T,A,y,E,S],this.stride=[C,k,D,F,P],this.offset=R|0}var M=_.prototype;return M.dtype=g,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:b}),M.set=function(T,A,y,E,S,C){return g==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S,C):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]=C},M.get=function(T,A,y,E,S){return g==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]},M.index=function(T,A,y,E,S){return this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S},M.hi=function(T,A,y,E,S){return new _(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof y!="number"||y<0?this.shape[2]:y|0,typeof E!="number"||E<0?this.shape[3]:E|0,typeof S!="number"||S<0?this.shape[4]:S|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(T,A,y,E,S){var C=this.offset,k=0,D=this.shape[0],F=this.shape[1],P=this.shape[2],R=this.shape[3],L=this.shape[4],I=this.stride[0],B=this.stride[1],O=this.stride[2],$=this.stride[3],Y=this.stride[4];return typeof T=="number"&&T>=0&&(k=T|0,C+=I*k,D-=k),typeof A=="number"&&A>=0&&(k=A|0,C+=B*k,F-=k),typeof y=="number"&&y>=0&&(k=y|0,C+=O*k,P-=k),typeof E=="number"&&E>=0&&(k=E|0,C+=$*k,R-=k),typeof S=="number"&&S>=0&&(k=S|0,C+=Y*k,L-=k),new _(this.data,D,F,P,R,L,I,B,O,$,Y,C)},M.step=function(T,A,y,E,S){var C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.shape[4],R=this.stride[0],L=this.stride[1],I=this.stride[2],B=this.stride[3],O=this.stride[4],$=this.offset,Y=0,K=Math.ceil;return typeof T=="number"&&(Y=T|0,Y<0?($+=R*(C-1),C=K(-C/Y)):C=K(C/Y),R*=Y),typeof A=="number"&&(Y=A|0,Y<0?($+=L*(k-1),k=K(-k/Y)):k=K(k/Y),L*=Y),typeof y=="number"&&(Y=y|0,Y<0?($+=I*(D-1),D=K(-D/Y)):D=K(D/Y),I*=Y),typeof E=="number"&&(Y=E|0,Y<0?($+=B*(F-1),F=K(-F/Y)):F=K(F/Y),B*=Y),typeof S=="number"&&(Y=S|0,Y<0?($+=O*(P-1),P=K(-P/Y)):P=K(P/Y),O*=Y),new _(this.data,C,k,D,F,P,R,L,I,B,O,$)},M.transpose=function(T,A,y,E,S){T=T===void 0?0:T|0,A=A===void 0?1:A|0,y=y===void 0?2:y|0,E=E===void 0?3:E|0,S=S===void 0?4:S|0;var C=this.shape,k=this.stride;return new _(this.data,C[T],C[A],C[y],C[E],C[S],k[T],k[A],k[y],k[E],k[S],this.offset)},M.pick=function(T,A,y,E,S){var C=[],k=[],D=this.offset;typeof T=="number"&&T>=0?D=D+this.stride[0]*T|0:(C.push(this.shape[0]),k.push(this.stride[0])),typeof A=="number"&&A>=0?D=D+this.stride[1]*A|0:(C.push(this.shape[1]),k.push(this.stride[1])),typeof y=="number"&&y>=0?D=D+this.stride[2]*y|0:(C.push(this.shape[2]),k.push(this.stride[2])),typeof E=="number"&&E>=0?D=D+this.stride[3]*E|0:(C.push(this.shape[3]),k.push(this.stride[3])),typeof S=="number"&&S>=0?D=D+this.stride[4]*S|0:(C.push(this.shape[4]),k.push(this.stride[4]));var F=w[C.length+1];return F(this.data,C,k,D)},function(T,A,y,E){return new _(T,A[0],A[1],A[2],A[3],A[4],y[0],y[1],y[2],y[3],y[4],E)}}};function h(m,g){var w=g===-1?"T":String(g),b=f[w];return g===-1?b(m):g===0?b(m,p[m][0]):b(m,p[m],c)}function d(m){if(s(m))return"buffer";if(l)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 p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(m,g,w,b){if(m===void 0){var y=p.array[0];return y([])}else typeof m=="number"&&(m=[m]);g===void 0&&(g=[m.length]);var _=g.length;if(w===void 0){w=new Array(_);for(var M=_-1,x=1;M>=0;--M)w[M]=x,x*=g[M]}if(b===void 0){b=0;for(var M=0;M<_;++M)w[M]<0&&(b-=(g[M]-1)*w[M])}for(var T=d(m),A=p[T];A.length<=_+1;)A.push(h(T,A.length-1));var y=A[_+1];return y(m,g,w,b)}n.exports=v},1278(n,a,o){"use strict";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;n.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),p=s.lo(f);return h>f==f>0?p===u?(d+=1,p=0):p+=1:p===0?(p=u,d-=1):p-=1,s.pack(p,d)}},8406(n,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,p=0;pd)for(var C=h[g],k=1/Math.sqrt(A*E),S=0;S<3;++S){var D=(S+1)%3,F=(S+2)%3;C[S]+=k*(y[D]*T[F]-y[F]*T[D])}}for(var p=0;pd)for(var k=1/Math.sqrt(P),S=0;S<3;++S)C[S]*=k;else for(var S=0;S<3;++S)C[S]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,p=0;pd?M=1/Math.sqrt(M):M=0;for(var g=0;g<3;++g)_[g]*=M;h[p]=_}return h}},4081(n){"use strict";n.exports=a;function a(o,s,l,u,c,f,h,d,p,v){var m=s+f+v;if(g>0){var g=Math.sqrt(m+1);o[0]=.5*(h-p)/g,o[1]=.5*(d-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var w=Math.max(s,f,v),g=Math.sqrt(2*w-m+1);s>=w?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(d+u)/g,o[3]=.5*(h-p)/g):f>=w?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(p+h)/g,o[3]=.5*(d-u)/g):(o[0]=.5*(u+d)/g,o[1]=.5*(h+p)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}},9977(n,a,o){"use strict";n.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(w,b,_){return Math.sqrt(Math.pow(w,2)+Math.pow(b,2)+Math.pow(_,2))}function d(w,b,_,M){return Math.sqrt(Math.pow(w,2)+Math.pow(b,2)+Math.pow(_,2)+Math.pow(M,2))}function p(w,b){var _=b[0],M=b[1],x=b[2],T=b[3],A=d(_,M,x,T);A>1e-6?(w[0]=_/A,w[1]=M/A,w[2]=x/A,w[3]=T/A):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,b,_){this.radius=s([_]),this.center=s(b),this.rotation=s(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 m=v.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var b=this.computedRotation;p(b,b);var _=this.computedMatrix;u(_,b);var M=this.computedCenter,x=this.computedEye,T=this.computedUp,A=Math.exp(this.computedRadius[0]);x[0]=M[0]+A*_[2],x[1]=M[1]+A*_[6],x[2]=M[2]+A*_[10],T[0]=_[1],T[1]=_[5],T[2]=_[9];for(var y=0;y<3;++y){for(var E=0,S=0;S<3;++S)E+=_[y+4*S]*x[S];_[12+y]=-E}},m.getMatrix=function(w,b){this.recalcMatrix(w);var _=this.computedMatrix;if(b){for(var M=0;M<16;++M)b[M]=_[M];return b}return _},m.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},m.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},m.pan=function(w,b,_,M){b=b||0,_=_||0,M=M||0,this.recalcMatrix(w);var x=this.computedMatrix,T=x[1],A=x[5],y=x[9],E=h(T,A,y);T/=E,A/=E,y/=E;var S=x[0],C=x[4],k=x[8],D=S*T+C*A+k*y;S-=T*D,C-=A*D,k-=y*D;var F=h(S,C,k);S/=F,C/=F,k/=F;var P=x[2],R=x[6],L=x[10],I=P*T+R*A+L*y,B=P*S+R*C+L*k;P-=I*T+B*S,R-=I*A+B*C,L-=I*y+B*k;var O=h(P,R,L);P/=O,R/=O,L/=O;var $=S*b+T*_,Y=C*b+A*_,K=k*b+y*_;this.center.move(w,$,Y,K);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+M),this.radius.set(w,Math.log(j))},m.rotate=function(w,b,_,M){this.recalcMatrix(w),b=b||0,_=_||0;var x=this.computedMatrix,T=x[0],A=x[4],y=x[8],E=x[1],S=x[5],C=x[9],k=x[2],D=x[6],F=x[10],P=b*T+_*E,R=b*A+_*S,L=b*y+_*C,I=-(D*L-F*R),B=-(F*P-k*L),O=-(k*R-D*P),$=Math.sqrt(Math.max(0,1-Math.pow(I,2)-Math.pow(B,2)-Math.pow(O,2))),Y=d(I,B,O,$);Y>1e-6?(I/=Y,B/=Y,O/=Y,$/=Y):(I=B=O=0,$=1);var K=this.computedRotation,j=K[0],q=K[1],J=K[2],U=K[3],V=j*$+U*I+q*O-J*B,X=q*$+U*B+J*I-j*O,H=J*$+U*O+j*B-q*I,G=U*$-j*I-q*B-J*O;if(M){I=k,B=D,O=F;var Q=Math.sin(M)/h(I,B,O);I*=Q,B*=Q,O*=Q,$=Math.cos(b),V=V*$+G*I+X*O-H*B,X=X*$+G*B+H*I-V*O,H=H*$+G*O+V*B-X*I,G=G*$-V*I-X*B-H*O}var te=d(V,X,H,G);te>1e-6?(V/=te,X/=te,H/=te,G/=te):(V=X=H=0,G=1),this.rotation.set(w,V,X,H,G)},m.lookAt=function(w,b,_,M){this.recalcMatrix(w),_=_||this.computedCenter,b=b||this.computedEye,M=M||this.computedUp;var x=this.computedMatrix;l(x,b,_,M);var T=this.computedRotation;f(T,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),p(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var A=0,y=0;y<3;++y)A+=Math.pow(_[y]-b[y],2);this.radius.set(w,.5*Math.log(Math.max(A,1e-6))),this.center.set(w,_[0],_[1],_[2])},m.translate=function(w,b,_,M){this.center.move(w,b||0,_||0,M||0)},m.setMatrix=function(w,b){var _=this.computedRotation;f(_,b[0],b[1],b[2],b[4],b[5],b[6],b[8],b[9],b[10]),p(_,_),this.rotation.set(w,_[0],_[1],_[2],_[3]);var M=this.computedMatrix;c(M,b);var x=M[15];if(Math.abs(x)>1e-6){var T=M[12]/x,A=M[13]/x,y=M[14]/x;this.recalcMatrix(w);var E=Math.exp(this.computedRadius[0]);this.center.set(w,T-M[2]*E,A-M[6]*E,y-M[10]*E),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},m.setDistance=function(w,b){b>0&&this.radius.set(w,Math.log(b))},m.setDistanceLimits=function(w,b){w>0?w=Math.log(w):w=-1/0,b>0?b=Math.log(b):b=1/0,b=Math.max(b,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=b},m.getDistanceLimits=function(w){var b=this.radius.bounds;return w?(w[0]=Math.exp(b[0][0]),w[1]=Math.exp(b[1][0]),w):[Math.exp(b[0][0]),Math.exp(b[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(w){var b=this.lastT(),_=w.center;_&&this.center.set(b,_[0],_[1],_[2]);var M=w.rotation;M&&this.rotation.set(b,M[0],M[1],M[2],M[3]);var x=w.distance;x&&x>0&&this.radius.set(b,Math.log(x)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function g(w){w=w||{};var b=w.center||[0,0,0],_=w.rotation||[0,0,0,1],M=w.radius||1;b=[].slice.call(b,0,3),_=[].slice.call(_,0,4),p(_,_);var x=new v(_,b,Math.log(M));return x.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&x.lookAt(0,w.eye,w.center,w.up),x}},1371(n,a,o){"use strict";var s=o(3233);n.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202(n){n.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(n,a,o){"use strict";n.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],p=0;p0){C=d[F][E][0],D=F;break}k=C[D^1];for(var P=0;P<2;++P)for(var R=d[P][E],L=0;L0&&(C=I,k=B,D=P)}return S||C&&g(C,D),k}function b(y,E){var S=d[E][y][0],C=[y];g(S,E);for(var k=S[E^1],D=E;;){for(;k!==y;)C.push(k),k=w(C[C.length-2],k,!1);if(d[0][y].length+d[1][y].length===0)break;var F=C[C.length-1],P=y,R=C[1],L=w(F,P,!0);if(s(c[F],c[P],c[R],c[L])<0)break;C.push(y),k=w(F,P)}return C}function _(y,E){return E[1]===E[E.length-1]}for(var p=0;p0;){var T=d[0][p].length,A=b(p,M);_(x,A)?x.push.apply(x,A):(x.length>0&&m.push(x),x=A)}x.length>0&&m.push(x)}return m}},5609(n,a,o){"use strict";n.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),p=[],v=0;v0;){var g=p.pop();h[g]=!1;for(var w=f[g],v=0;v0}T=T.filter(A);for(var y=T.length,E=new Array(y),S=new Array(y),x=0;x0;){var te=H.pop(),ce=Y[te];h(ce,function(oe,Ee){return oe-Ee});var ge=ce.length,Ce=G[te],be;if(Ce===0){var R=T[te];be=[R]}for(var x=0;x=0)&&(G[he]=Ce^1,H.push(he),Ce===0)){var R=T[he];X(R)||(R.reverse(),be.push(R))}}Ce===0&&Q.push(be)}return Q}},5085(n,a,o){n.exports=w;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(b){return function(_,M){var x=b[_];return x?!!x.queryPoint(M,f):!1}}function d(b){for(var _={},M=0;M0&&_[x]===M[0])T=b[x-1];else return 1;for(var A=1;T;){var y=T.key,E=s(M,y[0],y[1]);if(y[0][0]0)A=-1,T=T.right;else return 0;else if(E>0)T=T.left;else if(E<0)A=1,T=T.right;else return 0}return A}}function v(b){return 1}function m(b){return function(M){return b(M[0],M[1])?0:1}}function g(b,_){return function(x){return b(x[0],x[1])?0:_(x)}}function w(b){for(var _=b.length,M=[],x=[],T=0,A=0;A<_;++A)for(var y=b[A],E=y.length,S=E-1,C=0;C=v?(y=1,S=v+2*w+_):(y=-w/v,S=w*y+_)):(y=0,b>=0?(E=0,S=_):-b>=g?(E=1,S=g+2*b+_):(E=-b/g,S=b*E+_));else if(E<0)E=0,w>=0?(y=0,S=_):-w>=v?(y=1,S=v+2*w+_):(y=-w/v,S=w*y+_);else{var C=1/A;y*=C,E*=C,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_}else{var k,D,F,P;y<0?(k=m+w,D=g+b,D>k?(F=D-k,P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+_):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)):(y=0,D<=0?(E=1,S=g+2*b+_):b>=0?(E=0,S=_):(E=-b/g,S=b*E+_))):E<0?(k=m+b,D=v+w,D>k?(F=D-k,P=v-2*m+g,F>=P?(E=1,y=0,S=g+2*b+_):(E=F/P,y=1-E,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)):(E=0,D<=0?(y=1,S=v+2*w+_):w>=0?(y=0,S=_):(y=-w/v,S=w*y+_))):(F=g+b-m-w,F<=0?(y=0,E=1,S=g+2*b+_):(P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+_):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)))}for(var R=1-y-E,p=0;p0){var g=f[d-1];if(s(v,g)===0&&u(g)!==m){d-=1;continue}}f[d++]=v}}return f.length=d,f}},3233(n){"use strict";var a="",o;n.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,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025(n,a,o){n.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(n){"use strict";n.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,p=h-d;p&&(o[--u]=l,l=p)}for(var v=0,c=u;c0){if(D<=0)return F;P=k+D}else if(k<0){if(D>=0)return F;P=-(k+D)}else return F;var R=d*P;return F>=R||F<=-R?F:b(E,S,C)},function(E,S,C,k){var D=E[0]-k[0],F=S[0]-k[0],P=C[0]-k[0],R=E[1]-k[1],L=S[1]-k[1],I=C[1]-k[1],B=E[2]-k[2],O=S[2]-k[2],$=C[2]-k[2],Y=F*I,K=P*L,j=P*R,q=D*I,J=D*L,U=F*R,V=B*(Y-K)+O*(j-q)+$*(J-U),X=(Math.abs(Y)+Math.abs(K))*Math.abs(B)+(Math.abs(j)+Math.abs(q))*Math.abs(O)+(Math.abs(J)+Math.abs(U))*Math.abs($),H=p*X;return V>H||-V>H?V:_(E,S,C,k)}];function x(y){var E=M[y.length];return E||(E=M[y.length]=w(y.length)),E.apply(void 0,y)}function T(y,E,S,C,k,D,F){return function(R,L,I,B,O){switch(arguments.length){case 0:case 1:return 0;case 2:return C(R,L);case 3:return k(R,L,I);case 4:return D(R,L,I,B);case 5:return F(R,L,I,B,O)}for(var $=new Array(arguments.length),Y=0;Y0&&v>0||p<0&&v<0)return!1;var m=s(h,c,f),g=s(d,c,f);return m>0&&g>0||m<0&&g<0?!1:p===0&&v===0&&m===0&&g===0?l(c,f,h,d):!0}},8545(n){"use strict";n.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,p=d+h;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,p=0,v=0,m=Math.abs,g=s[p],w=m(g),b=-l[v],_=m(b),M,x;w<_?(x=g,p+=1,p=c?(M=g,p+=1,p=c?(M=g,p+=1,p>1,b=f[2*w+1];if(b===v)return w;v>1,b=f[2*w+1];if(b===v)return w;v>1,b=f[2*w+1];if(b===v)return w;v>1,b=f[2*w+1];if(b===v)return w;v>1,P=d(E[F],S);P<=0?(P===0&&(D=F),C=F+1):P>0&&(k=F-1)}return D}s=g;function w(E,S){for(var C=new Array(E.length),k=0,D=C.length;k=E.length||d(E[Y],F)!==0););}return C}s=w;function b(E,S){if(!S)return w(m(M(E,0)),E,0);for(var C=new Array(S),k=0;k>>I&1&&L.push(D[I]);S.push(L)}return v(S)}s=_;function M(E,S){if(S<0)return[];for(var C=[],k=(1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.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},a.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},a.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}a.countTrailingZeros=s,a.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},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.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,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.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},a.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},a.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},a.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},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014(n,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(y){for(var E=0,S=Math.max,C=0,k=y.length;C>1,F=h(y[D],E);F<=0?(F===0&&(k=D),S=D+1):F>0&&(C=D-1)}return k}a.findCell=m;function g(y,E){for(var S=new Array(y.length),C=0,k=S.length;C=y.length||h(y[$],D)!==0););}return S}a.incidence=g;function w(y,E){if(!E)return g(v(_(y,0)),y,0);for(var S=new Array(E),C=0;C>>L&1&&R.push(k[L]);E.push(R)}return p(E)}a.explode=b;function _(y,E){if(E<0)return[];for(var S=[],C=(1<>1:(q>>1)-1}function C(q){for(var J=E(q);;){var U=J,V=2*q+1,X=2*(q+1),H=q;if(V0;){var U=S(q);if(U>=0){var V=E(U);if(J0){var q=R[0];return y(0,B-1),B-=1,C(0),q}return-1}function F(q,J){var U=R[q];return w[U]===J?q:(w[U]=-1/0,k(q),D(),w[U]=J,B+=1,k(B-1))}function P(q){if(!b[q]){b[q]=!0;var J=m[q],U=g[q];m[U]>=0&&(m[U]=J),g[J]>=0&&(g[J]=U),L[J]>=0&&F(L[J],A(J)),L[U]>=0&&F(L[U],A(U))}}for(var R=[],L=new Array(p),_=0;_>1;_>=0;--_)C(_);for(;;){var O=D();if(O<0||w[O]>d)break;P(O)}for(var $=[],_=0;_=0&&U>=0&&J!==U){var V=L[J],X=L[U];V!==X&&j.push([V,X])}}),l.unique(l.normalize(j)),{positions:$,edges:j}}},1303(n,a,o){"use strict";n.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var p=Math.min(c[0][1],c[1][1]),v=Math.max(c[0][1],c[1][1]),m=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return vg?p-g:v-g}var w,b;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var p,v;if(c[0][0]c[1][0])p=c[1],v=c[0];else return-l(c,f);var m=s(h,d,v),g=s(h,d,p);if(m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;if(m=s(v,p,d),g=s(v,p,h),m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;return d[0]-v[0]}},4209(n,a,o){"use strict";n.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(w,b,_){this.slabs=w,this.coordinates=b,this.horizontal=_}var h=f.prototype;function d(w,b){return w.y-b}function p(w,b){for(var _=null;w;){var M=w.key,x,T;M[0][0]0)if(b[0]!==M[1][0])_=w,w=w.right;else{var y=p(w.right,b);if(y)return y;w=w.left}else{if(b[0]!==M[1][0])return w;var y=p(w.right,b);if(y)return y;w=w.left}}return _}h.castUp=function(w){var b=s.le(this.coordinates,w[0]);if(b<0)return-1;var _=this.slabs[b],M=p(this.slabs[b],w),x=-1;if(M&&(x=M.value),this.coordinates[b]===w[0]){var T=null;if(M&&(T=M.key),b>0){var A=p(this.slabs[b-1],w);A&&(T?c(A.key,T)>0&&(T=A.key,x=A.value):(x=A.value,T=A.key))}var y=this.horizontal[b];if(y.length>0){var E=s.ge(y,w[1],d);if(E=y.length)return x;S=y[E]}}if(S.start)if(T){var C=u(T[0],T[1],[w[0],S.y]);T[0][0]>T[1][0]&&(C=-C),C>0&&(x=S.index)}else x=S.index;else S.y!==w[1]&&(x=S.index)}}}return x};function v(w,b,_,M){this.y=w,this.index=b,this.start=_,this.closed=M}function m(w,b,_,M){this.x=w,this.segment=b,this.create=_,this.index=M}function g(w){for(var b=w.length,_=2*b,M=new Array(_),x=0;x1&&(b=1);for(var _=1-b,M=p.length,x=new Array(M),T=0;T0||w>0&&x<0){var T=c(b,x,_,w);m.push(T),g.push(T.slice())}x<0?g.push(_.slice()):x>0?m.push(_.slice()):(m.push(_.slice()),g.push(_.slice())),w=x}return{positive:m,negative:g}}function h(p,v){for(var m=[],g=u(p[p.length-1],v),w=p[p.length-1],b=p[0],_=0;_0||g>0&&M<0)&&m.push(c(w,M,b,g)),M>=0&&m.push(b.slice()),g=M}return m}function d(p,v){for(var m=[],g=u(p[p.length-1],v),w=p[p.length-1],b=p[0],_=0;_0||g>0&&M<0)&&m.push(c(w,M,b,g)),M<=0&&m.push(b.slice()),g=M}return m}},3387(n,a,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(d(p),arguments)}function c(p,v){return u.apply(null,[p].concat(v||[]))}function f(p,v){var m=1,g=p.length,w,b="",_,M,x,T,A,y,E,S;for(_=0;_=0),x.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,x.width?parseInt(x.width):0);break;case"e":w=x.precision?parseFloat(w).toExponential(x.precision):parseFloat(w).toExponential();break;case"f":w=x.precision?parseFloat(w).toFixed(x.precision):parseFloat(w);break;case"g":w=x.precision?String(Number(w.toPrecision(x.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=x.precision?w.substring(0,x.precision):w;break;case"t":w=String(!!w),w=x.precision?w.substring(0,x.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=x.precision?w.substring(0,x.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=x.precision?w.substring(0,x.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?b+=w:(l.number.test(x.type)&&(!E||x.sign)?(S=E?"+":"-",w=w.toString().replace(l.sign,"")):S="",A=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",y=x.width-(S+w).length,T=x.width&&y>0?A.repeat(y):"",b+=x.align?S+w+T:A==="0"?S+T+w:T+S+w)}return b}var h=Object.create(null);function d(p){if(h[p])return h[p];for(var v=p,m,g=[],w=0;v;){if((m=l.text.exec(v))!==null)g.push(m[0]);else if((m=l.modulo.exec(v))!==null)g.push("%");else if((m=l.placeholder.exec(v))!==null){if(m[2]){w|=1;var b=[],_=m[2],M=[];if((M=l.key.exec(_))!==null)for(b.push(M[1]);(_=_.substring(M[0].length))!=="";)if((M=l.key_access.exec(_))!==null)b.push(M[1]);else if((M=l.index_access.exec(_))!==null)b.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");m[2]=b}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.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 h[p]=g}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(a,o,a,n),s!==void 0&&(n.exports=s))})()},3711(n,a,o){"use strict";n.exports=d;var s=o(2640),l=o(781),u={"2d":function(p,v,m){var g=p({order:v,scalarArguments:3,getters:m==="generic"?[0]:void 0,phase:function(b,_,M,x){return b>x|0},vertex:function(b,_,M,x,T,A,y,E,S,C,k,D,F){var P=(y<<0)+(E<<1)+(S<<2)+(C<<3)|0;if(!(P===0||P===15))switch(P){case 0:k.push([b-.5,_-.5]);break;case 1:k.push([b-.25-.25*(x+M-2*F)/(M-x),_-.25-.25*(T+M-2*F)/(M-T)]);break;case 2:k.push([b-.75-.25*(-x-M+2*F)/(x-M),_-.25-.25*(A+x-2*F)/(x-A)]);break;case 3:k.push([b-.5,_-.5-.5*(T+M+A+x-4*F)/(M-T+x-A)]);break;case 4:k.push([b-.25-.25*(A+T-2*F)/(T-A),_-.75-.25*(-T-M+2*F)/(T-M)]);break;case 5:k.push([b-.5-.5*(x+M+A+T-4*F)/(M-x+T-A),_-.5]);break;case 6:k.push([b-.5-.25*(-x-M+A+T)/(x-M+T-A),_-.5-.25*(-T-M+A+x)/(T-M+x-A)]);break;case 7:k.push([b-.75-.25*(A+T-2*F)/(T-A),_-.75-.25*(A+x-2*F)/(x-A)]);break;case 8:k.push([b-.75-.25*(-A-T+2*F)/(A-T),_-.75-.25*(-A-x+2*F)/(A-x)]);break;case 9:k.push([b-.5-.25*(x+M+-A-T)/(M-x+A-T),_-.5-.25*(T+M+-A-x)/(M-T+A-x)]);break;case 10:k.push([b-.5-.5*(-x-M+-A-T+4*F)/(x-M+A-T),_-.5]);break;case 11:k.push([b-.25-.25*(-A-T+2*F)/(A-T),_-.75-.25*(T+M-2*F)/(M-T)]);break;case 12:k.push([b-.5,_-.5-.5*(-T-M+-A-x+4*F)/(T-M+A-x)]);break;case 13:k.push([b-.75-.25*(x+M-2*F)/(M-x),_-.25-.25*(-A-x+2*F)/(A-x)]);break;case 14:k.push([b-.25-.25*(-x-M+2*F)/(x-M),_-.25-.25*(-T-M+2*F)/(T-M)]);break;case 15:k.push([b-.5,_-.5]);break}},cell:function(b,_,M,x,T,A,y,E,S){T?E.push([b,_]):E.push([_,b])}});return function(w,b){var _=[],M=[];return g(w,_,M,b),{positions:_,cells:M}}}};function c(p,v){var m=p.length+"d",g=u[m];if(g)return g(s,p,v)}function f(p,v){for(var m=l(p,v),g=m.length,w=new Array(g),b=new Array(g),_=0;_Math.max(x,T)?A[2]=1:x>Math.max(M,T)?A[0]=1:A[1]=1;for(var y=0,E=0,S=0;S<3;++S)y+=_[S]*_[S],E+=A[S]*_[S];for(var S=0;S<3;++S)A[S]-=E/y*_[S];return f(A,A),A}function m(_,M,x,T,A,y,E,S){this.center=s(x),this.up=s(T),this.right=s(A),this.radius=s([y]),this.angle=s([E,S]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(_,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var C=0;C<16;++C)this.computedMatrix[C]=.5;this.recalcMatrix(0)}var g=m.prototype;g.setDistanceLimits=function(_,M){_>0?_=Math.log(_):_=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=M},g.getDistanceLimits=function(_){var M=this.radius.bounds[0];return _?(_[0]=Math.exp(M[0][0]),_[1]=Math.exp(M[1][0]),_):[Math.exp(M[0][0]),Math.exp(M[1][0])]},g.recalcMatrix=function(_){this.center.curve(_),this.up.curve(_),this.right.curve(_),this.radius.curve(_),this.angle.curve(_);for(var M=this.computedUp,x=this.computedRight,T=0,A=0,y=0;y<3;++y)A+=M[y]*x[y],T+=M[y]*M[y];for(var E=Math.sqrt(T),S=0,y=0;y<3;++y)x[y]-=M[y]*A/T,S+=x[y]*x[y],M[y]/=E;for(var C=Math.sqrt(S),y=0;y<3;++y)x[y]/=C;var k=this.computedToward;c(k,M,x),f(k,k);for(var D=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],P=this.computedAngle[1],R=Math.cos(F),L=Math.sin(F),I=Math.cos(P),B=Math.sin(P),O=this.computedCenter,$=R*I,Y=L*I,K=B,j=-R*B,q=-L*B,J=I,U=this.computedEye,V=this.computedMatrix,y=0;y<3;++y){var X=$*x[y]+Y*k[y]+K*M[y];V[4*y+1]=j*x[y]+q*k[y]+J*M[y],V[4*y+2]=X,V[4*y+3]=0}var H=V[1],G=V[5],Q=V[9],te=V[2],ce=V[6],ge=V[10],Ce=G*ge-Q*ce,be=Q*te-H*ge,he=H*ce-G*te,oe=d(Ce,be,he);Ce/=oe,be/=oe,he/=oe,V[0]=Ce,V[4]=be,V[8]=he;for(var y=0;y<3;++y)U[y]=O[y]+V[2+4*y]*D;for(var y=0;y<3;++y){for(var S=0,Ee=0;Ee<3;++Ee)S+=V[y+4*Ee]*U[Ee];V[12+y]=-S}V[15]=1},g.getMatrix=function(_,M){this.recalcMatrix(_);var x=this.computedMatrix;if(M){for(var T=0;T<16;++T)M[T]=x[T];return M}return x};var w=[0,0,0];g.rotate=function(_,M,x,T){if(this.angle.move(_,M,x),T){this.recalcMatrix(_);var A=this.computedMatrix;w[0]=A[2],w[1]=A[6],w[2]=A[10];for(var y=this.computedUp,E=this.computedRight,S=this.computedToward,C=0;C<3;++C)A[4*C]=y[C],A[4*C+1]=E[C],A[4*C+2]=S[C];u(A,A,T,w);for(var C=0;C<3;++C)y[C]=A[4*C],E[C]=A[4*C+1];this.up.set(_,y[0],y[1],y[2]),this.right.set(_,E[0],E[1],E[2])}},g.pan=function(_,M,x,T){M=M||0,x=x||0,T=T||0,this.recalcMatrix(_);var A=this.computedMatrix,y=Math.exp(this.computedRadius[0]),E=A[1],S=A[5],C=A[9],k=d(E,S,C);E/=k,S/=k,C/=k;var D=A[0],F=A[4],P=A[8],R=D*E+F*S+P*C;D-=E*R,F-=S*R,P-=C*R;var L=d(D,F,P);D/=L,F/=L,P/=L;var I=D*M+E*x,B=F*M+S*x,O=P*M+C*x;this.center.move(_,I,B,O);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+T),this.radius.set(_,Math.log($))},g.translate=function(_,M,x,T){this.center.move(_,M||0,x||0,T||0)},g.setMatrix=function(_,M,x,T){var A=1;typeof x=="number"&&(A=x|0),(A<0||A>3)&&(A=1);var y=(A+2)%3,E=(A+1)%3;M||(this.recalcMatrix(_),M=this.computedMatrix);var S=M[A],C=M[A+4],k=M[A+8];if(T){var F=Math.abs(S),P=Math.abs(C),R=Math.abs(k),L=Math.max(F,P,R);F===L?(S=S<0?-1:1,C=k=0):R===L?(k=k<0?-1:1,S=C=0):(C=C<0?-1:1,S=k=0)}else{var D=d(S,C,k);S/=D,C/=D,k/=D}var I=M[y],B=M[y+4],O=M[y+8],$=I*S+B*C+O*k;I-=S*$,B-=C*$,O-=k*$;var Y=d(I,B,O);I/=Y,B/=Y,O/=Y;var K=C*O-k*B,j=k*I-S*O,q=S*B-C*I,J=d(K,j,q);K/=J,j/=J,q/=J,this.center.jump(_,xe,re,pe),this.radius.idle(_),this.up.jump(_,S,C,k),this.right.jump(_,I,B,O);var U,V;if(A===2){var X=M[1],H=M[5],G=M[9],Q=X*I+H*B+G*O,te=X*K+H*j+G*q;be<0?U=-Math.PI/2:U=Math.PI/2,V=Math.atan2(te,Q)}else{var ce=M[2],ge=M[6],Ce=M[10],be=ce*S+ge*C+Ce*k,he=ce*I+ge*B+Ce*O,oe=ce*K+ge*j+Ce*q;U=Math.asin(p(be)),V=Math.atan2(oe,he)}this.angle.jump(_,V,U),this.recalcMatrix(_);var Ee=M[2],ye=M[6],ue=M[10],ee=this.computedMatrix;l(ee,M);var ae=ee[15],xe=ee[12]/ae,re=ee[13]/ae,pe=ee[14]/ae,we=Math.exp(this.computedRadius[0]);this.center.jump(_,xe-Ee*we,re-ye*we,pe-ue*we)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(_){this.center.idle(_),this.up.idle(_),this.right.idle(_),this.radius.idle(_),this.angle.idle(_)},g.flush=function(_){this.center.flush(_),this.up.flush(_),this.right.flush(_),this.radius.flush(_),this.angle.flush(_)},g.setDistance=function(_,M){M>0&&this.radius.set(_,Math.log(M))},g.lookAt=function(_,M,x,T){this.recalcMatrix(_),M=M||this.computedEye,x=x||this.computedCenter,T=T||this.computedUp;var A=T[0],y=T[1],E=T[2],S=d(A,y,E);if(!(S<1e-6)){A/=S,y/=S,E/=S;var C=M[0]-x[0],k=M[1]-x[1],D=M[2]-x[2],F=d(C,k,D);if(!(F<1e-6)){C/=F,k/=F,D/=F;var P=this.computedRight,R=P[0],L=P[1],I=P[2],B=A*R+y*L+E*I;R-=B*A,L-=B*y,I-=B*E;var O=d(R,L,I);if(!(O<.01&&(R=y*D-E*k,L=E*C-A*D,I=A*k-y*C,O=d(R,L,I),O<1e-6))){R/=O,L/=O,I/=O,this.up.set(_,A,y,E),this.right.set(_,R,L,I),this.center.set(_,x[0],x[1],x[2]),this.radius.set(_,Math.log(F));var $=y*I-E*L,Y=E*R-A*I,K=A*L-y*R,j=d($,Y,K);$/=j,Y/=j,K/=j;var q=A*C+y*k+E*D,J=R*C+L*k+I*D,U=$*C+Y*k+K*D,V=Math.asin(p(q)),X=Math.atan2(U,J),H=this.angle._state,G=H[H.length-1],Q=H[H.length-2];G=G%(2*Math.PI);var te=Math.abs(G+2*Math.PI-X),ce=Math.abs(G-X),ge=Math.abs(G-2*Math.PI-X);te0?I.pop():new ArrayBuffer(R)}a.mallocArrayBuffer=w;function b(P){return new Uint8Array(w(P),0,P)}a.mallocUint8=b;function _(P){return new Uint16Array(w(2*P),0,P)}a.mallocUint16=_;function M(P){return new Uint32Array(w(4*P),0,P)}a.mallocUint32=M;function x(P){return new Int8Array(w(P),0,P)}a.mallocInt8=x;function T(P){return new Int16Array(w(2*P),0,P)}a.mallocInt16=T;function A(P){return new Int32Array(w(4*P),0,P)}a.mallocInt32=A;function y(P){return new Float32Array(w(4*P),0,P)}a.mallocFloat32=a.mallocFloat=y;function E(P){return new Float64Array(w(8*P),0,P)}a.mallocFloat64=a.mallocDouble=E;function S(P){return c?new Uint8ClampedArray(w(P),0,P):b(P)}a.mallocUint8Clamped=S;function C(P){return f?new BigUint64Array(w(8*P),0,P):null}a.mallocBigUint64=C;function k(P){return h?new BigInt64Array(w(8*P),0,P):null}a.mallocBigInt64=k;function D(P){return new DataView(w(P),0,P)}a.mallocDataView=D;function F(P){P=s.nextPow2(P);var R=s.log2(P),L=v[R];return L.length>0?L.pop():new u(P)}a.mallocBuffer=F,a.clearCache=function(){for(var R=0;R<32;++R)d.UINT8[R].length=0,d.UINT16[R].length=0,d.UINT32[R].length=0,d.INT8[R].length=0,d.INT16[R].length=0,d.INT32[R].length=0,d.FLOAT[R].length=0,d.DOUBLE[R].length=0,d.BIGUINT64[R].length=0,d.BIGINT64[R].length=0,d.UINT8C[R].length=0,p[R].length=0,v[R].length=0}},1755(n){"use strict";"use restrict";n.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",I="",B=L.length,O=I.length,$=F[0]===w||F[0]===M,Y=0,K=-O;Y>-1&&(Y=P.indexOf(L,Y),!(Y===-1||(K=P.indexOf(I,Y+B),K===-1)||K<=Y));){for(var j=Y;j=K)R[j]=null,P=P.substr(0,j)+" "+P.substr(j+1);else if(R[j]!==null){var q=R[j].indexOf(F[0]);q===-1?R[j]+=F:$&&(R[j]=R[j].substr(0,q+1)+(1+parseInt(R[j][q+1]))+R[j].substr(q+2))}var J=Y+B,U=P.substr(J,K-J),V=U.indexOf(L);V!==-1?Y=V:Y=K+O}return R}function A(D,F,P){for(var R=F.textAlign||"start",L=F.textBaseline||"alphabetic",I=[1<<30,1<<30],B=[0,0],O=D.length,$=0;$/g,` `):P=P.replace(/\/g," ");var B="",O=[];for(G=0;G-1?parseInt(re[1+Fe]):0,_e=Se>-1?parseInt(pe[1+Se]):0;ke!==_e&&(we=we.replace(he(),"?px "),ce*=Math.pow(.75,_e-ke),we=we.replace("?px ",he())),te+=.25*q*(_e-ke)}if(I.superscripts===!0){var Ie=re.indexOf(w),Oe=pe.indexOf(w),Qe=Ie>-1?parseInt(re[1+Ie]):0,et=Oe>-1?parseInt(pe[1+Oe]):0;Qe!==et&&(we=we.replace(he(),"?px "),ce*=Math.pow(.75,et-Qe),we=we.replace("?px ",he())),te-=.25*q*(et-Qe)}if(I.bolds===!0){var _t=re.indexOf(p)>-1,ut=pe.indexOf(p)>-1;!_t&&ut&&(vt?we=we.replace("italic ","italic bold "):we="bold "+we),_t&&!ut&&(we=we.replace("bold ",""))}if(I.italics===!0){var vt=re.indexOf(m)>-1,Xe=pe.indexOf(m)>-1;!vt&&Xe&&(we="italic "+we),vt&&!Xe&&(we=we.replace("italic ",""))}F.font=we}for(H=0;H0&&(L=R.size),R.lineSpacing&&R.lineSpacing>0&&(I=R.lineSpacing),R.styletags&&R.styletags.breaklines&&(B.breaklines=!!R.styletags.breaklines),R.styletags&&R.styletags.bolds&&(B.bolds=!!R.styletags.bolds),R.styletags&&R.styletags.italics&&(B.italics=!!R.styletags.italics),R.styletags&&R.styletags.subscripts&&(B.subscripts=!!R.styletags.subscripts),R.styletags&&R.styletags.superscripts&&(B.superscripts=!!R.styletags.superscripts)),P.font=[R.fontStyle,R.fontVariant,R.fontWeight,L+"px",R.font].filter(function($){return $}).join(" "),P.textAlign="start",P.textBaseline="alphabetic",P.direction="ltr";var O=y(F,P,D,L,I,B);return C(O,R,L)}},1538(n){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(S){S.permitHostObjects___&&S.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{n.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,p=Object.isExtensible,v="weakmap:",m=v+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),w=new Uint8Array(g);crypto.getRandomValues(w),m=v+"rand:"+Array.prototype.map.call(w,function(S){return(S%36).toString(36)}).join("")+"___"}function b(S){return!(S.substr(0,v.length)==v&&S.substr(S.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(C){return h(C).filter(b)}}),"getPropertyNames"in Object){var _=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(C){return _(C).filter(b)}})}function M(S){if(S!==Object(S))throw new TypeError("Not an object: "+S);var C=S[m];if(C&&C.key===S)return C;if(p(S)){C={key:S};try{return d(S,m,{value:C,writable:!1,enumerable:!1,configurable:!1}),C}catch(k){return}}}(function(){var S=Object.freeze;d(Object,"freeze",{value:function(F){return M(F),S(F)}});var C=Object.seal;d(Object,"seal",{value:function(F){return M(F),C(F)}});var k=Object.preventExtensions;d(Object,"preventExtensions",{value:function(F){return M(F),k(F)}})})();function x(S){return S.prototype=null,Object.freeze(S)}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 y=0,E=function(){this instanceof E||A();var S=[],C=[],k=y++;function D(L,I){var B,O=M(L);return O?k in O?O[k]:I:(B=S.indexOf(L),B>=0?C[B]:I)}function F(L){var I=M(L);return I?k in I:S.indexOf(L)>=0}function P(L,I){var B,O=M(L);return O?O[k]=I:(B=S.indexOf(L),B>=0?C[B]=I:(B=S.length,C[B]=I,S[B]=L)),this}function R(L){var I=M(L),B,O;return I?k in I&&delete I[k]:(B=S.indexOf(L),B<0?!1:(O=S.length-1,S[B]=void 0,C[B]=C[O],S[B]=S[O],S.length=O,C.length=O,!0))}return Object.create(E.prototype,{get___:{value:x(D)},has___:{value:x(F)},set___:{value:x(P)},delete___:{value:x(R)}})};E.prototype=Object.create(Object.prototype,{get:{value:function(C,k){return this.get___(C,k)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,k){return this.set___(C,k)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function S(){this instanceof E||A();var C=new l,k=void 0,D=!1;function F(I,B){return k?C.has(I)?C.get(I):k.get___(I,B):C.get(I,B)}function P(I){return C.has(I)||(k?k.has___(I):!1)}var R;s?R=function(I,B){return C.set(I,B),C.has(I)||(k||(k=new E),k.set(I,B)),this}:R=function(I,B){if(D)try{C.set(I,B)}catch(O){k||(k=new E),k.set___(I,B)}else C.set(I,B);return this};function L(I){var B=!!C.delete(I);return k&&k.delete___(I)||B}return Object.create(E.prototype,{get___:{value:x(F)},has___:{value:x(P)},set___:{value:x(R)},delete___:{value:x(L)},permitHostObjects___:{value:x(function(I){if(I===o)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}S.prototype=E.prototype,n.exports=S,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),n.exports=E)})()},236(n,a,o){var s=o(8284);n.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(n){n.exports=a;function a(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(n,a,o){var s=o(236);n.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.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(n){"use strict";function a(){return function(f,h,d,p,v,m){var g=f[0],w=d[0],b=[0],_=w;p|=0;var M=0,x=w;for(M=0;M=0!=A>=0&&v.push(b[0]+.5+.5*(T+A)/(T-A))}p+=x,++b[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(p,v,m){var g=p.dtype,w=p.order,b=[g,w.join()].join(),_=h[b];return _||(h[b]=_=f([g,w])),_(p.shape.slice(0),p.data,p.stride,p.offset|0,v,m)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}n.exports=c({funcName:"zeroCrossings"})},781(n,a,o){"use strict";n.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(n){let a=t[n];if(a!==void 0)return a.exports;let o=t[n]={id:n,loaded:!1,exports:{}};return e[n].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(n){if(typeof window=="object")return window}})(),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);let i=r(3065);dqe.exports=i})()});var om=W((fHr,pqe)=>{"use strict";var{normalize:oKt}=ni();function sKt(e){return e?oKt(e):[0,0,0,1]}pqe.exports=sKt});var sm=W((hHr,_qe)=>{"use strict";var yqe=sn(),mI=Jo(),M4=ni(),lKt=Vl().defaultLine,vqe=yc().isArrayOrTypedArray,NK=M4.normalize(lKt),xqe=1;function gqe(e,t){return[e[0],e[1],e[2],e[3]*t]}function OK(e){return yqe(e)||!M4.isChannelArray(e)&&!M4.isValid(e)?NK:M4.normalize(e)}function mqe(e){return yqe(e)?e:xqe}function uKt(e,t,r){var i=e.color;i&&i._inputArray&&(i=i._inputArray);var n=vqe(i),a=vqe(t),o=mI.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=mI.makeColorScaleFuncFromTrace(e):l=OK,n?u=(p,v)=>p[v]===void 0?NK:o.colorscale===void 0?l(p[v]):M4.normalize(l(p[v])):u=OK,a?c=function(p,v){return p[v]===void 0?xqe:mqe(p[v])}:c=mqe,n||a)for(var d=0;d{"use strict";bqe.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 yI=W((pHr,wqe)=>{"use strict";wqe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var Aqe=W((vHr,Tqe)=>{"use strict";var fKt=yi();function VK(e,t,r,i){if(!t||!t.visible)return null;for(var n=fKt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function hKt(e){for(var t=0;t{"use strict";var pKt=nc().gl_line3d,Mqe=nc().gl_scatter3d,vKt=nc().gl_error3d,gKt=nc().gl_mesh3d,mKt=nc().delaunay_triangulate,lm=it(),Dqe=om(),xI=sm().formatColor,yKt=fA(),GK=UK(),xKt=yI(),_Kt=ji(),bKt=Kf().appendArrayPointValue,wKt=Aqe();function Fqe(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 jK=Fqe.prototype;jK.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&&(lm.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 TKt(e,t,r){var i=(r+1)%3,n=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function Eqe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function MKt(e){var t=0,r=0,i=[t,r];if(Array.isArray(e))for(var n=0;n=0){var u=TKt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=gKt(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)};jK.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 CKt(e,t){var r=new Fqe(e,t.uid);return r.update(t),r}Lqe.exports=CKt});var ZK=W((mHr,Bqe)=>{"use strict";var um=Ns(),DKt=Ho(),XK=Eo(),$K=_s().axisHoverFormat,{hovertemplateAttrs:FKt,texttemplateAttrs:LKt,templatefallbackAttrs:Iqe}=Ga(),Rqe=Wa(),PKt=UK(),IKt=yI(),cv=tn().extendFlat,RKt=ls().overrideAll,zqe=(qx(),Go(Bx)).default,zKt=um.line,_b=um.marker,BKt=_b.line,qKt=cv({width:zKt.width,dash:{valType:"enumerated",values:zqe(PKt),dflt:"solid"}},XK("line"));function WK(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 YK=Bqe.exports=RKt({x:um.x,y:um.y,z:{valType:"data_array"},text:cv({},um.text,{}),texttemplate:LKt(),texttemplatefallback:Iqe({editType:"calc"}),hovertext:cv({},um.hovertext,{}),hovertemplate:FKt(),hovertemplatefallback:Iqe(),xhoverformat:$K("x"),yhoverformat:$K("y"),zhoverformat:$K("z"),mode:cv({},um.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:WK("x"),y:WK("y"),z:WK("z")},connectgaps:um.connectgaps,line:qKt,marker:cv({symbol:{valType:"enumerated",values:zqe(IKt),dflt:"circle",arrayOk:!0},size:cv({},_b.size,{dflt:8}),sizeref:_b.sizeref,sizemin:_b.sizemin,sizemode:_b.sizemode,opacity:cv({},_b.opacity,{arrayOk:!1}),colorbar:_b.colorbar,line:cv({width:cv({},BKt.width,{arrayOk:!1})},XK("marker.line"))},XK("marker")),textposition:cv({},um.textposition,{dflt:"top center"}),textfont:DKt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:Rqe.opacity,hoverinfo:cv({},Rqe.hoverinfo)},"calc","nested");YK.x.editType=YK.y.editType=YK.z.editType="calc+clearAxisTypes"});var Nqe=W((yHr,Oqe)=>{"use strict";var qqe=yi(),OKt=it(),KK=$o(),NKt=bd(),UKt=jp(),VKt=$p(),GKt=ZK();Oqe.exports=function(t,r,i,n){function a(d,p){return OKt.coerce(t,r,GKt,d,p)}var o=HKt(t,r,a,n);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),KK.hasMarkers(r)&&NKt(t,r,i,n,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),KK.hasLines(r)&&(a("connectgaps"),UKt(t,r,i,n,a)),KK.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),VKt(t,r,n,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=qqe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||i,{axis:"z"}),h(t,r,s||l||i,{axis:"y",inherit:"z"}),h(t,r,s||l||i,{axis:"x",inherit:"z"})};function HKt(e,t,r,i){var n=0,a=r("x"),o=r("y"),s=r("z"),l=qqe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],i),a&&o&&s&&(n=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=n),n}});var Vqe=W((xHr,Uqe)=>{"use strict";var jKt=x1(),$Kt=wd();Uqe.exports=function(t,r){var i=[{x:!1,y:!1,trace:r,t:{}}];return jKt(i,r),$Kt(t,r),i}});var Hqe=W((_Hr,Gqe)=>{Gqe.exports=WKt;function WKt(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 i=t,n;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var YKt=Hqe();jqe.exports=function(t){return YKt("webgl",t)}});var JK=W((wHr,Yqe)=>{"use strict";var Wqe=ni(),XKt=function(){};Yqe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=XKt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var i=document.createElement("div");i.className="no-webgl",i.style.cursor="pointer",i.style.fontSize="24px",i.style.color=Wqe.defaults[0],i.style.position="absolute",i.style.left=i.style.top="0px",i.style.width=i.style.height="100%",i.style["background-color"]=Wqe.lightLine,i.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",i.appendChild(n),t.container.appendChild(i),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var Kqe=W((THr,Zqe)=>{"use strict";var bb=om(),ZKt=it(),KKt=["xaxis","yaxis","zaxis"];function Xqe(){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 JKt=Xqe.prototype;JKt.merge=function(e,t){for(var r=this,i=0;i<3;++i){var n=t[KKt[i]];if(!n.visible){r.tickEnable[i]=!1,r.labelEnable[i]=!1,r.lineEnable[i]=!1,r.lineTickEnable[i]=!1,r.gridEnable[i]=!1,r.zeroEnable[i]=!1,r.backgroundEnable[i]=!1;continue}r.labels[i]=e._meta?ZKt.templateString(n.title.text,e._meta):n.title.text,"font"in n.title&&(n.title.font.color&&(r.labelColor[i]=bb(n.title.font.color)),n.title.font.family&&(r.labelFont[i]=n.title.font.family),n.title.font.size&&(r.labelSize[i]=n.title.font.size),n.title.font.weight&&(r.labelFontWeight[i]=n.title.font.weight),n.title.font.style&&(r.labelFontStyle[i]=n.title.font.style),n.title.font.variant&&(r.labelFontVariant[i]=n.title.font.variant)),"showline"in n&&(r.lineEnable[i]=n.showline),"linecolor"in n&&(r.lineColor[i]=bb(n.linecolor)),"linewidth"in n&&(r.lineWidth[i]=n.linewidth),"showgrid"in n&&(r.gridEnable[i]=n.showgrid),"gridcolor"in n&&(r.gridColor[i]=bb(n.gridcolor)),"gridwidth"in n&&(r.gridWidth[i]=n.gridwidth),n.type==="log"?r.zeroEnable[i]=!1:"zeroline"in n&&(r.zeroEnable[i]=n.zeroline),"zerolinecolor"in n&&(r.zeroLineColor[i]=bb(n.zerolinecolor)),"zerolinewidth"in n&&(r.zeroLineWidth[i]=n.zerolinewidth),"ticks"in n&&n.ticks?r.lineTickEnable[i]=!0:r.lineTickEnable[i]=!1,"ticklen"in n&&(r.lineTickLength[i]=r._defaultLineTickLength[i]=n.ticklen),"tickcolor"in n&&(r.lineTickColor[i]=bb(n.tickcolor)),"tickwidth"in n&&(r.lineTickWidth[i]=n.tickwidth),"tickangle"in n&&(r.tickAngle[i]=n.tickangle==="auto"?-3600:Math.PI*-n.tickangle/180),"showticklabels"in n&&(r.tickEnable[i]=n.showticklabels),"tickfont"in n&&(n.tickfont.color&&(r.tickColor[i]=bb(n.tickfont.color)),n.tickfont.family&&(r.tickFont[i]=n.tickfont.family),n.tickfont.size&&(r.tickSize[i]=n.tickfont.size),n.tickfont.weight&&(r.tickFontWeight[i]=n.tickfont.weight),n.tickfont.style&&(r.tickFontStyle[i]=n.tickfont.style),n.tickfont.variant&&(r.tickFontVariant[i]=n.tickfont.variant)),"mirror"in n?["ticks","all","allticks"].indexOf(n.mirror)!==-1?(r.lineTickMirror[i]=!0,r.lineMirror[i]=!0):n.mirror===!0?(r.lineTickMirror[i]=!1,r.lineMirror[i]=!0):(r.lineTickMirror[i]=!1,r.lineMirror[i]=!1):r.lineMirror[i]=!1,"showbackground"in n&&n.showbackground!==!1?(r.backgroundEnable[i]=!0,r.backgroundColor[i]=bb(n.backgroundcolor)):r.backgroundEnable[i]=!1}};function QKt(e,t){var r=new Xqe;return r.merge(e,t),r}Zqe.exports=QKt});var eOe=W((AHr,Qqe)=>{"use strict";var eJt=om(),tJt=["xaxis","yaxis","zaxis"];function Jqe(){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 rJt=Jqe.prototype;rJt.merge=function(e){for(var t=0;t<3;++t){var r=e[tJt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=eJt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function iJt(e){var t=new Jqe;return t.merge(e),t}Qqe.exports=iJt});var iOe=W((MHr,rOe)=>{"use strict";rOe.exports=lJt;var tOe=ji(),nJt=it(),aJt=["xaxis","yaxis","zaxis"],oJt=[0,0,0];function sJt(e){for(var t=new Array(3),r=0;r<3;++r){for(var i=e[r],n=new Array(i.length),a=0;a/g," "));n[a]=u,o.tickmode=s}}t.ticks=n;for(var a=0;a<3;++a){oJt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=sJt(n)}});var cOe=W((SHr,uOe)=>{"use strict";var oOe=nc().gl_plot3d,uJt=oOe.createCamera,nOe=oOe.createScene,cJt=$qe(),fJt=XD(),wI=yi(),nh=it(),bI=nh.preserveDrawingBuffer(),TI=ji(),fv=Ds(),hJt=om(),dJt=JK(),pJt=d$(),vJt=Kqe(),gJt=eOe(),mJt=iOe(),yJt=Op().applyAutorangeOptions,aE,_I,sOe=!1;function lOe(e,t){var r=document.createElement("div"),i=e.container;this.graphDiv=e.graphDiv;var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.style.position="absolute",n.style.top=n.style.left="0px",n.style.width=n.style.height="100%",n.style["z-index"]=20,n.style["pointer-events"]="none",r.appendChild(n),this.svgContainer=n,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",i.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=vJt(t,t[this.id]),this.spikeOptions=gJt(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=wI.getComponentMethod("annotations3d","convert"),this.drawAnnotations=wI.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var af=lOe.prototype;af.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:bI,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(!_I&&(aE=document.createElement("canvas"),_I=cJt({canvas:aE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_I))throw new Error("error creating static canvas/context for image server");t.gl=_I,t.canvas=aE}return t};var aOe=!0;af.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=nOe(t)}catch(i){if(e.staticMode||!aOe||bI)r=!1;else{nh.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{bI=t.glOptions.preserveDrawingBuffer=!0,e.glplot=nOe(t)}catch(n){bI=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return aOe=!1,r};af.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=uJt(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"})};af.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return dJt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,i=r.layout,n=function(){var o={};return e.isCameraChanged(i)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(i)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),i[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=i[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=n();o.saveLayout(i),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){sOe=!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})}a(e)}},fJt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=n();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};af.render=function(){var e=this,t=e.graphDiv,r,i=e.svgContainer,n=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._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),mJt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=TI.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+g.valueLabel),f.textLabel&&x.push(f.textLabel),M=x.join("
")):M=f.textLabel;var T={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:v._input,fullData:v,curveNumber:v.index,pointNumber:m};fv.appendArrayPointValue(T,v,m),r._module.eventData&&(T=v._module.eventData(T,f,v,{},m));var A={points:[T]};if(e.fullSceneLayout.hovermode){var y=[];fv.loneHover({trace:v,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:M,name:c.name,color:fv.castHoverOption(v,m,"bgcolor")||c.color,borderColor:fv.castHoverOption(v,m,"bordercolor"),fontFamily:fv.castHoverOption(v,m,"font.family"),fontSize:fv.castHoverOption(v,m,"font.size"),fontColor:fv.castHoverOption(v,m,"font.color"),nameLength:fv.castHoverOption(v,m,"namelength"),textAlign:fv.castHoverOption(v,m,"align"),hovertemplate:nh.castOption(v,m,"hovertemplate"),hovertemplateLabels:nh.extendFlat({},T,g),eventData:[T]},{container:i,gd:t,inOut_bbox:y}),T.bbox=y[0]}f.distance<5&&(f.buttons||sOe)?t.emit("plotly_click",A):t.emit("plotly_hover",A),this.oldEventData=A}else fv.loneUnhover(i),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};af.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){nh.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var oE=["xaxis","yaxis","zaxis"];function xJt(e,t,r){for(var i=e.fullSceneLayout,n=0;n<3;n++){var a=oE[n],o=a.charAt(0),s=i[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!nh.isArrayOrTypedArray(l))r[0][n]=Math.min(r[0][n],0),r[1][n]=Math.max(r[1][n],c-1);else for(var f,h=0;h<(c||l.length);h++)if(nh.isArrayOrTypedArray(l[h]))for(var d=0;dv[1][o])v[0][o]=-1,v[1][o]=1;else{var S=v[1][o]-v[0][o];v[0][o]-=S/32,v[1][o]+=S/32}if(w=[v[0][o],v[1][o]],w=yJt(w,l),v[0][o]=w[0],v[1][o]=w[1],l.isReversed()){var C=v[0][o];v[0][o]=v[1][o],v[1][o]=C}}else w=l.range,v[0][o]=l.r2l(w[0]),v[1][o]=l.r2l(w[1]);v[0][o]===v[1][o]&&(v[0][o]-=1,v[1][o]+=1),m[o]=v[1][o]-v[0][o],l.range=[v[0][o],v[1][o]],l.limitRange(),i.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var k,D=c.aspectmode;if(D==="cube")k=[1,1,1];else if(D==="manual"){var F=c.aspectratio;k=[F.x,F.y,F.z]}else if(D==="auto"||D==="data"){var P=[1,1,1];for(o=0;o<3;++o){l=c[oE[o]],u=l.type;var R=g[u];P[o]=Math.pow(R.acc,1/R.count)/d[o]}D==="data"||Math.max.apply(null,P)/Math.min.apply(null,P)<=4?k=P:k=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=k[0],c.aspectratio.y=f.aspectratio.y=k[1],c.aspectratio.z=f.aspectratio.z=k[2],i.glplot.setAspectratio(c.aspectratio),i.viewInitial.aspectratio||(i.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),i.viewInitial.aspectmode||(i.viewInitial.aspectmode=c.aspectmode);var L=c.domain||null,I=t._size||null;if(L&&I){var B=i.container.style;B.position="absolute",B.left=I.l+L.x[0]*I.w+"px",B.top=I.t+(1-L.y[1])*I.h+"px",B.width=I.w*(L.x[1]-L.x[0])+"px",B.height=I.h*(L.y[1]-L.y[0])+"px"}i.glplot.redraw()}};af.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 bJt(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 wJt(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"}}}af.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),wJt(e.camera)};af.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,bJt(r)),t.glplot.setAspectratio(e.aspectratio);var i=r.projection.type==="orthographic",n=t.camera._ortho;i!==n&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};af.isCameraChanged=function(e){var t=this,r=t.getCamera(),i=nh.nestedProperty(e,t.id+".camera"),n=i.get();function a(u,c,f,h){var d=["up","center","eye"],p=["x","y","z"];return c[d[f]]&&u[d[f]][p[h]]===c[d[f]][p[h]]}var o=!1;if(n===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,n,s,l)){o=!0;break}(!n.projection||r.projection&&r.projection.type!==n.projection.type)&&(o=!0)}return o};af.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),i=nh.nestedProperty(e,t.id+".aspectratio"),n=i.get();return n===void 0||n.x!==r.x||n.y!==r.y||n.z!==r.z};af.saveLayout=function(e){var t=this,r=t.fullLayout,i,n,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(i=t.getCamera(),n=nh.nestedProperty(e,t.id+".camera"),a=n.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=nh.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),wI.call("_storeDirectGUIEdit",e,r._preGUI,h),u){n.set(i);var d=nh.nestedProperty(r,t.id+".camera");d.set(i)}if(c){s.set(o);var p=nh.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};af.updateFx=function(e,t){var r=this,i=r.camera;if(i)if(e==="orbit")i.mode="orbit",i.keyBindingMode="rotate";else if(e==="turntable"){i.up=[0,0,1],i.mode="turntable",i.keyBindingMode="rotate";var n=r.graphDiv,a=n._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},h={};h[c]=f;var d=n.layout;wI.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,nh.nestedProperty(d,c).set(f)}}else i.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function TJt(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)}}af.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(aE),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,n=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*n*4);r.readPixels(0,0,i,n,r.RGBA,r.UNSIGNED_BYTE,a),TJt(a,i,n),AJt(a,i,n);var o=document.createElement("canvas");o.width=i,o.height=n;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(i,n);l.data.set(a),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(aE),u};af.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[oE[t]];TI.setConvert(r,e.fullLayout),r.setScale=nh.noop}};af.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},TI.setConvert(e._mockAxis,r)};uOe.exports=lOe});var hOe=W((EHr,fOe)=>{"use strict";fOe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var eJ=W((kHr,dOe)=>{"use strict";var MJt=ni(),Xn=ec(),QK=tn().extendFlat,SJt=ls().overrideAll;dOe.exports=SJt({visible:Xn.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:MJt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Xn.color,categoryorder:Xn.categoryorder,categoryarray:Xn.categoryarray,title:{text:Xn.title.text,font:Xn.title.font},type:QK({},Xn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Xn.autotypenumbers,autorange:Xn.autorange,autorangeoptions:{minallowed:Xn.autorangeoptions.minallowed,maxallowed:Xn.autorangeoptions.maxallowed,clipmin:Xn.autorangeoptions.clipmin,clipmax:Xn.autorangeoptions.clipmax,include:Xn.autorangeoptions.include,editType:"plot"},rangemode:Xn.rangemode,minallowed:Xn.minallowed,maxallowed:Xn.maxallowed,range:QK({},Xn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Xn.minor.tickmode,nticks:Xn.nticks,tick0:Xn.tick0,dtick:Xn.dtick,tickvals:Xn.tickvals,ticktext:Xn.ticktext,ticks:Xn.ticks,mirror:Xn.mirror,ticklen:Xn.ticklen,tickwidth:Xn.tickwidth,tickcolor:Xn.tickcolor,showticklabels:Xn.showticklabels,labelalias:Xn.labelalias,tickfont:Xn.tickfont,tickangle:Xn.tickangle,tickprefix:Xn.tickprefix,showtickprefix:Xn.showtickprefix,ticksuffix:Xn.ticksuffix,showticksuffix:Xn.showticksuffix,showexponent:Xn.showexponent,exponentformat:Xn.exponentformat,minexponent:Xn.minexponent,separatethousands:Xn.separatethousands,tickformat:Xn.tickformat,tickformatstops:Xn.tickformatstops,hoverformat:Xn.hoverformat,showline:Xn.showline,linecolor:Xn.linecolor,linewidth:Xn.linewidth,showgrid:Xn.showgrid,gridcolor:QK({},Xn.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Xn.gridwidth,zeroline:Xn.zeroline,zerolinecolor:Xn.zerolinecolor,zerolinewidth:Xn.zerolinewidth},"plot","from-root")});var nJ=W((CHr,pOe)=>{"use strict";var tJ=eJ(),EJt=us().attributes,rJ=tn().extendFlat,kJt=it().counterRegex;function iJ(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"}}pOe.exports={_arrayAttrRegexps:[kJt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:rJ(iJ(0,0,1),{}),center:rJ(iJ(0,0,0),{}),eye:rJ(iJ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:EJt({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:tJ,yaxis:tJ,zaxis:tJ,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 yOe=W((DHr,mOe)=>{"use strict";var CJt=ni(),vOe=it(),DJt=Da(),FJt=eJ(),LJt=Kj(),PJt=mM(),gOe=["xaxis","yaxis","zaxis"],IJt=13600/187;mOe.exports=function(t,r,i){var n,a;function o(u,c){return vOe.coerce(n,a,FJt,u,c)}for(var s=0;s{"use strict";var RJt=it(),zJt=ni(),BJt=yi(),qJt=q_(),OJt=yOe(),xOe=nJ(),NJt=_c().getSubplotData,_Oe="gl3d";bOe.exports=function(t,r,i){var n=r._basePlotModules.length>1;function a(o){if(!n){var s=RJt.validate(t[o],xOe[o]);if(s)return t[o]}}qJt(t,r,i,{type:_Oe,attributes:xOe,handleDefaults:UJt,fullLayout:r,font:r.font,fullData:i,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function UJt(e,t,r,i){for(var n=r("bgcolor"),a=zJt.combine(n,i.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",i.getDfltFromLayout("hovermode"))}});var w2=W(ah=>{"use strict";var VJt=ls().overrideAll,GJt=sy(),HJt=cOe(),jJt=_c().getSubplotData,$Jt=it(),WJt=sd(),S4="gl3d",aJ="scene";ah.name=S4;ah.attr=aJ;ah.idRoot=aJ;ah.idRegex=ah.attrRegex=$Jt.counterRegex("scene");ah.attributes=hOe();ah.layoutAttributes=nJ();ah.baseLayoutAttrOverrides=VJt({hoverlabel:GJt.hoverlabel},"plot","nested");ah.supplyLayoutDefaults=wOe();ah.plot=function(t){for(var r=t._fullLayout,i=t._fullData,n=r._subplots[S4],a=0;a{"use strict";TOe.exports={plot:Pqe(),attributes:ZK(),markerSymbols:yI(),supplyDefaults:Nqe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:Vqe(),moduleType:"trace",name:"scatter3d",basePlotModule:w2(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var SOe=W((IHr,MOe)=>{"use strict";MOe.exports=AOe()});var sE=W((RHr,COe)=>{"use strict";var EOe=ni(),YJt=Eo(),oJ=_s().axisHoverFormat,{hovertemplateAttrs:XJt,templatefallbackAttrs:ZJt}=Ga(),kOe=Wa(),sJ=tn().extendFlat,KJt=ls().overrideAll;function lJ(e){return{valType:"boolean",dflt:!1}}function uJ(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:lJ("x"),y:lJ("y"),z:lJ("z")},color:{valType:"color",dflt:EOe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:EOe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var cJ=COe.exports=KJt(sJ({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:XJt(),hovertemplatefallback:ZJt(),xhoverformat:oJ("x"),yhoverformat:oJ("y"),zhoverformat:oJ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},YJt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:uJ("x"),y:uJ("y"),z:uJ("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:sJ({},kOe.hoverinfo),showlegend:sJ({},kOe.showlegend,{dflt:!1})}),"calc","nested");cJ.x.editType=cJ.y.editType=cJ.z.editType="calc+clearAxisTypes"});var hJ=W((zHr,LOe)=>{"use strict";var JJt=yi(),DOe=it(),QJt=Fu(),eQt=sE(),fJ=.1;function tQt(e,t){for(var r=[],i=32,n=0;n{"use strict";var POe=Zc();IOe.exports=function(t,r){r.surfacecolor?POe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):POe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var UOe=W((qHr,NOe)=>{"use strict";var nQt=nc().gl_surface3d,E4=nc().ndarray,aQt=nc().ndarray_linear_interpolate.d2,oQt=_L(),sQt=bL(),lE=it().isArrayOrTypedArray,lQt=sm().parseColorScale,zOe=om(),uQt=Jo().extractOpts;function qOe(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 hv=qOe.prototype;hv.getXat=function(e,t,r,i){var n=lE(this.data.x)?lE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?n:i.d2l(n,0,r)};hv.getYat=function(e,t,r,i){var n=lE(this.data.y)?lE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?n:i.d2l(n,0,r)};hv.getZat=function(e,t,r,i){var n=this.data.z[t][e];return n===null&&this.data.connectgaps&&this.data._interpolatedZ&&(n=this.data._interpolatedZ[t][e]),r===void 0?n:i.d2l(n,0,r)};hv.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,i=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),n=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[i,n],e.traceCoordinate=[this.getXat(i,n),this.getYat(i,n),this.getZat(i,n)],e.dataCoordinate=[this.getXat(i,n,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(i,n,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(i,n,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return lE(s)&&s[n]&&s[n][i]!==void 0?e.textLabel=s[n][i]: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 cQt(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 k4=[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 fQt(e,t){if(e0){r=k4[i];break}return r}function dQt(e,t){if(!(e<1||t<1)){for(var r=dJ(e),i=dJ(t),n=1,a=0;aAI;)i--,i/=hQt(i),i++,i1?n:1};function vQt(e,t,r){var i=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/i,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/i,e}function gQt(e,t,r){return mQt(e,t,vQt,r),e}function mQt(e,t,r,i){for(var n=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[i]!==null&&this.contourEnd[i]!==null&&this.contourEnd[i]>this.contourStart[i]))for(t[i]=!0,n=this.contourStart[i];nh&&(this.minValues[u]=h),this.maxValues[u]{"use strict";VOe.exports={attributes:sE(),supplyDefaults:hJ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:ROe(),plot:UOe(),moduleType:"trace",name:"surface",basePlotModule:w2(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var jOe=W((NHr,HOe)=>{"use strict";HOe.exports=GOe()});var C4=W((UHr,WOe)=>{"use strict";var _Qt=Eo(),pJ=_s().axisHoverFormat,{hovertemplateAttrs:bQt,templatefallbackAttrs:wQt}=Ga(),T2=sE(),$Oe=Wa(),A2=tn().extendFlat;WOe.exports=A2({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:bQt({editType:"calc"}),hovertemplatefallback:wQt({editType:"calc"}),xhoverformat:pJ("x"),yhoverformat:pJ("y"),zhoverformat:pJ("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"}},_Qt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T2.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:A2({},T2.contours.x.show,{}),color:T2.contours.x.color,width:T2.contours.x.width,editType:"calc"},lightposition:{x:A2({},T2.lightposition.x,{dflt:1e5}),y:A2({},T2.lightposition.y,{dflt:1e5}),z:A2({},T2.lightposition.z,{dflt:0}),editType:"calc"},lighting:A2({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"},T2.lighting),hoverinfo:A2({},$Oe.hoverinfo,{editType:"calc"}),showlegend:A2({},$Oe.showlegend,{dflt:!1})})});var SI=W((VHr,XOe)=>{"use strict";var TQt=Eo(),MI=_s().axisHoverFormat,{hovertemplateAttrs:AQt,templatefallbackAttrs:MQt}=Ga(),uE=C4(),YOe=Wa(),vJ=tn().extendFlat,SQt=ls().overrideAll;function gJ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function mJ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var D4=XOe.exports=SQt(vJ({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:gJ("x"),y:gJ("y"),z:gJ("z")},caps:{x:mJ("x"),y:mJ("y"),z:mJ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:AQt(),hovertemplatefallback:MQt(),xhoverformat:MI("x"),yhoverformat:MI("y"),zhoverformat:MI("z"),valuehoverformat:MI("value",1),showlegend:vJ({},YOe.showlegend,{dflt:!1})},TQt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:uE.opacity,lightposition:uE.lightposition,lighting:uE.lighting,flatshading:uE.flatshading,contour:uE.contour,hoverinfo:vJ({},YOe.hoverinfo)}),"calc","nested");D4.flatshading.dflt=!0;D4.lighting.facenormalsepsilon.dflt=0;D4.x.editType=D4.y.editType=D4.z.editType=D4.value.editType="calc+clearAxisTypes"});var yJ=W((GHr,KOe)=>{"use strict";var EQt=it(),kQt=yi(),CQt=SI(),DQt=Fu();function FQt(e,t,r,i){function n(a,o){return EQt.coerce(e,t,CQt,a,o)}ZOe(e,t,r,i,n)}function ZOe(e,t,r,i,n){var a=n("isomin"),o=n("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=n("x"),l=n("y"),u=n("z"),c=n("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=kQt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(v){n(v+"hoverformat");var m="caps."+v,g=n(m+".show");g&&n(m+".fill");var w="slices."+v,b=n(w+".show");b&&(n(w+".fill"),n(w+".locations"))});var h=n("spaceframe.show");h&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var p=n("contour.show");p&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(v){n(v)}),DQt(e,t,i,n,{prefix:"",cLetter:"c"}),t._length=null}KOe.exports={supplyDefaults:FQt,supplyIsoDefaults:ZOe}});var EI=W((HHr,QOe)=>{"use strict";var _J=it(),LQt=Zc();function PQt(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=z1(t.u,t._len),t._v=z1(t.v,t._len),t._w=z1(t.w,t._len),t._x=z1(t.x,t._len),t._y=z1(t.y,t._len),t._z=z1(t.z,t._len);var r=JOe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var i=0,n,a,o;t.starts&&(n=z1(t.starts.x||[]),a=z1(t.starts.y||[]),o=z1(t.starts.z||[]),i=Math.min(n.length,a.length,o.length)),t._startsX=n||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(b=t[n-1],M=r[n-1],T=i[n-1]),a=0;ab?"-":"+")+"x"),p=p.replace("y",(_>M?"-":"+")+"y"),p=p.replace("z",(x>T?"-":"+")+"z");var S=function(){n=0,A=[],y=[],E=[]};(!n||n{"use strict";var IQt=Zc(),RQt=EI().processGrid,kI=EI().filter;eNe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=kI(r.x,r._len),r._y=kI(r.y,r._len),r._z=kI(r.z,r._len),r._value=kI(r.value,r._len);var i=RQt(r);r._gridFill=i.fill,r._Xs=i.Xs,r._Ys=i.Ys,r._Zs=i.Zs,r._len=i.len;for(var n=1/0,a=-1/0,o=0;o{"use strict";tNe.exports=function(t,r,i,n){n=n||t.length;for(var a=new Array(n),o=0;o{"use strict";var zQt=nc().gl_mesh3d,BQt=sm().parseColorScale,qQt=it().isArrayOrTypedArray,OQt=om(),NQt=Jo().extractOpts,rNe=F4(),cE=function(e,t){for(var r=t.length-1;r>0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i-1}function O(we,Fe){return we===null?Fe:we}function $(we,Fe,Se){S();var ke=[Fe],_e=[Se];if(R>=1)ke=[Fe],_e=[Se];else if(R>0){var Ie=I(Fe,Se);ke=Ie.xyzv,_e=Ie.abc}for(var Oe=0;Oe-1?Se[et]:E(_t,ut,vt);mt>-1?Qe[et]=mt:Qe[et]=k(_t,ut,vt,O(we,Xe))}D(Qe[0],Qe[1],Qe[2])}}function Y(we,Fe,Se){var ke=function(_e,Ie,Oe){$(we,[Fe[_e],Fe[Ie],Fe[Oe]],[Se[_e],Se[Ie],Se[Oe]])};ke(0,1,2),ke(2,3,0)}function K(we,Fe,Se){var ke=function(_e,Ie,Oe){$(we,[Fe[_e],Fe[Ie],Fe[Oe]],[Se[_e],Se[Ie],Se[Oe]])};ke(0,1,2),ke(3,0,1),ke(2,3,0),ke(1,2,3)}function j(we,Fe,Se,ke){var _e=we[3];_eke&&(_e=ke);for(var Ie=(we[3]-_e)/(we[3]-Fe[3]+1e-9),Oe=[],Qe=0;Qe<4;Qe++)Oe[Qe]=(1-Ie)*we[Qe]+Ie*Fe[Qe];return Oe}function q(we,Fe,Se){return we>=Fe&&we<=Se}function J(we){var Fe=.001*(M-_);return we>=_-Fe&&we<=M+Fe}function U(we){for(var Fe=[],Se=0;Se<4;Se++){var ke=we[Se];Fe.push([e._x[ke],e._y[ke],e._z[ke],e._value[ke]])}return Fe}var V=3;function X(we,Fe,Se,ke,_e,Ie){Ie||(Ie=1),Se=[-1,-1,-1];var Oe=!1,Qe=[q(Fe[0][3],ke,_e),q(Fe[1][3],ke,_e),q(Fe[2][3],ke,_e)];if(!Qe[0]&&!Qe[1]&&!Qe[2])return!1;var et=function(ut,vt,Xe){return J(vt[0][3])&&J(vt[1][3])&&J(vt[2][3])?($(ut,vt,Xe),!0):IeQe?[w,Ie]:[Ie,b];ye(Fe,et[0],et[1])}}var _t=[[Math.min(_,b),Math.max(_,b)],[Math.min(w,M),Math.max(w,M)]];["x","y","z"].forEach(function(ut){for(var vt=[],Xe=0;Xe<_t.length;Xe++){var mt=0,bt=_t[Xe][0],Ne=_t[Xe][1],Ue=e.slices[ut];if(Ue.show&&Ue.fill){L(Ue.fill);var Ge=[],je=[],Re=[];if(Ue.locations.length)for(var Ve=0;Ve0&&(je.push(ct.id),ut==="x"?Re.push([ct.distRatio,0,0]):ut==="y"?Re.push([0,ct.distRatio,0]):Re.push([0,0,ct.distRatio]))}else ut==="x"?Ge=xe(1,d-1):ut==="y"?Ge=xe(1,p-1):Ge=xe(1,v-1);je.length>0&&(ut==="x"?vt[mt]=ue(we,je,bt,Ne,Re,vt[mt]):ut==="y"?vt[mt]=ee(we,je,bt,Ne,Re,vt[mt]):vt[mt]=ae(we,je,bt,Ne,Re,vt[mt]),mt++),Ge.length>0&&(ut==="x"?vt[mt]=Ce(we,Ge,bt,Ne,vt[mt]):ut==="y"?vt[mt]=be(we,Ge,bt,Ne,vt[mt]):vt[mt]=he(we,Ge,bt,Ne,vt[mt]),mt++)}var Tt=e.caps[ut];Tt.show&&Tt.fill&&(L(Tt.fill),ut==="x"?vt[mt]=Ce(we,[0,d-1],bt,Ne,vt[mt]):ut==="y"?vt[mt]=be(we,[0,p-1],bt,Ne,vt[mt]):vt[mt]=he(we,[0,v-1],bt,Ne,vt[mt]),mt++)}}),s===0&&C(),e._meshX=x,e._meshY=T,e._meshZ=A,e._meshIntensity=y,e._Xs=c,e._Ys=f,e._Zs=h}return pe(),e}function VQt(e,t){var r=e.glplot.gl,i=zQt({gl:r}),n=new iNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}aNe.exports={findNearestOnAxis:cE,generateIsoMeshes:nNe,createIsosurfaceTrace:VQt}});var sNe=W((YHr,oNe)=>{"use strict";oNe.exports={attributes:SI(),supplyDefaults:yJ().supplyDefaults,calc:bJ(),colorbar:{min:"cmin",max:"cmax"},plot:CI().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var uNe=W((XHr,lNe)=>{"use strict";lNe.exports=sNe()});var AJ=W((ZHr,fNe)=>{"use strict";var GQt=Eo(),Il=SI(),HQt=sE(),cNe=Wa(),TJ=tn().extendFlat,jQt=ls().overrideAll,DI=fNe.exports=jQt(TJ({x:Il.x,y:Il.y,z:Il.z,value:Il.value,isomin:Il.isomin,isomax:Il.isomax,surface:Il.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Il.slices,caps:Il.caps,text:Il.text,hovertext:Il.hovertext,xhoverformat:Il.xhoverformat,yhoverformat:Il.yhoverformat,zhoverformat:Il.zhoverformat,valuehoverformat:Il.valuehoverformat,hovertemplate:Il.hovertemplate,hovertemplatefallback:Il.hovertemplatefallback},GQt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Il.colorbar,opacity:Il.opacity,opacityscale:HQt.opacityscale,lightposition:Il.lightposition,lighting:Il.lighting,flatshading:Il.flatshading,contour:Il.contour,hoverinfo:TJ({},cNe.hoverinfo),showlegend:TJ({},cNe.showlegend,{dflt:!1})}),"calc","nested");DI.x.editType=DI.y.editType=DI.z.editType=DI.value.editType="calc+clearAxisTypes"});var dNe=W((KHr,hNe)=>{"use strict";var $Qt=it(),WQt=AJ(),YQt=yJ().supplyIsoDefaults,XQt=hJ().opacityscaleDefaults;hNe.exports=function(t,r,i,n){function a(o,s){return $Qt.coerce(t,r,WQt,o,s)}YQt(t,r,i,n,a),XQt(t,r,n,a)}});var mNe=W((JHr,gNe)=>{"use strict";var ZQt=nc().gl_mesh3d,KQt=sm().parseColorScale,JQt=it().isArrayOrTypedArray,QQt=om(),eer=Jo().extractOpts,pNe=F4(),MJ=CI().findNearestOnAxis,ter=CI().generateIsoMeshes;function vNe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var SJ=vNe.prototype;SJ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],n=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=MJ(r,this.data._Xs).id,l=MJ(i,this.data._Ys).id,u=MJ(n,this.data._Zs).id,c=e.index=u+o*l+o*a*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 JQt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};SJ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=ter(e);function i(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var n=pNe(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=pNe(e._meshI,e._meshJ,e._meshK),o={positions:n,cells:a,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:QQt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=eer(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=KQt(e),this.mesh.update(o)};SJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function rer(e,t){var r=e.glplot.gl,i=ZQt({gl:r}),n=new vNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}gNe.exports=rer});var xNe=W((QHr,yNe)=>{"use strict";yNe.exports={attributes:AJ(),supplyDefaults:dNe(),calc:bJ(),colorbar:{min:"cmin",max:"cmax"},plot:mNe(),moduleType:"trace",name:"volume",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var bNe=W((ejr,_Ne)=>{"use strict";_Ne.exports=xNe()});var ANe=W((tjr,TNe)=>{"use strict";var ier=yi(),wNe=it(),ner=Fu(),aer=C4();TNe.exports=function(t,r,i,n){function a(c,f){return wNe.coerce(t,r,aer,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&wNe.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.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=ier.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],n),["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){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),ner(t,r,n,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",i)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var SNe=W((rjr,MNe)=>{"use strict";var oer=Zc();MNe.exports=function(t,r){r.intensity&&oer(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var FNe=W((ijr,DNe)=>{"use strict";var ser=nc().gl_mesh3d,ler=nc().delaunay_triangulate,uer=nc().alpha_shape,cer=nc().convex_hull,fer=sm().parseColorScale,her=it().isArrayOrTypedArray,DJ=om(),der=Jo().extractOpts,ENe=F4();function CNe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var FJ=CNe.prototype;FJ.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 her(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function kNe(e){for(var t=[],r=e.length,i=0;i=t-.5)return!1;return!0}FJ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var i=e.x.length,n=ENe(EJ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),EJ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),EJ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!CJ(e.i,i)||!CJ(e.j,i)||!CJ(e.k,i))return;a=ENe(kJ(e.i),kJ(e.j),kJ(e.k))}else e.alphahull===0?a=cer(n):e.alphahull>0?a=uer(e.alphahull,n):a=per(e.delaunayaxis,n);var o={positions:n,cells:a,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:DJ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=der(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=fer(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=kNe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=kNe(e.facecolor)):(this.color=e.color,o.meshColor=DJ(e.color));this.mesh.update(o)};FJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function ver(e,t){var r=e.glplot.gl,i=ser({gl:r}),n=new CNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}DNe.exports=ver});var PNe=W((njr,LNe)=>{"use strict";LNe.exports={attributes:C4(),supplyDefaults:ANe(),calc:SNe(),colorbar:{min:"cmin",max:"cmax"},plot:FNe(),moduleType:"trace",name:"mesh3d",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var RNe=W((ajr,INe)=>{"use strict";INe.exports=PNe()});var PJ=W((ojr,BNe)=>{"use strict";var ger=Eo(),L4=_s().axisHoverFormat,{hovertemplateAttrs:mer,templatefallbackAttrs:yer}=Ga(),xer=C4(),zNe=Wa(),LJ=tn().extendFlat,FI={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:mer({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:yer({editType:"calc"}),uhoverformat:L4("u",1),vhoverformat:L4("v",1),whoverformat:L4("w",1),xhoverformat:L4("x"),yhoverformat:L4("y"),zhoverformat:L4("z"),showlegend:LJ({},zNe.showlegend,{dflt:!1})};LJ(FI,ger("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var _er=["opacity","lightposition","lighting"];_er.forEach(function(e){FI[e]=xer[e]});FI.hoverinfo=LJ({},zNe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});BNe.exports=FI});var ONe=W((sjr,qNe)=>{"use strict";var ber=it(),wer=Fu(),Ter=PJ();qNe.exports=function(t,r,i,n){function a(d,p){return ber.coerce(t,r,Ter,d,p)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("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 h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),wer(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var UNe=W((ljr,NNe)=>{"use strict";var Aer=Zc();NNe.exports=function(t,r){for(var i=r.u,n=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,i.length,n.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var Mer=nc().gl_cone3d,Ser=nc().gl_cone3d.createConeMesh,Eer=it().simpleMap,ker=sm().parseColorScale,Cer=Jo().extractOpts,Der=it().isArrayOrTypedArray,VNe=F4();function GNe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var IJ=GNe.prototype;IJ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],i=this.data.y[t],n=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,i,n,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return Der(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var Fer={xaxis:0,yaxis:1,zaxis:2},Ler={tip:1,tail:0,cm:.25,center:.5},Per={tip:1,tail:1,cm:.75,center:.5};function HNe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n={};function a(c,f){var h=r[f],d=i[Fer[f]];return Eer(c,function(p){return h.d2l(p)*d})}n.vectors=VNe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),n.positions=VNe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=Cer(t);n.colormap=ker(t),n.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],n.coneOffset=Ler[t.anchor];var s=t.sizemode;s==="scaled"?n.coneSize=t.sizeref||.5:s==="absolute"?n.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(n.coneSize=t.sizeref),n.coneSizemode=s;var l=Mer(n),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=Per[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}IJ.update=function(e){this.data=e;var t=HNe(this.scene,e);this.mesh.update(t)};IJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Ier(e,t){var r=e.glplot.gl,i=HNe(e,t),n=Ser(r,i),a=new GNe(e,t.uid);return a.mesh=n,a.data=t,n._trace=a,e.glplot.add(n),a}jNe.exports=Ier});var YNe=W((cjr,WNe)=>{"use strict";WNe.exports={moduleType:"trace",name:"cone",basePlotModule:w2(),categories:["gl3d","showLegend"],attributes:PJ(),supplyDefaults:ONe(),colorbar:{min:"cmin",max:"cmax"},calc:UNe(),plot:$Ne(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var ZNe=W((fjr,XNe)=>{"use strict";XNe.exports=YNe()});var zJ=W((hjr,JNe)=>{"use strict";var Rer=Eo(),P4=_s().axisHoverFormat,{hovertemplateAttrs:zer,templatefallbackAttrs:Ber}=Ga(),qer=C4(),KNe=Wa(),RJ=tn().extendFlat,LI={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:zer({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:Ber({editType:"calc"}),uhoverformat:P4("u",1),vhoverformat:P4("v",1),whoverformat:P4("w",1),xhoverformat:P4("x"),yhoverformat:P4("y"),zhoverformat:P4("z"),showlegend:RJ({},KNe.showlegend,{dflt:!1})};RJ(LI,Rer("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Oer=["opacity","lightposition","lighting"];Oer.forEach(function(e){LI[e]=qer[e]});LI.hoverinfo=RJ({},KNe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});JNe.exports=LI});var eUe=W((djr,QNe)=>{"use strict";var Ner=it(),Uer=Fu(),Ver=zJ();QNe.exports=function(t,r,i,n){function a(h,d){return Ner.coerce(t,r,Ver,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),Uer(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var lUe=W((pjr,sUe)=>{"use strict";var iUe=nc().gl_streamtube3d,Ger=iUe.createTubeMesh,Her=it(),jer=sm().parseColorScale,$er=Jo().extractOpts,tUe=F4(),nUe={xaxis:0,yaxis:1,zaxis:2};function aUe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var qJ=aUe.prototype;qJ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function i(o,s){var l=t[s],u=r[nUe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var n=e.data.position,a=e.data.velocity;return e.traceCoordinate=[i(n[0],"xaxis"),i(n[1],"yaxis"),i(n[2],"zaxis"),i(a[0],"xaxis"),i(a[1],"yaxis"),i(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function rUe(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 BJ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function oUe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n=t._len,a={};function o(C,k){var D=r[k],F=i[nUe[k]];return Her.simpleMap(C,function(P){return D.d2l(P)*F})}if(a.vectors=tUe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),n),!n)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=tUe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=rUe(s),d=rUe(u),p=new Array(h.length*d.length),v=0,m=0;m{"use strict";uUe.exports={moduleType:"trace",name:"streamtube",basePlotModule:w2(),categories:["gl3d","showLegend"],attributes:zJ(),supplyDefaults:eUe(),colorbar:{min:"cmin",max:"cmax"},calc:EI().calc,plot:lUe(),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 hUe=W((gjr,fUe)=>{"use strict";fUe.exports=cUe()});var I4=W((mjr,mUe)=>{"use strict";var{hovertemplateAttrs:Yer,texttemplateAttrs:Xer,templatefallbackAttrs:dUe}=Ga(),Zer=g1(),B1=Ns(),Ker=Wa(),pUe=Eo(),Jer=Du().dash,wb=tn().extendFlat,Qer=ls().overrideAll,Ud=B1.marker,vUe=B1.line,gUe=Ud.line;mUe.exports=Qer({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:wb({},B1.mode,{dflt:"markers"}),text:wb({},B1.text,{}),texttemplate:Xer({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:dUe({editType:"plot"}),hovertext:wb({},B1.hovertext,{}),textfont:B1.textfont,textposition:B1.textposition,line:{color:vUe.color,width:vUe.width,dash:Jer},connectgaps:B1.connectgaps,marker:wb({symbol:Ud.symbol,opacity:Ud.opacity,angle:Ud.angle,angleref:wb({},Ud.angleref,{values:["previous","up","north"]}),standoff:Ud.standoff,size:Ud.size,sizeref:Ud.sizeref,sizemin:Ud.sizemin,sizemode:Ud.sizemode,colorbar:Ud.colorbar,line:wb({width:gUe.width,dash:gUe.dash},pUe("marker.line")),gradient:Ud.gradient},pUe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Zer(),selected:B1.selected,unselected:B1.unselected,hoverinfo:wb({},Ker.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:Yer(),hovertemplatefallback:dUe()},"calc","nested")});var xUe=W((yjr,yUe)=>{"use strict";var OJ=it(),NJ=$o(),etr=bd(),ttr=jp(),rtr=$p(),itr=y1(),ntr=I4();yUe.exports=function(t,r,i,n){function a(d,p){return OJ.coerce(t,r,ntr,d,p)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||OJ.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),NJ.hasMarkers(r)&&etr(t,r,i,n,a,{gradient:!0}),NJ.hasLines(r)&&(ttr(t,r,i,n,a),a("connectgaps")),NJ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),rtr(t,r,n,a)),a("fill"),r.fill!=="none"&&itr(t,r,i,a),OJ.coerceSelectionMarkerOpacity(r,a)}});var wUe=W((xjr,bUe)=>{"use strict";var _Ue=ji();bUe.exports=function(t,r,i){var n={},a=i[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=_Ue.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=_Ue.tickText(o,o.c2l(s[1]),!0).text,n}});var VJ=W((_jr,SUe)=>{"use strict";var UJ=sn(),TUe=Kn().BADNUM,atr=wd(),otr=x1(),str=w0(),ltr=it().isArrayOrTypedArray,AUe=it()._;function MUe(e){return e&&typeof e=="string"}SUe.exports=function(t,r){var i=ltr(r.locations),n=i?r.locations.length:r._length,a=new Array(n),o;r.geojson?o=function(h){return MUe(h)||UJ(h)}:o=MUe;for(var s=0;s{"use strict";Dc.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"};Dc.axesNames=["lonaxis","lataxis"];Dc.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Dc.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Dc.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);Dc.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]}};Dc.clipPad=.001;Dc.precision=.1;Dc.landColor="#F0DC82";Dc.waterColor="#3399FF";Dc.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Dc.sphereSVG={type:"Sphere"};Dc.fillLayers={ocean:1,land:1,lakes:1};Dc.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Dc.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Dc.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Dc.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var GJ=W((PI,EUe)=>{(function(e,t){typeof PI=="object"&&typeof EUe!="undefined"?t(PI):(e=e||self,t(e.topojson=e.topojson||{}))})(PI,function(e){"use strict";function t(b){return b}function r(b){if(b==null)return t;var _,M,x=b.scale[0],T=b.scale[1],A=b.translate[0],y=b.translate[1];return function(E,S){S||(_=M=0);var C=2,k=E.length,D=new Array(k);for(D[0]=(_+=E[0])*x+A,D[1]=(M+=E[1])*T+y;CA&&(A=C[0]),C[1]y&&(y=C[1])}function S(C){switch(C.type){case"GeometryCollection":C.geometries.forEach(S);break;case"Point":E(C.coordinates);break;case"MultiPoint":C.coordinates.forEach(E);break}}b.arcs.forEach(function(C){for(var k=-1,D=C.length,F;++kA&&(A=F[0]),F[1]y&&(y=F[1])});for(M in b.objects)S(b.objects[M]);return[x,T,A,y]}function n(b,_){for(var M,x=b.length,T=x-_;T<--x;)M=b[T],b[T++]=b[x],b[x]=M}function a(b,_){return typeof _=="string"&&(_=b.objects[_]),_.type==="GeometryCollection"?{type:"FeatureCollection",features:_.geometries.map(function(M){return o(b,M)})}:o(b,_)}function o(b,_){var M=_.id,x=_.bbox,T=_.properties==null?{}:_.properties,A=s(b,_);return M==null&&x==null?{type:"Feature",properties:T,geometry:A}:x==null?{type:"Feature",id:M,properties:T,geometry:A}:{type:"Feature",id:M,bbox:x,properties:T,geometry:A}}function s(b,_){var M=r(b.transform),x=b.arcs;function T(k,D){D.length&&D.pop();for(var F=x[k<0?~k:k],P=0,R=F.length;P1)x=f(b,_,M);else for(T=0,x=new Array(A=b.arcs.length);T1)for(var D=1,F=E(C[0]),P,R;DF&&(R=C[0],C[0]=C[D],C[D]=R,F=P);return C}).filter(function(S){return S.length>0})}}function v(b,_){for(var M=0,x=b.length;M>>1;b[T]<_?M=T+1:x=T}return M}function m(b){var _={},M=b.map(function(){return[]});function x(L,I){L.forEach(function(B){B<0&&(B=~B);var O=_[B];O?O.push(I):_[B]=[I]})}function T(L,I){L.forEach(function(B){x(B,I)})}function A(L,I){L.type==="GeometryCollection"?L.geometries.forEach(function(B){A(B,I)}):L.type in y&&y[L.type](L.arcs,I)}var y={LineString:x,MultiLineString:T,Polygon:T,MultiPolygon:function(L,I){L.forEach(function(B){T(B,I)})}};b.forEach(A);for(var E in _)for(var S=_[E],C=S.length,k=0;k=2))throw new Error("n must be \u22652");S=b.bbox||i(b);var M=S[0],x=S[1],T=S[2],A=S[3],y;_={scale:[T-M?(T-M)/(y-1):1,A-x?(A-x)/(y-1):1],translate:[M,x]}}else S=b.bbox;var E=g(_),S,C,k=b.objects,D={};function F(L){return E(L)}function P(L){var I;switch(L.type){case"GeometryCollection":I={type:"GeometryCollection",geometries:L.geometries.map(P)};break;case"Point":I={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":I={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(I.id=L.id),L.bbox!=null&&(I.bbox=L.bbox),L.properties!=null&&(I.properties=L.properties),I}function R(L){var I=0,B=1,O=L.length,$,Y=new Array(O);for(Y[0]=E(L[0],0);++I{"use strict";var HJ=kUe.exports={},utr=fE().locationmodeToLayer,ctr=GJ().feature;HJ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};HJ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};HJ.getTopojsonFeatures=function(e,t){var r=utr[e.locationmode],i=t.objects[r];return ctr(t,i).features}});var dE=W(hE=>{"use strict";var ftr=Kn().BADNUM;hE.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,i=[],n=[],a=0;a0&&(i.push(n),n=[])}return n.length>0&&i.push(n),i};hE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};hE.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 $J=Object.defineProperty,htr=Object.getOwnPropertyDescriptor,dtr=Object.getOwnPropertyNames,ptr=Object.prototype.hasOwnProperty,vtr=(e,t)=>{for(var r in t)$J(e,r,{get:t[r],enumerable:!0})},gtr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of dtr(t))!ptr.call(e,n)&&n!==r&&$J(e,n,{get:()=>t[n],enumerable:!(i=htr(t,n))||i.enumerable});return e},mtr=e=>gtr($J({},"__esModule",{value:!0}),e),CUe={};vtr(CUe,{COUNTRIES:()=>DUe,byAlpha2:()=>btr,byAlpha3:()=>_tr,byM49:()=>wtr,createLookup:()=>FUe,lookup:()=>ytr,lookupAlpha3:()=>xtr,sanitize:()=>jJ});LUe.exports=mtr(CUe);var DUe=[{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 jJ(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 FUe(e){let t=new Map,r=new Map,i=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&i.set(s.m49,s);let n=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=jJ(l),c=n.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);n.set(u,s.iso3)}function a(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=i.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=n.get(jJ(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=a(s))==null?void 0:l.iso3}return{lookup:a,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:i}}var pE=FUe(DUe),ytr=pE.lookup,xtr=pE.lookupAlpha3,_tr=pE.byAlpha3,btr=pE.byAlpha2,wtr=pE.byM49});var BI=W(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var Wh=63710088e-1,YJ={centimeters:Wh*100,centimetres:Wh*100,degrees:360/(2*Math.PI),feet:Wh*3.28084,inches:Wh*39.37,kilometers:Wh/1e3,kilometres:Wh/1e3,meters:Wh,metres:Wh,miles:Wh/1609.344,millimeters:Wh*1e3,millimetres:Wh*1e3,nauticalmiles:Wh/1852,radians:1,yards:Wh*1.0936},WJ={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 M2(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function Ttr(e,t,r={}){switch(e){case"Point":return XJ(t).geometry;case"LineString":return KJ(t).geometry;case"Polygon":return ZJ(t).geometry;case"MultiPoint":return RUe(t).geometry;case"MultiLineString":return IUe(t).geometry;case"MultiPolygon":return zUe(t).geometry;default:throw new Error(e+" is invalid")}}function XJ(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(!RI(e[0])||!RI(e[1]))throw new Error("coordinates must contain numbers");return M2({type:"Point",coordinates:e},t,r)}function Atr(e,t,r={}){return zI(e.map(i=>XJ(i,t)),r)}function ZJ(e,t,r={}){for(let n of e){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aZJ(i,t)),r)}function KJ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return M2({type:"LineString",coordinates:e},t,r)}function Str(e,t,r={}){return zI(e.map(i=>KJ(i,t)),r)}function zI(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function IUe(e,t,r={}){return M2({type:"MultiLineString",coordinates:e},t,r)}function RUe(e,t,r={}){return M2({type:"MultiPoint",coordinates:e},t,r)}function zUe(e,t,r={}){return M2({type:"MultiPolygon",coordinates:e},t,r)}function Etr(e,t,r={}){return M2({type:"GeometryCollection",geometries:e},t,r)}function ktr(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 BUe(e,t="kilometers"){let r=YJ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function JJ(e,t="kilometers"){let r=YJ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function Ctr(e,t){return qUe(JJ(e,t))}function Dtr(e){let t=e%360;return t<0&&(t+=360),t}function Ftr(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function qUe(e){return e%(2*Math.PI)*180/Math.PI}function Ltr(e){return e%360*Math.PI/180}function Ptr(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return BUe(JJ(e,t),r)}function Itr(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=WJ[t];if(!i)throw new Error("invalid original units");let n=WJ[r];if(!n)throw new Error("invalid final units");return e/i*n}function RI(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Rtr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ztr(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(!RI(t))throw new Error("bbox must only contain numbers")})}function Btr(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")}zo.areaFactors=WJ;zo.azimuthToBearing=Ftr;zo.bearingToAzimuth=Dtr;zo.convertArea=Itr;zo.convertLength=Ptr;zo.degreesToRadians=Ltr;zo.earthRadius=Wh;zo.factors=YJ;zo.feature=M2;zo.featureCollection=zI;zo.geometry=Ttr;zo.geometryCollection=Etr;zo.isNumber=RI;zo.isObject=Rtr;zo.lengthToDegrees=Ctr;zo.lengthToRadians=JJ;zo.lineString=KJ;zo.lineStrings=Str;zo.multiLineString=IUe;zo.multiPoint=RUe;zo.multiPolygon=zUe;zo.point=XJ;zo.points=Atr;zo.polygon=ZJ;zo.polygons=Mtr;zo.radiansToDegrees=qUe;zo.radiansToLength=BUe;zo.round=ktr;zo.validateBBox=ztr;zo.validateId=Btr});var OI=W(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Df=BI();function vE(e,t,r){if(e!==null)for(var i,n,a,o,s,l,u,c=0,f=0,h,d=e.type,p=d==="FeatureCollection",v=d==="Feature",m=p?e.features.length:1,g=0;gl||p>u||v>c){s=f,l=i,u=p,c=v,a=0;return}var m=Df.lineString.call(void 0,[s,f],r.properties);if(t(m,i,n,v,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function Htr(e,t,r){var i=r,n=!1;return UUe(e,function(a,o,s,l,u){n===!1&&r===void 0?i=a:i=t(i,a,o,s,l,u),n=!0}),i}function VUe(e,t){if(!e)throw new Error("geojson is required");qI(e,function(r,i,n){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});var GUe=BI(),Ytr=OI();function $Ue(e){return Ytr.geomReduce.call(void 0,e,(t,r)=>t+Xtr(r),0)}function Xtr(e){let t=0,r;switch(e.type){case"Polygon":return HUe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(jUe(e[0]));for(let r=1;r=t?(i+2)%t:i+2],s=n[0]*eQ,l=a[1]*eQ,u=o[0]*eQ;r+=(u-s)*Math.sin(l),i++}return r*Ztr}var Ktr=$Ue;NI.area=$Ue;NI.default=Ktr});var XUe=W(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});var Jtr=BI(),Qtr=OI();function YUe(e,t={}){let r=0,i=0,n=0;return Qtr.coordEach.call(void 0,e,function(a){r+=a[0],i+=a[1],n++},!0),Jtr.point.call(void 0,[r/n,i/n],t.properties)}var err=YUe;UI.centroid=YUe;UI.default=err});var KUe=W((VI,ZUe)=>{(function(e,t){t(typeof VI=="object"&&typeof ZUe!="undefined"?VI:e.d3=e.d3||{})})(VI,(function(e){"use strict";function t(U,V){return UV?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);XU?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H=G)for(Q=te=G;++HG&&(Q=G),te=G)for(Q=te=G;++HG&&(Q=G),te0)return[U];if((H=V0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),Vhe;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HQ&&(Q=G)}else for(;++H=G)for(Q=G;++HQ&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HG&&(Q=G)}else for(;++H=G)for(Q=G;++HG&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H{(function(e,t){typeof GI=="object"&&typeof JUe!="undefined"?t(GI,KUe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(GI,(function(e,t){"use strict";function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(Te){a(n,Te,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(Te,qe,rt){var Ye=Te.s=qe+rt,At=Ye-qe,Gt=Ye-At;Te.t=qe-Gt+(rt-At)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,p=Math.abs,v=Math.atan,m=Math.atan2,g=Math.cos,w=Math.ceil,b=Math.exp,_=Math.log,M=Math.pow,x=Math.sin,T=Math.sign||function(Te){return Te>0?1:Te<0?-1:0},A=Math.sqrt,y=Math.tan;function E(Te){return Te>1?0:Te<-1?l:Math.acos(Te)}function S(Te){return Te>1?u:Te<-1?-u:Math.asin(Te)}function C(Te){return(Te=x(Te/2))*Te}function k(){}function D(Te,qe){Te&&P.hasOwnProperty(Te.type)&&P[Te.type](Te,qe)}var F={Feature:function(Te,qe){D(Te.geometry,qe)},FeatureCollection:function(Te,qe){for(var rt=Te.features,Ye=-1,At=rt.length;++Ye=0?1:-1,At=Ye*rt,Gt=g(qe),Kt=x(qe),cr=q*Kt,mr=j*Gt+cr*g(At),Pr=cr*Ye*x(At);B.add(m(Pr,mr)),K=Te,j=Gt,q=Kt}function G(Te){return O.reset(),I(Te,J),O*2}function Q(Te){return[m(Te[1],Te[0]),S(Te[2])]}function te(Te){var qe=Te[0],rt=Te[1],Ye=g(rt);return[Ye*g(qe),Ye*x(qe),x(rt)]}function ce(Te,qe){return Te[0]*qe[0]+Te[1]*qe[1]+Te[2]*qe[2]}function ge(Te,qe){return[Te[1]*qe[2]-Te[2]*qe[1],Te[2]*qe[0]-Te[0]*qe[2],Te[0]*qe[1]-Te[1]*qe[0]]}function Ce(Te,qe){Te[0]+=qe[0],Te[1]+=qe[1],Te[2]+=qe[2]}function be(Te,qe){return[Te[0]*qe,Te[1]*qe,Te[2]*qe]}function he(Te){var qe=A(Te[0]*Te[0]+Te[1]*Te[1]+Te[2]*Te[2]);Te[0]/=qe,Te[1]/=qe,Te[2]/=qe}var oe,Ee,ye,ue,ee,ae,xe,re,pe=r(),we,Fe,Se={point:ke,lineStart:Ie,lineEnd:Oe,polygonStart:function(){Se.point=Qe,Se.lineStart=et,Se.lineEnd=_t,pe.reset(),J.polygonStart()},polygonEnd:function(){J.polygonEnd(),Se.point=ke,Se.lineStart=Ie,Se.lineEnd=Oe,B<0?(oe=-(ye=180),Ee=-(ue=90)):pe>o?ue=90:pe<-o&&(Ee=-90),Fe[0]=oe,Fe[1]=ye},sphere:function(){oe=-(ye=180),Ee=-(ue=90)}};function ke(Te,qe){we.push(Fe=[oe=Te,ye=Te]),qeue&&(ue=qe)}function _e(Te,qe){var rt=te([Te*d,qe*d]);if(re){var Ye=ge(re,rt),At=[Ye[1],-Ye[0],0],Gt=ge(At,Ye);he(Gt),Gt=Q(Gt);var Kt=Te-ee,cr=Kt>0?1:-1,mr=Gt[0]*h*cr,Pr,rr=p(Kt)>180;rr^(cr*eeue&&(ue=Pr)):(mr=(mr+360)%360-180,rr^(cr*eeue&&(ue=qe))),rr?Teut(oe,ye)&&(ye=Te):ut(Te,ye)>ut(oe,ye)&&(oe=Te):ye>=oe?(Teye&&(ye=Te)):Te>ee?ut(oe,Te)>ut(oe,ye)&&(ye=Te):ut(Te,ye)>ut(oe,ye)&&(oe=Te)}else we.push(Fe=[oe=Te,ye=Te]);qeue&&(ue=qe),re=rt,ee=Te}function Ie(){Se.point=_e}function Oe(){Fe[0]=oe,Fe[1]=ye,Se.point=ke,re=null}function Qe(Te,qe){if(re){var rt=Te-ee;pe.add(p(rt)>180?rt+(rt>0?360:-360):rt)}else ae=Te,xe=qe;J.point(Te,qe),_e(Te,qe)}function et(){J.lineStart()}function _t(){Qe(ae,xe),J.lineEnd(),p(pe)>o&&(oe=-(ye=180)),Fe[0]=oe,Fe[1]=ye,re=null}function ut(Te,qe){return(qe-=Te)<0?qe+360:qe}function vt(Te,qe){return Te[0]-qe[0]}function Xe(Te,qe){return Te[0]<=Te[1]?Te[0]<=qe&&qe<=Te[1]:qeut(Ye[0],Ye[1])&&(Ye[1]=At[1]),ut(At[0],Ye[1])>ut(Ye[0],Ye[1])&&(Ye[0]=At[0])):Gt.push(Ye=At);for(Kt=-1/0,rt=Gt.length-1,qe=0,Ye=Gt[rt];qe<=rt;Ye=At,++qe)At=Gt[qe],(cr=ut(Ye[1],At[0]))>Kt&&(Kt=cr,oe=At[0],ye=Ye[1])}return we=Fe=null,oe===1/0||Ee===1/0?[[NaN,NaN],[NaN,NaN]]:[[oe,Ee],[ye,ue]]}var bt,Ne,Ue,Ge,je,Re,Ve,ct,Tt,Xt,Vt,lr,ur,Bt,Zt,kr,$e={sphere:k,point:tt,lineStart:xt,lineEnd:ir,polygonStart:function(){$e.lineStart=hr,$e.lineEnd=Ur},polygonEnd:function(){$e.lineStart=xt,$e.lineEnd=ir}};function tt(Te,qe){Te*=d,qe*=d;var rt=g(qe);st(rt*g(Te),rt*x(Te),x(qe))}function st(Te,qe,rt){++bt,Ue+=(Te-Ue)/bt,Ge+=(qe-Ge)/bt,je+=(rt-je)/bt}function xt(){$e.point=Je}function Je(Te,qe){Te*=d,qe*=d;var rt=g(qe);Bt=rt*g(Te),Zt=rt*x(Te),kr=x(qe),$e.point=Ct,st(Bt,Zt,kr)}function Ct(Te,qe){Te*=d,qe*=d;var rt=g(qe),Ye=rt*g(Te),At=rt*x(Te),Gt=x(qe),Kt=m(A((Kt=Zt*Gt-kr*At)*Kt+(Kt=kr*Ye-Bt*Gt)*Kt+(Kt=Bt*At-Zt*Ye)*Kt),Bt*Ye+Zt*At+kr*Gt);Ne+=Kt,Re+=Kt*(Bt+(Bt=Ye)),Ve+=Kt*(Zt+(Zt=At)),ct+=Kt*(kr+(kr=Gt)),st(Bt,Zt,kr)}function ir(){$e.point=tt}function hr(){$e.point=si}function Ur(){ei(lr,ur),$e.point=tt}function si(Te,qe){lr=Te,ur=qe,Te*=d,qe*=d,$e.point=ei;var rt=g(qe);Bt=rt*g(Te),Zt=rt*x(Te),kr=x(qe),st(Bt,Zt,kr)}function ei(Te,qe){Te*=d,qe*=d;var rt=g(qe),Ye=rt*g(Te),At=rt*x(Te),Gt=x(qe),Kt=Zt*Gt-kr*At,cr=kr*Ye-Bt*Gt,mr=Bt*At-Zt*Ye,Pr=A(Kt*Kt+cr*cr+mr*mr),rr=S(Pr),fr=Pr&&-rr/Pr;Tt+=fr*Kt,Xt+=fr*cr,Vt+=fr*mr,Ne+=rr,Re+=rr*(Bt+(Bt=Ye)),Ve+=rr*(Zt+(Zt=At)),ct+=rr*(kr+(kr=Gt)),st(Bt,Zt,kr)}function Lr(Te){bt=Ne=Ue=Ge=je=Re=Ve=ct=Tt=Xt=Vt=0,I(Te,$e);var qe=Tt,rt=Xt,Ye=Vt,At=qe*qe+rt*rt+Ye*Ye;return Atl?Te+Math.round(-Te/f)*f:Te,qe]}hn.invert=hn;function ta(Te,qe,rt){return(Te%=f)?qe||rt?Tn(dn(Te),Vn(qe,rt)):dn(Te):qe||rt?Vn(qe,rt):hn}function ca(Te){return function(qe,rt){return qe+=Te,[qe>l?qe-f:qe<-l?qe+f:qe,rt]}}function dn(Te){var qe=ca(Te);return qe.invert=ca(-Te),qe}function Vn(Te,qe){var rt=g(Te),Ye=x(Te),At=g(qe),Gt=x(qe);function Kt(cr,mr){var Pr=g(mr),rr=g(cr)*Pr,fr=x(cr)*Pr,pr=x(mr),Dr=pr*rt+rr*Ye;return[m(fr*At-Dr*Gt,rr*rt-pr*Ye),S(Dr*At+fr*Gt)]}return Kt.invert=function(cr,mr){var Pr=g(mr),rr=g(cr)*Pr,fr=x(cr)*Pr,pr=x(mr),Dr=pr*At-fr*Gt;return[m(fr*At+pr*Gt,rr*rt+Dr*Ye),S(Dr*rt-rr*Ye)]},Kt}function ra(Te){Te=ta(Te[0]*d,Te[1]*d,Te.length>2?Te[2]*d:0);function qe(rt){return rt=Te(rt[0]*d,rt[1]*d),rt[0]*=h,rt[1]*=h,rt}return qe.invert=function(rt){return rt=Te.invert(rt[0]*d,rt[1]*d),rt[0]*=h,rt[1]*=h,rt},qe}function ds(Te,qe,rt,Ye,At,Gt){if(rt){var Kt=g(qe),cr=x(qe),mr=Ye*rt;At==null?(At=qe+Ye*f,Gt=qe-mr/2):(At=mo(Kt,At),Gt=mo(Kt,Gt),(Ye>0?AtGt)&&(At+=Ye*f));for(var Pr,rr=At;Ye>0?rr>Gt:rr1&&Te.push(Te.pop().concat(Te.shift()))},result:function(){var rt=Te;return Te=[],qe=null,rt}}}function ka(Te,qe){return p(Te[0]-qe[0])=0;--cr)At.point((fr=rr[cr])[0],fr[1]);else Ye(pr.x,pr.p.x,-1,At);pr=pr.p}pr=pr.o,rr=pr.z,Dr=!Dr}while(!pr.v);At.lineEnd()}}}function _a(Te){if(qe=Te.length){for(var qe,rt=0,Ye=Te[0],At;++rt=0?1:-1,Ca=$a*ga,xo=Ca>l,aa=zi*on;if(Xs.add(m(aa*$a*x(Ca),ki*En+aa*g(Ca))),Kt+=xo?ga+$a*f:ga,xo^Dr>=rt^Yr>=rt){var fl=ge(te(pr),te(Xi));he(fl);var ns=ge(Gt,fl);he(ns);var po=(xo^ga>=0?-1:1)*S(ns[2]);(Ye>po||Ye===po&&(fl[0]||fl[1]))&&(cr+=xo^ga>=0?1:-1)}}return(Kt<-o||Kt0){for(mr||(At.polygonStart(),mr=!0),At.lineStart(),En=0;En<$a;++En)At.point((xo=Ca[En])[0],xo[1]);At.lineEnd()}return}ga>1&&ai&2&&on.push(on.pop().concat(on.shift())),rr.push(on.filter(Le))}}return pr}}function Le(Te){return Te.length>1}function ot(Te,qe){return((Te=Te.x)[0]<0?Te[1]-u-o:u-Te[1])-((qe=qe.x)[0]<0?qe[1]-u-o:u-qe[1])}var lt=ul(function(){return!0},kt,Rt,[-l,-u]);function kt(Te){var qe=NaN,rt=NaN,Ye=NaN,At;return{lineStart:function(){Te.lineStart(),At=1},point:function(Gt,Kt){var cr=Gt>0?l:-l,mr=p(Gt-qe);p(mr-l)0?u:-u),Te.point(Ye,rt),Te.lineEnd(),Te.lineStart(),Te.point(cr,rt),Te.point(Gt,rt),At=0):Ye!==cr&&mr>=l&&(p(qe-Ye)o?v((x(qe)*(Gt=g(Ye))*x(rt)-x(Ye)*(At=g(qe))*x(Te))/(At*Gt*Kt)):(qe+Ye)/2}function Rt(Te,qe,rt,Ye){var At;if(Te==null)At=rt*u,Ye.point(-l,At),Ye.point(0,At),Ye.point(l,At),Ye.point(l,0),Ye.point(l,-At),Ye.point(0,-At),Ye.point(-l,-At),Ye.point(-l,0),Ye.point(-l,At);else if(p(Te[0]-qe[0])>o){var Gt=Te[0]0,At=p(qe)>o;function Gt(rr,fr,pr,Dr){ds(Dr,Te,rt,pr,rr,fr)}function Kt(rr,fr){return g(rr)*g(fr)>qe}function cr(rr){var fr,pr,Dr,Hr,zi;return{lineStart:function(){Hr=Dr=!1,zi=1},point:function(ki,Vi){var Xi=[ki,Vi],Yr,ai=Kt(ki,Vi),on=Ye?ai?0:Pr(ki,Vi):ai?Pr(ki+(ki<0?l:-l),Vi):0;if(!fr&&(Hr=Dr=ai)&&rr.lineStart(),ai!==Dr&&(Yr=mr(fr,Xi),(!Yr||ka(fr,Yr)||ka(Xi,Yr))&&(Xi[2]=1)),ai!==Dr)zi=0,ai?(rr.lineStart(),Yr=mr(Xi,fr),rr.point(Yr[0],Yr[1])):(Yr=mr(fr,Xi),rr.point(Yr[0],Yr[1],2),rr.lineEnd()),fr=Yr;else if(At&&fr&&Ye^ai){var En;!(on&pr)&&(En=mr(Xi,fr,!0))&&(zi=0,Ye?(rr.lineStart(),rr.point(En[0][0],En[0][1]),rr.point(En[1][0],En[1][1]),rr.lineEnd()):(rr.point(En[1][0],En[1][1]),rr.lineEnd(),rr.lineStart(),rr.point(En[0][0],En[0][1],3)))}ai&&(!fr||!ka(fr,Xi))&&rr.point(Xi[0],Xi[1]),fr=Xi,Dr=ai,pr=on},lineEnd:function(){Dr&&rr.lineEnd(),fr=null},clean:function(){return zi|(Hr&&Dr)<<1}}}function mr(rr,fr,pr){var Dr=te(rr),Hr=te(fr),zi=[1,0,0],ki=ge(Dr,Hr),Vi=ce(ki,ki),Xi=ki[0],Yr=Vi-Xi*Xi;if(!Yr)return!pr&&rr;var ai=qe*Vi/Yr,on=-qe*Xi/Yr,En=ge(zi,ki),ga=be(zi,ai),$a=be(ki,on);Ce(ga,$a);var Ca=En,xo=ce(ga,Ca),aa=ce(Ca,Ca),fl=xo*xo-aa*(ce(ga,ga)-1);if(!(fl<0)){var ns=A(fl),po=be(Ca,(-xo-ns)/aa);if(Ce(po,ga),po=Q(po),!pr)return po;var di=rr[0],Sa=fr[0],ks=rr[1],bl=fr[1],Au;Sa0^po[1]<(p(po[0]-di)l^(di<=po[0]&&po[0]<=Sa)){var Yu=be(Ca,(-xo+ns)/aa);return Ce(Yu,ga),[po,Q(Yu)]}}}function Pr(rr,fr){var pr=Ye?Te:l-Te,Dr=0;return rr<-pr?Dr|=1:rr>pr&&(Dr|=2),fr<-pr?Dr|=4:fr>pr&&(Dr|=8),Dr}return ul(Kt,cr,Gt,Ye?[0,-Te]:[-l,Te-l])}function Wt(Te,qe,rt,Ye,At,Gt){var Kt=Te[0],cr=Te[1],mr=qe[0],Pr=qe[1],rr=0,fr=1,pr=mr-Kt,Dr=Pr-cr,Hr;if(Hr=rt-Kt,!(!pr&&Hr>0)){if(Hr/=pr,pr<0){if(Hr0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}if(Hr=At-Kt,!(!pr&&Hr<0)){if(Hr/=pr,pr<0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}else if(pr>0){if(Hr0)){if(Hr/=Dr,Dr<0){if(Hr0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}if(Hr=Gt-cr,!(!Dr&&Hr<0)){if(Hr/=Dr,Dr<0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}else if(Dr>0){if(Hr0&&(Te[0]=Kt+rr*pr,Te[1]=cr+rr*Dr),fr<1&&(qe[0]=Kt+fr*pr,qe[1]=cr+fr*Dr),!0}}}}}var br=1e9,Xr=-br;function ti(Te,qe,rt,Ye){function At(Pr,rr){return Te<=Pr&&Pr<=rt&&qe<=rr&&rr<=Ye}function Gt(Pr,rr,fr,pr){var Dr=0,Hr=0;if(Pr==null||(Dr=Kt(Pr,fr))!==(Hr=Kt(rr,fr))||mr(Pr,rr)<0^fr>0)do pr.point(Dr===0||Dr===3?Te:rt,Dr>1?Ye:qe);while((Dr=(Dr+fr+4)%4)!==Hr);else pr.point(rr[0],rr[1])}function Kt(Pr,rr){return p(Pr[0]-Te)0?0:3:p(Pr[0]-rt)0?2:1:p(Pr[1]-qe)0?1:0:rr>0?3:2}function cr(Pr,rr){return mr(Pr.x,rr.x)}function mr(Pr,rr){var fr=Kt(Pr,1),pr=Kt(rr,1);return fr!==pr?fr-pr:fr===0?rr[1]-Pr[1]:fr===1?Pr[0]-rr[0]:fr===2?Pr[1]-rr[1]:rr[0]-Pr[0]}return function(Pr){var rr=Pr,fr=ho(),pr,Dr,Hr,zi,ki,Vi,Xi,Yr,ai,on,En,ga={point:$a,lineStart:fl,lineEnd:ns,polygonStart:xo,polygonEnd:aa};function $a(di,Sa){At(di,Sa)&&rr.point(di,Sa)}function Ca(){for(var di=0,Sa=0,ks=Dr.length;SaYe&&(Th-Hf)*(Ye-Yu)>(Ah-Yu)*(Te-Hf)&&++di:Ah<=Ye&&(Th-Hf)*(Ye-Yu)<(Ah-Yu)*(Te-Hf)&&--di;return di}function xo(){rr=fr,pr=[],Dr=[],En=!0}function aa(){var di=Ca(),Sa=En&&di,ks=(pr=t.merge(pr)).length;(Sa||ks)&&(Pr.polygonStart(),Sa&&(Pr.lineStart(),Gt(null,null,1,Pr),Pr.lineEnd()),ks&&zs(pr,cr,di,Gt,Pr),Pr.polygonEnd()),rr=Pr,pr=Dr=Hr=null}function fl(){ga.point=po,Dr&&Dr.push(Hr=[]),on=!0,ai=!1,Xi=Yr=NaN}function ns(){pr&&(po(zi,ki),Vi&&ai&&fr.rejoin(),pr.push(fr.result())),ga.point=$a,ai&&rr.lineEnd()}function po(di,Sa){var ks=At(di,Sa);if(Dr&&Hr.push([di,Sa]),on)zi=di,ki=Sa,Vi=ks,on=!1,ks&&(rr.lineStart(),rr.point(di,Sa));else if(ks&&ai)rr.point(di,Sa);else{var bl=[Xi=Math.max(Xr,Math.min(br,Xi)),Yr=Math.max(Xr,Math.min(br,Yr))],Au=[di=Math.max(Xr,Math.min(br,di)),Sa=Math.max(Xr,Math.min(br,Sa))];Wt(bl,Au,Te,qe,rt,Ye)?(ai||(rr.lineStart(),rr.point(bl[0],bl[1])),rr.point(Au[0],Au[1]),ks||rr.lineEnd(),En=!1):ks&&(rr.lineStart(),rr.point(di,Sa),En=!1)}Xi=di,Yr=Sa,ai=ks}return ga}}function Mi(){var Te=0,qe=0,rt=960,Ye=500,At,Gt,Kt;return Kt={stream:function(cr){return At&&Gt===cr?At:At=ti(Te,qe,rt,Ye)(Gt=cr)},extent:function(cr){return arguments.length?(Te=+cr[0][0],qe=+cr[0][1],rt=+cr[1][0],Ye=+cr[1][1],At=Gt=null,Kt):[[Te,qe],[rt,Ye]]}}}var an=r(),Gn,yn,fa,Wn={sphere:k,point:k,lineStart:Ja,lineEnd:k,polygonStart:k,polygonEnd:k};function Ja(){Wn.point=Ao,Wn.lineEnd=oo}function oo(){Wn.point=Wn.lineEnd=k}function Ao(Te,qe){Te*=d,qe*=d,Gn=Te,yn=x(qe),fa=g(qe),Wn.point=Io}function Io(Te,qe){Te*=d,qe*=d;var rt=x(qe),Ye=g(qe),At=p(Te-Gn),Gt=g(At),Kt=x(At),cr=Ye*Kt,mr=fa*rt-yn*Ye*Gt,Pr=yn*rt+fa*Ye*Gt;an.add(m(A(cr*cr+mr*mr),Pr)),Gn=Te,yn=rt,fa=Ye}function ps(Te){return an.reset(),I(Te,Wn),+an}var rs=[null,null],Mo={type:"LineString",coordinates:rs};function is(Te,qe){return rs[0]=Te,rs[1]=qe,ps(Mo)}var Ro={Feature:function(Te,qe){return so(Te.geometry,qe)},FeatureCollection:function(Te,qe){for(var rt=Te.features,Ye=-1,At=rt.length;++Ye0&&(At=is(Te[Gt],Te[Gt-1]),At>0&&rt<=At&&Ye<=At&&(rt+Ye-At)*(1-Math.pow((rt-Ye)/At,2))o}).map(pr)).concat(t.range(w(Gt/Pr)*Pr,At,Pr).filter(function(Yr){return p(Yr%fr)>o}).map(Dr))}return Vi.lines=function(){return Xi().map(function(Yr){return{type:"LineString",coordinates:Yr}})},Vi.outline=function(){return{type:"Polygon",coordinates:[Hr(Ye).concat(zi(Kt).slice(1),Hr(rt).reverse().slice(1),zi(cr).reverse().slice(1))]}},Vi.extent=function(Yr){return arguments.length?Vi.extentMajor(Yr).extentMinor(Yr):Vi.extentMinor()},Vi.extentMajor=function(Yr){return arguments.length?(Ye=+Yr[0][0],rt=+Yr[1][0],cr=+Yr[0][1],Kt=+Yr[1][1],Ye>rt&&(Yr=Ye,Ye=rt,rt=Yr),cr>Kt&&(Yr=cr,cr=Kt,Kt=Yr),Vi.precision(ki)):[[Ye,cr],[rt,Kt]]},Vi.extentMinor=function(Yr){return arguments.length?(qe=+Yr[0][0],Te=+Yr[1][0],Gt=+Yr[0][1],At=+Yr[1][1],qe>Te&&(Yr=qe,qe=Te,Te=Yr),Gt>At&&(Yr=Gt,Gt=At,At=Yr),Vi.precision(ki)):[[qe,Gt],[Te,At]]},Vi.step=function(Yr){return arguments.length?Vi.stepMajor(Yr).stepMinor(Yr):Vi.stepMinor()},Vi.stepMajor=function(Yr){return arguments.length?(rr=+Yr[0],fr=+Yr[1],Vi):[rr,fr]},Vi.stepMinor=function(Yr){return arguments.length?(mr=+Yr[0],Pr=+Yr[1],Vi):[mr,Pr]},Vi.precision=function(Yr){return arguments.length?(ki=+Yr,pr=Js(Gt,At,90),Dr=ru(qe,Te,ki),Hr=Js(cr,Kt,90),zi=ru(Ye,rt,ki),Vi):ki},Vi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return xu()()}function dc(Te,qe){var rt=Te[0]*d,Ye=Te[1]*d,At=qe[0]*d,Gt=qe[1]*d,Kt=g(Ye),cr=x(Ye),mr=g(Gt),Pr=x(Gt),rr=Kt*g(rt),fr=Kt*x(rt),pr=mr*g(At),Dr=mr*x(At),Hr=2*S(A(C(Gt-Ye)+Kt*mr*C(At-rt))),zi=x(Hr),ki=Hr?function(Vi){var Xi=x(Vi*=Hr)/zi,Yr=x(Hr-Vi)/zi,ai=Yr*rr+Xi*pr,on=Yr*fr+Xi*Dr,En=Yr*cr+Xi*Pr;return[m(on,ai)*h,m(En,A(ai*ai+on*on))*h]}:function(){return[rt*h,Ye*h]};return ki.distance=Hr,ki}function Nl(Te){return Te}var ja=r(),bu=r(),Hu,Ss,iu,ph,yo={point:k,lineStart:k,lineEnd:k,polygonStart:function(){yo.lineStart=nu,yo.lineEnd=Cv},polygonEnd:function(){yo.lineStart=yo.lineEnd=yo.point=k,ja.add(p(bu)),bu.reset()},result:function(){var Te=ja/2;return ja.reset(),Te}};function nu(){yo.point=Zo}function Zo(Te,qe){yo.point=au,Hu=iu=Te,Ss=ph=qe}function au(Te,qe){bu.add(ph*Te-iu*qe),iu=Te,ph=qe}function Cv(){au(Hu,Ss)}var Nc=1/0,r0=Nc,Of=-Nc,vh=Of,Nf={point:i0,lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k,result:function(){var Te=[[Nc,r0],[Of,vh]];return Of=vh=-(r0=Nc=1/0),Te}};function i0(Te,qe){TeOf&&(Of=Te),qevh&&(vh=qe)}var Dv=0,gh=0,up=0,n0=0,j0=0,$0=0,Fv=0,Lv=0,Uc=0,cp,mh,ju,Es,Vo={point:wu,lineStart:W0,lineEnd:Pv,polygonStart:function(){Vo.lineStart=ug,Vo.lineEnd=Wm},polygonEnd:function(){Vo.point=wu,Vo.lineStart=W0,Vo.lineEnd=Pv},result:function(){var Te=Uc?[Fv/Uc,Lv/Uc]:$0?[n0/$0,j0/$0]:up?[Dv/up,gh/up]:[NaN,NaN];return Dv=gh=up=n0=j0=$0=Fv=Lv=Uc=0,Te}};function wu(Te,qe){Dv+=Te,gh+=qe,++up}function W0(){Vo.point=yh}function yh(Te,qe){Vo.point=a0,wu(ju=Te,Es=qe)}function a0(Te,qe){var rt=Te-ju,Ye=qe-Es,At=A(rt*rt+Ye*Ye);n0+=At*(ju+Te)/2,j0+=At*(Es+qe)/2,$0+=At,wu(ju=Te,Es=qe)}function Pv(){Vo.point=wu}function ug(){Vo.point=Tx}function Wm(){xh(cp,mh)}function Tx(Te,qe){Vo.point=xh,wu(cp=ju=Te,mh=Es=qe)}function xh(Te,qe){var rt=Te-ju,Ye=qe-Es,At=A(rt*rt+Ye*Ye);n0+=At*(ju+Te)/2,j0+=At*(Es+qe)/2,$0+=At,At=Es*Te-ju*qe,Fv+=At*(ju+Te),Lv+=At*(Es+qe),Uc+=At*3,wu(ju=Te,Es=qe)}function Bs(Te){this._context=Te}Bs.prototype={_radius:4.5,pointRadius:function(Te){return this._radius=Te,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(Te,qe){switch(this._point){case 0:{this._context.moveTo(Te,qe),this._point=1;break}case 1:{this._context.lineTo(Te,qe);break}default:{this._context.moveTo(Te+this._radius,qe),this._context.arc(Te,qe,this._radius,0,f);break}}},result:k};var Iv=r(),Rv,_h,cg,Y0,fp,hf={point:k,lineStart:function(){hf.point=zv},lineEnd:function(){Rv&&hp(_h,cg),hf.point=k},polygonStart:function(){Rv=!0},polygonEnd:function(){Rv=null},result:function(){var Te=+Iv;return Iv.reset(),Te}};function zv(Te,qe){hf.point=hp,_h=Y0=Te,cg=fp=qe}function hp(Te,qe){Y0-=Te,fp-=qe,Iv.add(A(Y0*Y0+fp*fp)),Y0=Te,fp=qe}function X0(){this._string=[]}X0.prototype={_radius:4.5,_circle:fg(4.5),pointRadius:function(Te){return(Te=+Te)!==this._radius&&(this._radius=Te,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(Te,qe){switch(this._point){case 0:{this._string.push("M",Te,",",qe),this._point=1;break}case 1:{this._string.push("L",Te,",",qe);break}default:{this._circle==null&&(this._circle=fg(this._radius)),this._string.push("M",Te,",",qe,this._circle);break}}},result:function(){if(this._string.length){var Te=this._string.join("");return this._string=[],Te}else return null}};function fg(Te){return"m0,"+Te+"a"+Te+","+Te+" 0 1,1 0,"+-2*Te+"a"+Te+","+Te+" 0 1,1 0,"+2*Te+"z"}function hg(Te,qe){var rt=4.5,Ye,At;function Gt(Kt){return Kt&&(typeof rt=="function"&&At.pointRadius(+rt.apply(this,arguments)),I(Kt,Ye(At))),At.result()}return Gt.area=function(Kt){return I(Kt,Ye(yo)),yo.result()},Gt.measure=function(Kt){return I(Kt,Ye(hf)),hf.result()},Gt.bounds=function(Kt){return I(Kt,Ye(Nf)),Nf.result()},Gt.centroid=function(Kt){return I(Kt,Ye(Vo)),Vo.result()},Gt.projection=function(Kt){return arguments.length?(Ye=Kt==null?(Te=null,Nl):(Te=Kt).stream,Gt):Te},Gt.context=function(Kt){return arguments.length?(At=Kt==null?(qe=null,new X0):new Bs(qe=Kt),typeof rt!="function"&&At.pointRadius(rt),Gt):qe},Gt.pointRadius=function(Kt){return arguments.length?(rt=typeof Kt=="function"?Kt:(At.pointRadius(+Kt),+Kt),Gt):rt},Gt.projection(Te).context(qe)}function Ym(Te){return{stream:Uf(Te)}}function Uf(Te){return function(qe){var rt=new Bv;for(var Ye in Te)rt[Ye]=Te[Ye];return rt.stream=qe,rt}}function Bv(){}Bv.prototype={constructor:Bv,point:function(Te,qe){this.stream.point(Te,qe)},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 Vf(Te,qe,rt){var Ye=Te.clipExtent&&Te.clipExtent();return Te.scale(150).translate([0,0]),Ye!=null&&Te.clipExtent(null),I(rt,Te.stream(Nf)),qe(Nf.result()),Ye!=null&&Te.clipExtent(Ye),Te}function dp(Te,qe,rt){return Vf(Te,function(Ye){var At=qe[1][0]-qe[0][0],Gt=qe[1][1]-qe[0][1],Kt=Math.min(At/(Ye[1][0]-Ye[0][0]),Gt/(Ye[1][1]-Ye[0][1])),cr=+qe[0][0]+(At-Kt*(Ye[1][0]+Ye[0][0]))/2,mr=+qe[0][1]+(Gt-Kt*(Ye[1][1]+Ye[0][1]))/2;Te.scale(150*Kt).translate([cr,mr])},rt)}function pc(Te,qe,rt){return dp(Te,[[0,0],qe],rt)}function Z0(Te,qe,rt){return Vf(Te,function(Ye){var At=+qe,Gt=At/(Ye[1][0]-Ye[0][0]),Kt=(At-Gt*(Ye[1][0]+Ye[0][0]))/2,cr=-Gt*Ye[0][1];Te.scale(150*Gt).translate([Kt,cr])},rt)}function Gf(Te,qe,rt){return Vf(Te,function(Ye){var At=+qe,Gt=At/(Ye[1][1]-Ye[0][1]),Kt=-Gt*Ye[0][0],cr=(At-Gt*(Ye[1][1]+Ye[0][1]))/2;Te.scale(150*Gt).translate([Kt,cr])},rt)}var dg=16,qv=g(30*d);function pg(Te,qe){return+qe?pp(Te,qe):Ov(Te)}function Ov(Te){return Uf({point:function(qe,rt){qe=Te(qe,rt),this.stream.point(qe[0],qe[1])}})}function pp(Te,qe){function rt(Ye,At,Gt,Kt,cr,mr,Pr,rr,fr,pr,Dr,Hr,zi,ki){var Vi=Pr-Ye,Xi=rr-At,Yr=Vi*Vi+Xi*Xi;if(Yr>4*qe&&zi--){var ai=Kt+pr,on=cr+Dr,En=mr+Hr,ga=A(ai*ai+on*on+En*En),$a=S(En/=ga),Ca=p(p(En)-1)qe||p((Vi*ns+Xi*po)/Yr-.5)>.3||Kt*pr+cr*Dr+mr*Hr2?di[2]%360*d:0,ns()):[cr*h,mr*h,Pr*h]},aa.angle=function(di){return arguments.length?(fr=di%360*d,ns()):fr*h},aa.reflectX=function(di){return arguments.length?(pr=di?-1:1,ns()):pr<0},aa.reflectY=function(di){return arguments.length?(Dr=di?-1:1,ns()):Dr<0},aa.precision=function(di){return arguments.length?(En=pg(ga,on=di*di),po()):A(on)},aa.fitExtent=function(di,Sa){return dp(aa,di,Sa)},aa.fitSize=function(di,Sa){return pc(aa,di,Sa)},aa.fitWidth=function(di,Sa){return Z0(aa,di,Sa)},aa.fitHeight=function(di,Sa){return Gf(aa,di,Sa)};function ns(){var di=$u(rt,0,0,pr,Dr,fr).apply(null,qe(Gt,Kt)),Sa=(fr?$u:Xm)(rt,Ye-di[0],At-di[1],pr,Dr,fr);return rr=ta(cr,mr,Pr),ga=Tn(qe,Sa),$a=Tn(rr,ga),En=pg(ga,on),po()}function po(){return Ca=xo=null,aa}return function(){return qe=Te.apply(this,arguments),aa.invert=qe.invert&&fl,ns()}}function Tu(Te){var qe=0,rt=l/3,Ye=vg(Te),At=Ye(qe,rt);return At.parallels=function(Gt){return arguments.length?Ye(qe=Gt[0]*d,rt=Gt[1]*d):[qe*h,rt*h]},At}function vp(Te){var qe=g(Te);function rt(Ye,At){return[Ye*qe,x(At)/qe]}return rt.invert=function(Ye,At){return[Ye/qe,S(At*qe)]},rt}function o0(Te,qe){var rt=x(Te),Ye=(rt+x(qe))/2;if(p(Ye)=.12&&ki<.234&&zi>=-.425&&zi<-.214?At:ki>=.166&&ki<.234&&zi>=-.214&&zi<-.115?Kt:rt).invert(pr)},rr.stream=function(pr){return Te&&qe===pr?Te:Te=Zm([rt.stream(qe=pr),At.stream(pr),Kt.stream(pr)])},rr.precision=function(pr){return arguments.length?(rt.precision(pr),At.precision(pr),Kt.precision(pr),fr()):rt.precision()},rr.scale=function(pr){return arguments.length?(rt.scale(pr),At.scale(pr*.35),Kt.scale(pr),rr.translate(rt.translate())):rt.scale()},rr.translate=function(pr){if(!arguments.length)return rt.translate();var Dr=rt.scale(),Hr=+pr[0],zi=+pr[1];return Ye=rt.translate(pr).clipExtent([[Hr-.455*Dr,zi-.238*Dr],[Hr+.455*Dr,zi+.238*Dr]]).stream(Pr),Gt=At.translate([Hr-.307*Dr,zi+.201*Dr]).clipExtent([[Hr-.425*Dr+o,zi+.12*Dr+o],[Hr-.214*Dr-o,zi+.234*Dr-o]]).stream(Pr),cr=Kt.translate([Hr-.205*Dr,zi+.212*Dr]).clipExtent([[Hr-.214*Dr+o,zi+.166*Dr+o],[Hr-.115*Dr-o,zi+.234*Dr-o]]).stream(Pr),fr()},rr.fitExtent=function(pr,Dr){return dp(rr,pr,Dr)},rr.fitSize=function(pr,Dr){return pc(rr,pr,Dr)},rr.fitWidth=function(pr,Dr){return Z0(rr,pr,Dr)},rr.fitHeight=function(pr,Dr){return Gf(rr,pr,Dr)};function fr(){return Te=qe=null,rr}return rr.scale(1070)}function df(Te){return function(qe,rt){var Ye=g(qe),At=g(rt),Gt=Te(Ye*At);return[Gt*At*x(qe),Gt*x(rt)]}}function pf(Te){return function(qe,rt){var Ye=A(qe*qe+rt*rt),At=Te(Ye),Gt=x(At),Kt=g(At);return[m(qe*Gt,Ye*Kt),S(Ye&&rt*Gt/Ye)]}}var Wu=df(function(Te){return A(2/(1+Te))});Wu.invert=pf(function(Te){return 2*S(Te/2)});function Ax(){return Vc(Wu).scale(124.75).clipAngle(180-.001)}var K0=df(function(Te){return(Te=E(Te))&&Te/x(Te)});K0.invert=pf(function(Te){return Te});function Jm(){return Vc(K0).scale(79.4188).clipAngle(180-.001)}function vc(Te,qe){return[Te,_(y((u+qe)/2))]}vc.invert=function(Te,qe){return[Te,2*v(b(qe))-u]};function Vv(){return gp(vc).scale(961/f)}function gp(Te){var qe=Vc(Te),rt=qe.center,Ye=qe.scale,At=qe.translate,Gt=qe.clipExtent,Kt=null,cr,mr,Pr;qe.scale=function(fr){return arguments.length?(Ye(fr),rr()):Ye()},qe.translate=function(fr){return arguments.length?(At(fr),rr()):At()},qe.center=function(fr){return arguments.length?(rt(fr),rr()):rt()},qe.clipExtent=function(fr){return arguments.length?(fr==null?Kt=cr=mr=Pr=null:(Kt=+fr[0][0],cr=+fr[0][1],mr=+fr[1][0],Pr=+fr[1][1]),rr()):Kt==null?null:[[Kt,cr],[mr,Pr]]};function rr(){var fr=l*Ye(),pr=qe(ra(qe.rotate()).invert([0,0]));return Gt(Kt==null?[[pr[0]-fr,pr[1]-fr],[pr[0]+fr,pr[1]+fr]]:Te===vc?[[Math.max(pr[0]-fr,Kt),cr],[Math.min(pr[0]+fr,mr),Pr]]:[[Kt,Math.max(pr[1]-fr,cr)],[mr,Math.min(pr[1]+fr,Pr)]])}return rr()}function mp(Te){return y((u+Te)/2)}function Qm(Te,qe){var rt=g(Te),Ye=Te===qe?x(Te):_(rt/g(qe))/_(mp(qe)/mp(Te)),At=rt*M(mp(Te),Ye)/Ye;if(!Ye)return vc;function Gt(Kt,cr){At>0?cr<-u+o&&(cr=-u+o):cr>u-o&&(cr=u-o);var mr=At/M(mp(cr),Ye);return[mr*x(Ye*Kt),At-mr*g(Ye*Kt)]}return Gt.invert=function(Kt,cr){var mr=At-cr,Pr=T(Ye)*A(Kt*Kt+mr*mr),rr=m(Kt,p(mr))*T(mr);return mr*Ye<0&&(rr-=l*T(Kt)*T(mr)),[rr/Ye,2*v(M(At/Pr,1/Ye))-u]},Gt}function yp(){return Tu(Qm).scale(109.5).parallels([30,30])}function wh(Te,qe){return[Te,qe]}wh.invert=wh;function J0(){return Vc(wh).scale(152.63)}function xp(Te,qe){var rt=g(Te),Ye=Te===qe?x(Te):(rt-g(qe))/(qe-Te),At=rt/Ye+Te;if(p(Ye)o&&--Ye>0);return[Te/(.8707+(Gt=rt*rt)*(-.131979+Gt*(-.013791+Gt*Gt*Gt*(.003971-.001529*Gt)))),rt]};function Hv(){return Vc(yg).scale(175.295)}function cl(Te,qe){return[g(qe)*x(Te),x(qe)]}cl.invert=pf(S);function Gc(){return Vc(cl).scale(249.5).clipAngle(90+o)}function Tp(Te,qe){var rt=g(qe),Ye=1+g(Te)*rt;return[rt*x(Te)/Ye,x(qe)/Ye]}Tp.invert=pf(function(Te){return 2*v(Te)});function xg(){return Vc(Tp).scale(250).clipAngle(142)}function Ap(Te,qe){return[_(y((u+qe)/2)),-Te]}Ap.invert=function(Te,qe){return[-qe,2*v(b(Te))-u]};function Mp(){var Te=gp(Ap),qe=Te.center,rt=Te.rotate;return Te.center=function(Ye){return arguments.length?qe([-Ye[1],Ye[0]]):(Ye=qe(),[Ye[1],-Ye[0]])},Te.rotate=function(Ye){return arguments.length?rt([Ye[0],Ye[1],Ye.length>2?Ye[2]+90:90]):(Ye=rt(),[Ye[0],Ye[1],Ye[2]-90])},rt([0,0,90]).scale(159.155)}e.geoAlbers=gg,e.geoAlbersUsa=Km,e.geoArea=G,e.geoAzimuthalEqualArea=Ax,e.geoAzimuthalEqualAreaRaw=Wu,e.geoAzimuthalEquidistant=Jm,e.geoAzimuthalEquidistantRaw=K0,e.geoBounds=mt,e.geoCentroid=Lr,e.geoCircle=Rs,e.geoClipAntimeridian=lt,e.geoClipCircle=Tr,e.geoClipExtent=Mi,e.geoClipRectangle=ti,e.geoConicConformal=yp,e.geoConicConformalRaw=Qm,e.geoConicEqualArea=bh,e.geoConicEqualAreaRaw=o0,e.geoConicEquidistant=ey,e.geoConicEquidistantRaw=xp,e.geoContains=Ol,e.geoDistance=is,e.geoEqualEarth=mg,e.geoEqualEarthRaw=wp,e.geoEquirectangular=J0,e.geoEquirectangularRaw=wh,e.geoGnomonic=ty,e.geoGnomonicRaw=Gv,e.geoGraticule=xu,e.geoGraticule10=_u,e.geoIdentity=ry,e.geoInterpolate=dc,e.geoLength=ps,e.geoMercator=Vv,e.geoMercatorRaw=vc,e.geoNaturalEarth1=Hv,e.geoNaturalEarth1Raw=yg,e.geoOrthographic=Gc,e.geoOrthographicRaw=cl,e.geoPath=hg,e.geoProjection=Vc,e.geoProjectionMutator=vg,e.geoRotation=ra,e.geoStereographic=xg,e.geoStereographicRaw=Tp,e.geoStream=I,e.geoTransform=Ym,e.geoTransverseMercator=Mp,e.geoTransverseMercatorRaw=Ap,Object.defineProperty(e,"__esModule",{value:!0})}))});var tVe=W((Cjr,eVe)=>{"use strict";var QUe={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"},trr=new Set(Object.values(QUe));eVe.exports={usaLocationAbbreviations:trr,usaLocationList:QUe}});var rVe={};Fp(rVe,{COUNTRIES_X:()=>rrr});var rrr,iVe=Ea(()=>{"use strict";rrr=[{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 cm=W((Djr,oVe)=>{"use strict";var irr=vi(),{COUNTRIES:nrr,createLookup:arr}=PUe(),{area:orr}=WUe(),{centroid:srr}=XUe(),{coordAll:lrr}=OI(),{geoBounds:urr}=HI(),crr=tA(),S2=Eg(),frr=oy(),hrr=k6(),jI=GA(),{usaLocationAbbreviations:drr,usaLocationList:prr}=tVe(),{COUNTRIES_X:vrr}=(iVe(),Go(rVe)),{lookupAlpha3:grr}=arr([...nrr,...vrr]),mrr={"ISO-3":crr,"USA-states":xrr,"country names":yrr};function yrr(e){let t=grr(e);return t||(S2.log("Unrecognized country name: "+e+"."),!1)}function xrr(e){e=e.trim();let t=drr.has(e.toUpperCase())?e.toUpperCase():prr[e.toLowerCase()];return t||(S2.log("Unrecognized US location: "+e+"."),!1)}function _rr(e,t,r){var n;if(!t||typeof t!="string")return!1;let i=mrr[e](t);if(i){let a;if(e==="USA-states"){a=[];for(let o of r)((n=o==null?void 0:o.properties)==null?void 0:n.gu)==="USA"&&a.push(o)}else a=r;for(let o of a)if(o.id===i)return o;S2.log(`Location with id ${i} does not have a matching topojson feature at this resolution.`)}return!1}var $I=360;function tQ(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function brr(e){var t=e.geometry,r=t.coordinates,i=e.id,n=[],a,o,s,l;switch(i==="RUS"||i==="FJI"?a=function(u){var c;if(tQ(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[h++]=[u[l][0]+$I,u[l][1]]:l===c?(f[h++]=u[l],f[h++]=[u[l][0],-90]):f[h++]=u[l];var d=jI.tester(f);d.pts.pop(),n.push(d)}:a=function(u){n.push(jI.tester(u))},t.type){case"MultiPolygon":for(o=0;on&&(n=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:srr(r).geometry.coordinates}function Arr(e){var t=window.PlotlyGeoAssets||{},r=[];function i(l){return new Promise(function(u,c){irr.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function n(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;anQ(iQ(e));function iQ(e){try{return lrr(e)}catch(t){return[]}}function nQ(e){if(e.length===0)return null;if(e.length===1){let[a,o]=e[0];return[a,o,a,o]}let[[t,r],[i,n]]=urr({type:"MultiPoint",coordinates:e});return[t,r,aVe([t,i])[1],n]}var Srr=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",nVe=(e,t)=>Srr(e,t)?iQ(rQ(e)):[],Err=(e,t)=>nQ(nVe(e,t));function aVe([e,t]){return[e,e>t?t+$I:t]}oVe.exports={locationToFeature:_rr,feature2polygons:brr,getTraceGeojson:rQ,extractTraceFeature:wrr,fetchTraceGeoData:Arr,boundsOfCoords:nQ,computeBbox:Mrr,coordsOf:iQ,doesCrossAntiMeridian:tQ,fitGeojsonBbox:Err,fitGeojsonCoords:nVe,unwrapLonRange:aVe,ANTIMERIDIAN_LON_SHIFT:$I}});var aQ=W((Fjr,uVe)=>{"use strict";var krr=vi(),Crr=Ji(),sVe=ni(),lVe=th(),Drr=lVe.stylePoints,Frr=lVe.styleText;uVe.exports=function(t,r){r&&Lrr(t,r)};function Lrr(e,t){var r=t[0].trace,i=t[0].node3;i.style("opacity",t[0].trace.opacity),Drr(i,r,e),Frr(i,r,e),i.selectAll("path.js-line").style("fill","none").each(function(n){var a=krr.select(this),o=n.trace,s=o.line||{};a.call(sVe.stroke,s.color).call(Crr.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(sVe.fill,o.fillcolor)})}});var XI=W((Ljr,hVe)=>{"use strict";var cVe=vi(),WI=it(),Prr=II().getTopojsonFeatures,oQ=dE(),YI=cm(),fVe=Op().findExtremes,lQ=Kn().BADNUM,Irr=Td().calcMarkerSize,sQ=$o(),Rrr=aQ();function zrr(e,t,r){var i=t.layers.frontplot.select(".scatterlayer"),n=WI.makeTraceGroups(i,r,"trace scattergeo");function a(o,s){o.lonlat[0]===lQ&&cVe.select(s).remove()}n.selectAll("*").remove(),n.each(function(o){var s=cVe.select(this),l=o[0].trace;if(sQ.hasLines(l)||l.fill!=="none"){var u=oQ.calcTraceToLineCoords(o),c=l.fill!=="none"?oQ.makePolygon(u):oQ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}sQ.hasMarkers(l)&&s.selectAll("path.point").data(WI.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),sQ.hasText(l)&&s.selectAll("g").data(WI.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Rrr(e,o)})}function Brr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r._length,o,s;if(WI.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?YI.extractTraceFeature(e):Prr(r,n.topojson);for(o=0;o{"use strict";var Orr=Ds(),Nrr=Kn().BADNUM,Urr=Xw(),Vrr=it().fillText,Grr=I4();dVe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(w){var b=w.lonlat;if(b[0]===Nrr||u(b))return 1/0;var _=c(b),M=c([r,i]),x=Math.abs(_[0]-M[0]),T=Math.abs(_[1]-M[1]),A=Math.max(3,w.mrc||0);return Math.max(Math.sqrt(x*x+T*T)-A,1-3/A)}if(Orr.getClosest(n,f,t),t.index!==!1){var h=n[t.index],d=h.lonlat,p=[o.c2p(d),s.c2p(d)],v=h.mrc||1;t.x0=p[0]-v,t.x1=p[0]+v,t.y0=p[1]-v,t.y1=p[1]+v,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var m={};m[a.geo]={_subplot:l};var g=a._module.formatLabels(h,a,m);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=Urr(a,h),t.extraText=Hrr(a,h,t,n[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Hrr(e,t,r,i){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n==="all"?Grr.hoverinfo.flags:n.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(i.lon+f(r.lonLabel)):l&&c.push(i.lat+f(r.latLabel)),u&&Vrr(t,e,c),c.join("
")}});var gVe=W((Ijr,vVe)=>{"use strict";vVe.exports=function(t,r,i,n,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var xVe=W((Rjr,yVe)=>{"use strict";var mVe=$o(),jrr=Kn().BADNUM;yVe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h,d=!mVe.hasMarkers(s)&&!mVe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof ZI=="object"&&typeof _Ve!="undefined"?ZI:e.d3=e.d3||{})})(ZI,(function(e){"use strict";function t(U,V){return UV?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);XU?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H=G)for(Q=te=G;++HG&&(Q=G),te=G)for(Q=te=G;++HG&&(Q=G),te0)return[U];if((H=V0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),Vhe;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HQ&&(Q=G)}else for(;++H=G)for(Q=G;++HQ&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HG&&(Q=G)}else for(;++H=G)for(Q=G;++HG&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H{(function(e,t){typeof KI=="object"&&typeof wVe!="undefined"?t(KI,HI(),bVe()):t(e.d3=e.d3||{},e.d3,e.d3)})(KI,(function(e,t,r){"use strict";var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,p=Math.sign||function(ie){return ie>0?1:ie<0?-1:0},v=Math.sin,m=Math.tan,g=1e-6,w=1e-12,b=Math.PI,_=b/2,M=b/4,x=Math.SQRT1_2,T=F(2),A=F(b),y=b*2,E=180/b,S=b/180;function C(ie){return ie?ie/Math.sin(ie):1}function k(ie){return ie>1?_:ie<-1?-_:Math.asin(ie)}function D(ie){return ie>1?0:ie<-1?b:Math.acos(ie)}function F(ie){return ie>0?Math.sqrt(ie):0}function P(ie){return ie=s(2*ie),(ie-1)/(ie+1)}function R(ie){return(s(ie)-s(-ie))/2}function L(ie){return(s(ie)+s(-ie))/2}function I(ie){return u(ie+F(ie*ie+1))}function B(ie){return u(ie+F(ie*ie-1))}function O(ie){var se=m(ie/2),de=2*u(o(ie/2))/(se*se);function ve(Me,Ae){var Pe=o(Me),Ke=o(Ae),nt=v(Ae),Ze=Ke*Pe,at=-((1-Ze?u((1+Ze)/2)/(1-Ze):-.5)+de/(1+Ze));return[at*Ke*v(Me),at*nt]}return ve.invert=function(Me,Ae){var Pe=F(Me*Me+Ae*Ae),Ke=-ie/2,nt=50,Ze;if(!Pe)return[0,0];do{var at=Ke/2,yt=o(at),Pt=v(at),Ut=Pt/yt,ar=-u(i(yt));Ke-=Ze=(2/Ut*ar-de*Ut-Pe)/(-ar/(Pt*Pt)+1-de/(2*yt*yt))*(yt<0?.7:1)}while(i(Ze)>g&&--nt>0);var Ar=v(Ke);return[a(Me*Ar,Pe*o(Ke)),k(Ae*Ar/Pe)]},ve}function $(){var ie=_,se=t.geoProjectionMutator(O),de=se(ie);return de.radius=function(ve){return arguments.length?se(ie=ve*S):ie*E},de.scale(179.976).clipAngle(147)}function Y(ie,se){var de=o(se),ve=C(D(de*o(ie/=2)));return[2*de*v(ie)*ve,v(se)*ve]}Y.invert=function(ie,se){if(!(ie*ie+4*se*se>b*b+g)){var de=ie,ve=se,Me=25;do{var Ae=v(de),Pe=v(de/2),Ke=o(de/2),nt=v(ve),Ze=o(ve),at=v(2*ve),yt=nt*nt,Pt=Ze*Ze,Ut=Pe*Pe,ar=1-Pt*Ke*Ke,Ar=ar?D(Ze*Ke)*F(Vr=1/ar):Vr=0,Vr,_i=2*Ar*Ze*Pe-ie,rn=Ar*nt-se,cn=Vr*(Pt*Ut+Ar*Ze*Ke*yt),xn=Vr*(.5*Ae*at-Ar*2*nt*Pe),Dn=Vr*.25*(at*Pe-Ar*nt*Pt*Ae),Qa=Vr*(yt*Ke+Ar*Ut*Ze),So=xn*Dn-Qa*cn;if(!So)break;var oa=(rn*xn-_i*Qa)/So,as=(_i*Dn-rn*cn)/So;de-=oa,ve-=as}while((i(oa)>g||i(as)>g)&&--Me>0);return[de,ve]}};function K(){return t.geoProjection(Y).scale(152.63)}function j(ie){var se=v(ie),de=o(ie),ve=ie>=0?1:-1,Me=m(ve*ie),Ae=(1+se-de)/2;function Pe(Ke,nt){var Ze=o(nt),at=o(Ke/=2);return[(1+Ze)*v(Ke),(ve*nt>-a(at,Me)-.001?0:-ve*10)+Ae+v(nt)*de-(1+Ze)*se*at]}return Pe.invert=function(Ke,nt){var Ze=0,at=0,yt=50;do{var Pt=o(Ze),Ut=v(Ze),ar=o(at),Ar=v(at),Vr=1+ar,_i=Vr*Ut-Ke,rn=Ae+Ar*de-Vr*se*Pt-nt,cn=Vr*Pt/2,xn=-Ut*Ar,Dn=se*Vr*Ut/2,Qa=de*ar+se*Pt*Ar,So=xn*Dn-Qa*cn,oa=(rn*xn-_i*Qa)/So/2,as=(_i*Dn-rn*cn)/So;i(as)>2&&(as/=2),Ze-=oa,at-=as}while((i(oa)>g||i(as)>g)&&--yt>0);return ve*at>-a(o(Ze),Me)-.001?[Ze*2,at]:null},Pe}function q(){var ie=20*S,se=ie>=0?1:-1,de=m(se*ie),ve=t.geoProjectionMutator(j),Me=ve(ie),Ae=Me.stream;return Me.parallel=function(Pe){return arguments.length?(de=m((se=(ie=Pe*S)>=0?1:-1)*ie),ve(ie)):ie*E},Me.stream=function(Pe){var Ke=Me.rotate(),nt=Ae(Pe),Ze=(Me.rotate([0,0]),Ae(Pe)),at=Me.precision();return Me.rotate(Ke),nt.sphere=function(){Ze.polygonStart(),Ze.lineStart();for(var yt=se*-180;se*yt<180;yt+=se*90)Ze.point(yt,se*90);if(ie)for(;se*(yt-=3*se*at)>=-180;)Ze.point(yt,se*-a(o(yt*S/2),de)*E);Ze.lineEnd(),Ze.polygonEnd()},nt},Me.scale(218.695).center([0,28.0974])}function J(ie,se){var de=m(se/2),ve=F(1-de*de),Me=1+ve*o(ie/=2),Ae=v(ie)*ve/Me,Pe=de/Me,Ke=Ae*Ae,nt=Pe*Pe;return[4/3*Ae*(3+Ke-3*nt),4/3*Pe*(3+3*Ke-nt)]}J.invert=function(ie,se){if(ie*=3/8,se*=3/8,!ie&&i(se)>1)return null;var de=ie*ie,ve=se*se,Me=1+de+ve,Ae=F((Me-F(Me*Me-4*se*se))/2),Pe=k(Ae)/3,Ke=Ae?B(i(se/Ae))/3:I(i(ie))/3,nt=o(Pe),Ze=L(Ke),at=Ze*Ze-nt*nt;return[p(ie)*2*a(R(Ke)*nt,.25-at),p(se)*2*a(Ze*v(Pe),.25+at)]};function U(){return t.geoProjection(J).scale(66.1603)}var V=F(8),X=u(1+T);function H(ie,se){var de=i(se);return dew&&--ve>0);return[ie/(o(de)*(V-1/v(de))),p(se)*de]};function G(){return t.geoProjection(H).scale(112.314)}function Q(ie){var se=2*b/ie;function de(ve,Me){var Ae=t.geoAzimuthalEquidistantRaw(ve,Me);if(i(ve)>_){var Pe=a(Ae[1],Ae[0]),Ke=F(Ae[0]*Ae[0]+Ae[1]*Ae[1]),nt=se*d((Pe-_)/se)+_,Ze=a(v(Pe-=nt),2-o(Pe));Pe=nt+k(b/Ke*v(Ze))-Ze,Ae[0]=Ke*o(Pe),Ae[1]=Ke*v(Pe)}return Ae}return de.invert=function(ve,Me){var Ae=F(ve*ve+Me*Me);if(Ae>_){var Pe=a(Me,ve),Ke=se*d((Pe-_)/se)+_,nt=Pe>Ke?-1:1,Ze=Ae*o(Ke-Pe),at=1/m(nt*D((Ze-b)/F(b*(b-2*Ze)+Ae*Ae)));Pe=Ke+2*n((at+nt*F(at*at-3))/3),ve=Ae*o(Pe),Me=Ae*v(Pe)}return t.geoAzimuthalEquidistantRaw.invert(ve,Me)},de}function te(){var ie=5,se=t.geoProjectionMutator(Q),de=se(ie),ve=de.stream,Me=.01,Ae=-o(Me*S),Pe=v(Me*S);return de.lobes=function(Ke){return arguments.length?se(ie=+Ke):ie},de.stream=function(Ke){var nt=de.rotate(),Ze=ve(Ke),at=(de.rotate([0,0]),ve(Ke));return de.rotate(nt),Ze.sphere=function(){at.polygonStart(),at.lineStart();for(var yt=0,Pt=360/ie,Ut=2*b/ie,ar=90-180/ie,Ar=_;yt0&&i(Me)>g);return ve<0?NaN:de}function he(ie,se,de){return se===void 0&&(se=40),de===void 0&&(de=w),function(ve,Me,Ae,Pe){var Ke,nt,Ze;Ae=Ae===void 0?0:+Ae,Pe=Pe===void 0?0:+Pe;for(var at=0;atKe){Ae-=nt/=2,Pe-=Ze/=2;continue}Ke=ar;var Ar=(Ae>0?-1:1)*de,Vr=(Pe>0?-1:1)*de,_i=ie(Ae+Ar,Pe),rn=ie(Ae,Pe+Vr),cn=(_i[0]-yt[0])/Ar,xn=(_i[1]-yt[1])/Ar,Dn=(rn[0]-yt[0])/Vr,Qa=(rn[1]-yt[1])/Vr,So=Qa*cn-xn*Dn,oa=(i(So)<.5?.5:1)/So;if(nt=(Ut*Dn-Pt*Qa)*oa,Ze=(Pt*xn-Ut*cn)*oa,Ae+=nt,Pe+=Ze,i(nt)0&&(Ke[1]*=1+nt/1.5*Ke[0]*Ke[0]),Ke}return ve.invert=he(ve),ve}function Ee(){return t.geoProjection(oe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ye(ie,se){var de=ie*v(se),ve=30,Me;do se-=Me=(se+v(se)-de)/(1+o(se));while(i(Me)>g&&--ve>0);return se/2}function ue(ie,se,de){function ve(Me,Ae){return[ie*Me*o(Ae=ye(de,Ae)),se*v(Ae)]}return ve.invert=function(Me,Ae){return Ae=k(Ae/se),[Me/(ie*o(Ae)),k((2*Ae+v(2*Ae))/de)]},ve}var ee=ue(T/_,T,b);function ae(){return t.geoProjection(ee).scale(169.529)}var xe=2.00276,re=1.11072;function pe(ie,se){var de=ye(b,se);return[xe*ie/(1/o(se)+re/o(de)),(se+T*v(de))/xe]}pe.invert=function(ie,se){var de=xe*se,ve=se<0?-M:M,Me=25,Ae,Pe;do Pe=de-T*v(ve),ve-=Ae=(v(2*ve)+2*ve-b*v(Pe))/(2*o(2*ve)+2+b*o(Pe)*T*o(ve));while(i(Ae)>g&&--Me>0);return Pe=de-T*v(ve),[ie*(1/o(Pe)+re/o(ve))/xe,Pe]};function we(){return t.geoProjection(pe).scale(160.857)}function Fe(ie){var se=0,de=t.geoProjectionMutator(ie),ve=de(se);return ve.parallel=function(Me){return arguments.length?de(se=Me*S):se*E},ve}function Se(ie,se){return[ie*o(se),se]}Se.invert=function(ie,se){return[ie/o(se),se]};function ke(){return t.geoProjection(Se).scale(152.63)}function _e(ie){if(!ie)return Se;var se=1/m(ie);function de(ve,Me){var Ae=se+ie-Me,Pe=Ae&&ve*o(Me)/Ae;return[Ae*v(Pe),se-Ae*o(Pe)]}return de.invert=function(ve,Me){var Ae=F(ve*ve+(Me=se-Me)*Me),Pe=se+ie-Ae;return[Ae/o(Pe)*a(ve,Me),Pe]},de}function Ie(){return Fe(_e).scale(123.082).center([0,26.1441]).parallel(45)}function Oe(ie){function se(de,ve){var Me=_-ve,Ae=Me&&de*ie*v(Me)/Me;return[Me*v(Ae)/ie,_-Me*o(Ae)]}return se.invert=function(de,ve){var Me=de*ie,Ae=_-ve,Pe=F(Me*Me+Ae*Ae),Ke=a(Me,Ae);return[(Pe?Pe/v(Pe):1)*Ke/ie,_-Pe]},se}function Qe(){var ie=.5,se=t.geoProjectionMutator(Oe),de=se(ie);return de.fraction=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(158.837)}var et=ue(1,4/b,b);function _t(){return t.geoProjection(et).scale(152.63)}function ut(ie,se,de,ve,Me,Ae){var Pe=o(Ae),Ke;if(i(ie)>1||i(Ae)>1)Ke=D(de*Me+se*ve*Pe);else{var nt=v(ie/2),Ze=v(Ae/2);Ke=2*k(F(nt*nt+se*ve*Ze*Ze))}return i(Ke)>g?[Ke,a(ve*v(Ae),se*Me-de*ve*Pe)]:[0,0]}function vt(ie,se,de){return D((ie*ie+se*se-de*de)/(2*ie*se))}function Xe(ie){return ie-2*b*l((ie+b)/(2*b))}function mt(ie,se,de){for(var ve=[[ie[0],ie[1],v(ie[1]),o(ie[1])],[se[0],se[1],v(se[1]),o(se[1])],[de[0],de[1],v(de[1]),o(de[1])]],Me=ve[2],Ae,Pe=0;Pe<3;++Pe,Me=Ae)Ae=ve[Pe],Me.v=ut(Ae[1]-Me[1],Me[3],Me[2],Ae[3],Ae[2],Ae[0]-Me[0]),Me.point=[0,0];var Ke=vt(ve[0].v[0],ve[2].v[0],ve[1].v[0]),nt=vt(ve[0].v[0],ve[1].v[0],ve[2].v[0]),Ze=b-Ke;ve[2].point[1]=0,ve[0].point[0]=-(ve[1].point[0]=ve[0].v[0]/2);var at=[ve[2].point[0]=ve[0].point[0]+ve[2].v[0]*o(Ke),2*(ve[0].point[1]=ve[1].point[1]=ve[2].v[0]*v(Ke))];function yt(Pt,Ut){var ar=v(Ut),Ar=o(Ut),Vr=new Array(3),_i;for(_i=0;_i<3;++_i){var rn=ve[_i];if(Vr[_i]=ut(Ut-rn[1],rn[3],rn[2],Ar,ar,Pt-rn[0]),!Vr[_i][0])return rn.point;Vr[_i][1]=Xe(Vr[_i][1]-rn.v[1])}var cn=at.slice();for(_i=0;_i<3;++_i){var xn=_i==2?0:_i+1,Dn=vt(ve[_i].v[0],Vr[_i][0],Vr[xn][0]);Vr[_i][1]<0&&(Dn=-Dn),_i?_i==1?(Dn=nt-Dn,cn[0]-=Vr[_i][0]*o(Dn),cn[1]-=Vr[_i][0]*v(Dn)):(Dn=Ze-Dn,cn[0]+=Vr[_i][0]*o(Dn),cn[1]+=Vr[_i][0]*v(Dn)):(cn[0]+=Vr[_i][0]*o(Dn),cn[1]-=Vr[_i][0]*v(Dn))}return cn[0]/=3,cn[1]/=3,cn}return yt}function bt(ie){return ie[0]*=S,ie[1]*=S,ie}function Ne(){return Ue([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ue(ie,se,de){var ve=t.geoCentroid({type:"MultiPoint",coordinates:[ie,se,de]}),Me=[-ve[0],-ve[1]],Ae=t.geoRotation(Me),Pe=mt(bt(Ae(ie)),bt(Ae(se)),bt(Ae(de)));Pe.invert=he(Pe);var Ke=t.geoProjection(Pe).rotate(Me),nt=Ke.center;return delete Ke.rotate,Ke.center=function(Ze){return arguments.length?nt(Ae(Ze)):Ae.invert(nt())},Ke.clipAngle(90)}function Ge(ie,se){var de=F(1-v(se));return[2/A*ie*de,A*(1-de)]}Ge.invert=function(ie,se){var de=(de=se/A-1)*de;return[de>0?ie*F(b/de)/2:0,k(1-de)]};function je(){return t.geoProjection(Ge).scale(95.6464).center([0,30])}function Re(ie){var se=m(ie);function de(ve,Me){return[ve,(ve?ve/v(ve):1)*(v(Me)*o(ve)-se*o(Me))]}return de.invert=se?function(ve,Me){ve&&(Me*=v(ve)/ve);var Ae=o(ve);return[ve,2*a(F(Ae*Ae+se*se-Me*Me)-Ae,se-Me)]}:function(ve,Me){return[ve,k(ve?Me*m(ve)/ve:Me)]},de}function Ve(){return Fe(Re).scale(249.828).clipAngle(90)}var ct=F(3);function Tt(ie,se){return[ct*ie*(2*o(2*se/3)-1)/A,ct*A*v(se/3)]}Tt.invert=function(ie,se){var de=3*k(se/(ct*A));return[A*ie/(ct*(2*o(2*de/3)-1)),de]};function Xt(){return t.geoProjection(Tt).scale(156.19)}function Vt(ie){var se=o(ie);function de(ve,Me){return[ve*se,v(Me)/se]}return de.invert=function(ve,Me){return[ve/se,k(Me*se)]},de}function lr(){return Fe(Vt).parallel(38.58).scale(195.044)}function ur(ie){var se=o(ie);function de(ve,Me){return[ve*se,(1+se)*m(Me/2)]}return de.invert=function(ve,Me){return[ve/se,n(Me/(1+se))*2]},de}function Bt(){return Fe(ur).scale(124.75)}function Zt(ie,se){var de=F(8/(3*b));return[de*ie*(1-i(se)/b),de*se]}Zt.invert=function(ie,se){var de=F(8/(3*b)),ve=se/de;return[ie/(de*(1-i(ve)/b)),ve]};function kr(){return t.geoProjection(Zt).scale(165.664)}function $e(ie,se){var de=F(4-3*v(i(se)));return[2/F(6*b)*ie*de,p(se)*F(2*b/3)*(2-de)]}$e.invert=function(ie,se){var de=2-i(se)/F(2*b/3);return[ie*F(6*b)/(2*de),p(se)*k((4-de*de)/3)]};function tt(){return t.geoProjection($e).scale(165.664)}function st(ie,se){var de=F(b*(4+b));return[2/de*ie*(1+F(1-4*se*se/(b*b))),4/de*se]}st.invert=function(ie,se){var de=F(b*(4+b))/2;return[ie*de/(1+F(1-se*se*(4+b)/(4*b))),se*de/2]};function xt(){return t.geoProjection(st).scale(180.739)}function Je(ie,se){var de=(2+_)*v(se);se/=2;for(var ve=0,Me=1/0;ve<10&&i(Me)>g;ve++){var Ae=o(se);se-=Me=(se+v(se)*(Ae+2)-de)/(2*Ae*(1+Ae))}return[2/F(b*(4+b))*ie*(1+o(se)),2*F(b/(4+b))*v(se)]}Je.invert=function(ie,se){var de=se*F((4+b)/b)/2,ve=k(de),Me=o(ve);return[ie/(2/F(b*(4+b))*(1+Me)),k((ve+de*(Me+2))/(2+_))]};function Ct(){return t.geoProjection(Je).scale(180.739)}function ir(ie,se){return[ie*(1+o(se))/F(2+b),2*se/F(2+b)]}ir.invert=function(ie,se){var de=F(2+b),ve=se*de/2;return[de*ie/(1+o(ve)),ve]};function hr(){return t.geoProjection(ir).scale(173.044)}function Ur(ie,se){for(var de=(1+_)*v(se),ve=0,Me=1/0;ve<10&&i(Me)>g;ve++)se-=Me=(se+v(se)-de)/(1+o(se));return de=F(2+b),[ie*(1+o(se))/de,2*se/de]}Ur.invert=function(ie,se){var de=1+_,ve=F(de/2);return[ie*2*ve/(1+o(se*=ve)),k((se+v(se))/de)]};function si(){return t.geoProjection(Ur).scale(173.044)}var ei=3+2*T;function Lr(ie,se){var de=v(ie/=2),ve=o(ie),Me=F(o(se)),Ae=o(se/=2),Pe=v(se)/(Ae+T*ve*Me),Ke=F(2/(1+Pe*Pe)),nt=F((T*Ae+(ve+de)*Me)/(T*Ae+(ve-de)*Me));return[ei*(Ke*(nt-1/nt)-2*u(nt)),ei*(Ke*Pe*(nt+1/nt)-2*n(Pe))]}Lr.invert=function(ie,se){if(!(Ae=J.invert(ie/1.2,se*1.065)))return null;var de=Ae[0],ve=Ae[1],Me=20,Ae;ie/=ei,se/=ei;do{var Pe=de/2,Ke=ve/2,nt=v(Pe),Ze=o(Pe),at=v(Ke),yt=o(Ke),Pt=o(ve),Ut=F(Pt),ar=at/(yt+T*Ze*Ut),Ar=ar*ar,Vr=F(2/(1+Ar)),_i=T*yt+(Ze+nt)*Ut,rn=T*yt+(Ze-nt)*Ut,cn=_i/rn,xn=F(cn),Dn=xn-1/xn,Qa=xn+1/xn,So=Vr*Dn-2*u(xn)-ie,oa=Vr*ar*Qa-2*n(ar)-se,as=at&&x*Ut*nt*Ar/at,wl=(T*Ze*yt+Ut)/(2*(yt+T*Ze*Ut)*(yt+T*Ze*Ut)*Ut),Xu=-.5*ar*Vr*Vr*Vr,jf=Xu*as,u0=Xu*wl,ou=(ou=2*yt+T*Ut*(Ze-nt))*ou*xn,Ul=(T*Ze*yt*Ut+Pt)/ou,$c=-(T*nt*at)/(Ut*ou),$f=Dn*jf-2*Ul/xn+Vr*(Ul+Ul/cn),Wf=Dn*u0-2*$c/xn+Vr*($c+$c/cn),Yf=ar*Qa*jf-2*as/(1+Ar)+Vr*Qa*as+Vr*ar*(Ul-Ul/cn),Sh=ar*Qa*u0-2*wl/(1+Ar)+Vr*Qa*wl+Vr*ar*($c-$c/cn),gf=Wf*Yf-Sh*$f;if(!gf)break;var c0=(oa*Wf-So*Sh)/gf,Dp=(So*Yf-oa*$f)/gf;de-=c0,ve=c(-_,f(_,ve-Dp))}while((i(c0)>g||i(Dp)>g)&&--Me>0);return i(i(ve)-_)ve){var yt=F(at),Pt=a(Ze,nt),Ut=de*d(Pt/de),ar=Pt-Ut,Ar=ie*o(ar),Vr=(ie*v(ar)-ar*v(Ar))/(_-Ar),_i=ka(ar,Vr),rn=(b-ie)/ao(_i,Ar,b);nt=yt;var cn=50,xn;do nt-=xn=(ie+ao(_i,Ar,nt)*rn-yt)/(_i(nt)*rn);while(i(xn)>g&&--cn>0);Ze=ar*v(nt),nt<_&&(Ze-=Vr*(nt-_));var Dn=v(Ut),Qa=o(Ut);Ke[0]=nt*Qa-Ze*Dn,Ke[1]=nt*Dn+Ze*Qa}return Ke}return Me.invert=function(Ae,Pe){var Ke=Ae*Ae+Pe*Pe;if(Ke>ve){var nt=F(Ke),Ze=a(Pe,Ae),at=de*d(Ze/de),yt=Ze-at;Ae=nt*o(yt),Pe=nt*v(yt);for(var Pt=Ae-_,Ut=v(Ae),ar=Pe/Ut,Ar=Ae<_?1/0:0,Vr=10;;){var _i=ie*v(ar),rn=ie*o(ar),cn=v(rn),xn=_-rn,Dn=(_i-ar*cn)/xn,Qa=ka(ar,Dn);if(i(Ar)g||i(ar)>g)&&--Ar>0);return[yt,Pt]},nt}var Xs=_a(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function _l(){return t.geoProjection(Xs).scale(149.995)}var yu=_a(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function ul(){return t.geoProjection(yu).scale(153.93)}var Le=_a(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function ot(){return t.geoProjection(Le).scale(130.945)}function lt(ie,se){var de=ie*ie,ve=se*se;return[ie*(1-.162388*ve)*(.87-952426e-9*de*de),se*(1+ve/12)]}lt.invert=function(ie,se){var de=ie,ve=se,Me=50,Ae;do{var Pe=ve*ve;ve-=Ae=(ve*(1+Pe/12)-se)/(1+Pe/4)}while(i(Ae)>g&&--Me>0);Me=50,ie/=1-.162388*Pe;do{var Ke=(Ke=de*de)*Ke;de-=Ae=(de*(.87-952426e-9*Ke)-ie)/(.87-.00476213*Ke)}while(i(Ae)>g&&--Me>0);return[de,ve]};function kt(){return t.geoProjection(lt).scale(131.747)}var Jt=_a(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Rt(){return t.geoProjection(Jt).scale(131.087)}function Tr(ie){var se=ie(_,0)[0]-ie(-_,0)[0];function de(ve,Me){var Ae=ve>0?-.5:.5,Pe=ie(ve+Ae*b,Me);return Pe[0]-=Ae*se,Pe}return ie.invert&&(de.invert=function(ve,Me){var Ae=ve>0?-.5:.5,Pe=ie.invert(ve+Ae*se,Me),Ke=Pe[0]-Ae*b;return Ke<-b?Ke+=2*b:Ke>b&&(Ke-=2*b),Pe[0]=Ke,Pe}),de}function Wt(ie,se){var de=p(ie),ve=p(se),Me=o(se),Ae=o(ie)*Me,Pe=v(ie)*Me,Ke=v(ve*se);ie=i(a(Pe,Ke)),se=k(Ae),i(ie-_)>g&&(ie%=_);var nt=br(ie>b/4?_-ie:ie,se);return ie>b/4&&(Ke=nt[0],nt[0]=-nt[1],nt[1]=-Ke),nt[0]*=de,nt[1]*=-ve,nt}Wt.invert=function(ie,se){i(ie)>1&&(ie=p(ie)*2-ie),i(se)>1&&(se=p(se)*2-se);var de=p(ie),ve=p(se),Me=-de*ie,Ae=-ve*se,Pe=Ae/Me<1,Ke=Xr(Pe?Ae:Me,Pe?Me:Ae),nt=Ke[0],Ze=Ke[1],at=o(Ze);return Pe&&(nt=-_-nt),[de*(a(v(nt)*at,-v(Ze))+b),ve*k(o(nt)*at)]};function br(ie,se){if(se===_)return[0,0];var de=v(se),ve=de*de,Me=ve*ve,Ae=1+Me,Pe=1+3*Me,Ke=1-Me,nt=k(1/F(Ae)),Ze=Ke+ve*Ae*nt,at=(1-de)/Ze,yt=F(at),Pt=at*Ae,Ut=F(Pt),ar=yt*Ke,Ar,Vr;if(ie===0)return[0,-(ar+ve*Ut)];var _i=o(se),rn=1/_i,cn=2*de*_i,xn=(-3*ve+nt*Pe)*cn,Dn=(-Ze*_i-(1-de)*xn)/(Ze*Ze),Qa=.5*Dn/yt,So=Ke*Qa-2*ve*yt*cn,oa=ve*Ae*Dn+at*Pe*cn,as=-rn*cn,wl=-rn*oa,Xu=-2*rn*So,jf=4*ie/b,u0;if(ie>.222*b||se.175*b){if(Ar=(ar+ve*F(Pt*(1+Me)-ar*ar))/(1+Me),ie>b/4)return[Ar,Ar];var ou=Ar,Ul=.5*Ar;Ar=.5*(Ul+ou),Vr=50;do{var $c=F(Pt-Ar*Ar),$f=Ar*(Xu+as*$c)+wl*k(Ar/Ut)-jf;if(!$f)break;$f<0?Ul=Ar:ou=Ar,Ar=.5*(Ul+ou)}while(i(ou-Ul)>g&&--Vr>0)}else{Ar=g,Vr=25;do{var Wf=Ar*Ar,Yf=F(Pt-Wf),Sh=Xu+as*Yf,gf=Ar*Sh+wl*k(Ar/Ut)-jf,c0=Sh+(wl-as*Wf)/Yf;Ar-=u0=Yf?gf/c0:0}while(i(u0)>g&&--Vr>0)}return[Ar,-ar-ve*F(Pt-Ar*Ar)]}function Xr(ie,se){for(var de=0,ve=1,Me=.5,Ae=50;;){var Pe=Me*Me,Ke=F(Me),nt=k(1/F(1+Pe)),Ze=1-Pe+Me*(1+Pe)*nt,at=(1-Ke)/Ze,yt=F(at),Pt=at*(1+Pe),Ut=yt*(1-Pe),ar=Pt-ie*ie,Ar=F(ar),Vr=se+Ut+Me*Ar;if(i(ve-de)0?de=Me:ve=Me,Me=.5*(de+ve)}if(!Ae)return null;var _i=k(Ke),rn=o(_i),cn=1/rn,xn=2*Ke*rn,Dn=(-3*Me+nt*(1+3*Pe))*xn,Qa=(-Ze*rn-(1-Ke)*Dn)/(Ze*Ze),So=.5*Qa/yt,oa=(1-Pe)*So-2*Me*yt*xn,as=-2*cn*oa,wl=-cn*xn,Xu=-cn*(Me*(1+Pe)*Qa+at*(1+3*Pe)*xn);return[b/4*(ie*(as+wl*Ar)+Xu*k(ie/F(Pt))),_i]}function ti(){return t.geoProjection(Tr(Wt)).scale(239.75)}function Mi(ie,se,de){var ve,Me,Ae;return ie?(ve=an(ie,de),se?(Me=an(se,1-de),Ae=Me[1]*Me[1]+de*ve[0]*ve[0]*Me[0]*Me[0],[[ve[0]*Me[2]/Ae,ve[1]*ve[2]*Me[0]*Me[1]/Ae],[ve[1]*Me[1]/Ae,-ve[0]*ve[2]*Me[0]*Me[2]/Ae],[ve[2]*Me[1]*Me[2]/Ae,-de*ve[0]*ve[1]*Me[0]/Ae]]):[[ve[0],0],[ve[1],0],[ve[2],0]]):(Me=an(se,1-de),[[0,Me[0]/Me[1]],[1/Me[1],0],[Me[2]/Me[1],0]])}function an(ie,se){var de,ve,Me,Ae,Pe;if(se=1-g)return de=(1-se)/4,ve=L(ie),Ae=P(ie),Me=1/ve,Pe=ve*R(ie),[Ae+de*(Pe-ie)/(ve*ve),Me-de*Ae*Me*(Pe-ie),Me+de*Ae*Me*(Pe+ie),2*n(s(ie))-_+de*(Pe-ie)/ve];var Ke=[1,0,0,0,0,0,0,0,0],nt=[F(se),0,0,0,0,0,0,0,0],Ze=0;for(ve=F(1-se),Pe=1;i(nt[Ze]/Ke[Ze])>g&&Ze<8;)de=Ke[Ze++],nt[Ze]=(de-ve)/2,Ke[Ze]=(de+ve)/2,ve=F(de*ve),Pe*=2;Me=Pe*Ke[Ze]*ie;do Ae=nt[Ze]*v(ve=Me)/Ke[Ze],Me=(k(Ae)+Me)/2;while(--Ze);return[v(Me),Ae=o(Me),Ae/o(Me-ve),Me]}function Gn(ie,se,de){var ve=i(ie),Me=i(se),Ae=R(Me);if(ve){var Pe=1/v(ve),Ke=1/(m(ve)*m(ve)),nt=-(Ke+de*(Ae*Ae*Pe*Pe)-1+de),Ze=(de-1)*Ke,at=(-nt+F(nt*nt-4*Ze))/2;return[yn(n(1/F(at)),de)*p(ie),yn(n(F((at/Ke-1)/de)),1-de)*p(se)]}return[0,yn(n(Ae),1-de)*p(se)]}function yn(ie,se){if(!se)return ie;if(se===1)return u(m(ie/2+M));for(var de=1,ve=F(1-se),Me=F(se),Ae=0;i(Me)>g;Ae++){if(ie%b){var Pe=n(ve*m(ie)/de);Pe<0&&(Pe+=b),ie+=Pe+~~(ie/b)*b}else ie+=ie;Me=(de+ve)/2,ve=F(de*ve),Me=((de=Me)-ve)/2}return ie/(h(2,Ae)*de)}function fa(ie,se){var de=(T-1)/(T+1),ve=F(1-de*de),Me=yn(_,ve*ve),Ae=-1,Pe=u(m(b/4+i(se)/2)),Ke=s(Ae*Pe)/F(de),nt=Wn(Ke*o(Ae*ie),Ke*v(Ae*ie)),Ze=Gn(nt[0],nt[1],ve*ve);return[-Ze[1],(se>=0?1:-1)*(.5*Me-Ze[0])]}function Wn(ie,se){var de=ie*ie,ve=se+1,Me=1-de-se*se;return[.5*((ie>=0?_:-_)-a(Me,2*ie)),-.25*u(Me*Me+4*de)+.5*u(ve*ve+de)]}function Ja(ie,se){var de=se[0]*se[0]+se[1]*se[1];return[(ie[0]*se[0]+ie[1]*se[1])/de,(ie[1]*se[0]-ie[0]*se[1])/de]}fa.invert=function(ie,se){var de=(T-1)/(T+1),ve=F(1-de*de),Me=yn(_,ve*ve),Ae=-1,Pe=Mi(.5*Me-se,-ie,ve*ve),Ke=Ja(Pe[0],Pe[1]),nt=a(Ke[1],Ke[0])/Ae;return[nt,2*n(s(.5/Ae*u(de*Ke[0]*Ke[0]+de*Ke[1]*Ke[1])))-_]};function oo(){return t.geoProjection(Tr(fa)).scale(151.496)}function Ao(ie){var se=v(ie),de=o(ie),ve=Io(ie);ve.invert=Io(-ie);function Me(Ae,Pe){var Ke=ve(Ae,Pe);Ae=Ke[0],Pe=Ke[1];var nt=v(Pe),Ze=o(Pe),at=o(Ae),yt=D(se*nt+de*Ze*at),Pt=v(yt),Ut=i(Pt)>g?yt/Pt:1;return[Ut*de*v(Ae),(i(Ae)>_?Ut:-Ut)*(se*Ze-de*nt*at)]}return Me.invert=function(Ae,Pe){var Ke=F(Ae*Ae+Pe*Pe),nt=-v(Ke),Ze=o(Ke),at=Ke*Ze,yt=-Pe*nt,Pt=Ke*se,Ut=F(at*at+yt*yt-Pt*Pt),ar=a(at*Pt+yt*Ut,yt*Pt-at*Ut),Ar=(Ke>_?-1:1)*a(Ae*nt,Ke*o(ar)*Ze+Pe*v(ar)*nt);return ve.invert(Ar,ar)},Me}function Io(ie){var se=v(ie),de=o(ie);return function(ve,Me){var Ae=o(Me),Pe=o(ve)*Ae,Ke=v(ve)*Ae,nt=v(Me);return[a(Ke,Pe*de-nt*se),k(nt*de+Pe*se)]}}function ps(){var ie=0,se=t.geoProjectionMutator(Ao),de=se(ie),ve=de.rotate,Me=de.stream,Ae=t.geoCircle();return de.parallel=function(Pe){if(!arguments.length)return ie*E;var Ke=de.rotate();return se(ie=Pe*S).rotate(Ke)},de.rotate=function(Pe){return arguments.length?(ve.call(de,[Pe[0],Pe[1]-ie*E]),Ae.center([-Pe[0],-Pe[1]]),de):(Pe=ve.call(de),Pe[1]+=ie*E,Pe)},de.stream=function(Pe){return Pe=Me(Pe),Pe.sphere=function(){Pe.polygonStart();var Ke=.01,nt=Ae.radius(90-Ke)().coordinates[0],Ze=nt.length-1,at=-1,yt;for(Pe.lineStart();++at=0;)Pe.point((yt=nt[at])[0],yt[1]);Pe.lineEnd(),Pe.polygonEnd()},Pe},de.scale(79.4187).parallel(45).clipAngle(180-.001)}var rs=3,Mo=k(1-1/rs)*E,is=Vt(0);function Ro(ie){var se=Mo*S,de=Ge(b,se)[0]-Ge(-b,se)[0],ve=is(0,se)[1],Me=Ge(0,se)[1],Ae=A-Me,Pe=y/ie,Ke=4/y,nt=ve+Ae*Ae*4/y;function Ze(at,yt){var Pt,Ut=i(yt);if(Ut>se){var ar=f(ie-1,c(0,l((at+b)/Pe)));at+=b*(ie-1)/ie-ar*Pe,Pt=Ge(at,Ut),Pt[0]=Pt[0]*y/de-y*(ie-1)/(2*ie)+ar*y/ie,Pt[1]=ve+(Pt[1]-Me)*4*Ae/y,yt<0&&(Pt[1]=-Pt[1])}else Pt=is(at,yt);return Pt[0]*=Ke,Pt[1]/=nt,Pt}return Ze.invert=function(at,yt){at/=Ke,yt*=nt;var Pt=i(yt);if(Pt>ve){var Ut=f(ie-1,c(0,l((at+b)/Pe)));at=(at+b*(ie-1)/ie-Ut*Pe)*de/y;var ar=Ge.invert(at,.25*(Pt-ve)*y/Ae+Me);return ar[0]-=b*(ie-1)/ie-Ut*Pe,yt<0&&(ar[1]=-ar[1]),ar}return is.invert(at,yt)},Ze}function Uo(ie,se){return[ie,se&1?90-g:Mo]}function so(ie,se){return[ie,se&1?-90+g:-Mo]}function In(ie){return[ie[0]*(1-g),ie[1]]}function va(ie){var se=[].concat(r.range(-180,180+ie/2,ie).map(Uo),r.range(180,-180-ie/2,-ie).map(so));return{type:"Polygon",coordinates:[ie===180?se.map(In):se]}}function vs(){var ie=4,se=t.geoProjectionMutator(Ro),de=se(ie),ve=de.stream;return de.lobes=function(Me){return arguments.length?se(ie=+Me):ie},de.stream=function(Me){var Ae=de.rotate(),Pe=ve(Me),Ke=(de.rotate([0,0]),ve(Me));return de.rotate(Ae),Pe.sphere=function(){t.geoStream(va(180/ie),Ke)},Pe},de.scale(239.75)}function Zs(ie){var se=1+ie,de=v(1/se),ve=k(de),Me=2*F(b/(Ae=b+4*ve*se)),Ae,Pe=.5*Me*(se+F(ie*(2+ie))),Ke=ie*ie,nt=se*se;function Ze(at,yt){var Pt=1-v(yt),Ut,ar;if(Pt&&Pt<2){var Ar=_-yt,Vr=25,_i;do{var rn=v(Ar),cn=o(Ar),xn=ve+a(rn,se-cn),Dn=1+nt-2*se*cn;Ar-=_i=(Ar-Ke*ve-se*rn+Dn*xn-.5*Pt*Ae)/(2*se*rn*xn)}while(i(_i)>w&&--Vr>0);Ut=Me*F(Dn),ar=at*xn/b}else Ut=Me*(ie+Pt),ar=at*ve/b;return[Ut*v(ar),Pe-Ut*o(ar)]}return Ze.invert=function(at,yt){var Pt=at*at+(yt-=Pe)*yt,Ut=(1+nt-Pt/(Me*Me))/(2*se),ar=D(Ut),Ar=v(ar),Vr=ve+a(Ar,se-Ut);return[k(at/F(Pt))*b/Vr,k(1-2*(ar-Ke*ve-se*Ar+(1+nt-2*se*Ut)*Vr)/Ae)]},Ze}function Ks(){var ie=1,se=t.geoProjectionMutator(Zs),de=se(ie);return de.ratio=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(167.774).center([0,18.67])}var Ol=.7109889596207567,Js=.0528035274542;function ru(ie,se){return se>-Ol?(ie=ee(ie,se),ie[1]+=Js,ie):Se(ie,se)}ru.invert=function(ie,se){return se>-Ol?ee.invert(ie,se-Js):Se.invert(ie,se)};function xu(){return t.geoProjection(ru).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(ie,se){return i(se)>Ol?(ie=ee(ie,se),ie[1]-=se>0?Js:-Js,ie):Se(ie,se)}_u.invert=function(ie,se){return i(se)>Ol?ee.invert(ie,se+(se>0?Js:-Js)):Se.invert(ie,se)};function dc(){return t.geoProjection(_u).scale(152.63)}function Nl(ie,se,de,ve){var Me=F(4*b/(2*de+(1+ie-se/2)*v(2*de)+(ie+se)/2*v(4*de)+se/2*v(6*de))),Ae=F(ve*v(de)*F((1+ie*o(2*de)+se*o(4*de))/(1+ie+se))),Pe=de*nt(1);function Ke(yt){return F(1+ie*o(2*yt)+se*o(4*yt))}function nt(yt){var Pt=yt*de;return(2*Pt+(1+ie-se/2)*v(2*Pt)+(ie+se)/2*v(4*Pt)+se/2*v(6*Pt))/de}function Ze(yt){return Ke(yt)*v(yt)}var at=function(yt,Pt){var Ut=de*be(nt,Pe*v(Pt)/de,Pt/b);isNaN(Ut)&&(Ut=de*p(Pt));var ar=Me*Ke(Ut);return[ar*Ae*yt/b*o(Ut),ar/Ae*v(Ut)]};return at.invert=function(yt,Pt){var Ut=be(Ze,Pt*Ae/Me);return[yt*b/(o(Ut)*Me*Ae*Ke(Ut)),k(de*nt(Ut/de)/Pe)]},de===0&&(Me=F(ve/b),at=function(yt,Pt){return[yt*Me,v(Pt)/Me]},at.invert=function(yt,Pt){return[yt/Me,k(Pt*Me)]}),at}function ja(){var ie=1,se=0,de=45*S,ve=2,Me=t.geoProjectionMutator(Nl),Ae=Me(ie,se,de,ve);return Ae.a=function(Pe){return arguments.length?Me(ie=+Pe,se,de,ve):ie},Ae.b=function(Pe){return arguments.length?Me(ie,se=+Pe,de,ve):se},Ae.psiMax=function(Pe){return arguments.length?Me(ie,se,de=+Pe*S,ve):de*E},Ae.ratio=function(Pe){return arguments.length?Me(ie,se,de,ve=+Pe):ve},Ae.scale(180.739)}function bu(ie,se,de,ve,Me,Ae,Pe,Ke,nt,Ze,at){if(at.nanEncountered)return NaN;var yt,Pt,Ut,ar,Ar,Vr,_i,rn,cn,xn;if(yt=de-se,Pt=ie(se+yt*.25),Ut=ie(de-yt*.25),isNaN(Pt)){at.nanEncountered=!0;return}if(isNaN(Ut)){at.nanEncountered=!0;return}return ar=yt*(ve+4*Pt+Me)/12,Ar=yt*(Me+4*Ut+Ae)/12,Vr=ar+Ar,xn=(Vr-Pe)/15,Ze>nt?(at.maxDepthCount++,Vr+xn):Math.abs(xn)>1;do nt[Vr]>Ut?Ar=Vr:ar=Vr,Vr=ar+Ar>>1;while(Vr>ar);var _i=nt[Vr+1]-nt[Vr];return _i&&(_i=(Ut-nt[Vr+1])/_i),(Vr+1+_i)/Pe}var yt=2*at(1)/b*Ae/de,Pt=function(Ut,ar){var Ar=at(i(v(ar))),Vr=ve(Ar)*Ut;return Ar/=yt,[Vr,ar>=0?Ar:-Ar]};return Pt.invert=function(Ut,ar){var Ar;return ar*=yt,i(ar)<1&&(Ar=p(ar)*k(Me(i(ar))*Ae)),[Ut/ve(i(ar)),Ar]},Pt}function iu(){var ie=0,se=2.5,de=1.183136,ve=t.geoProjectionMutator(Ss),Me=ve(ie,se,de);return Me.alpha=function(Ae){return arguments.length?ve(ie=+Ae,se,de):ie},Me.k=function(Ae){return arguments.length?ve(ie,se=+Ae,de):se},Me.gamma=function(Ae){return arguments.length?ve(ie,se,de=+Ae):de},Me.scale(152.63)}function ph(ie,se){return i(ie[0]-se[0])=0;--nt)de=ie[1][nt],ve=de[0][0],Me=de[0][1],Ae=de[1][1],Pe=de[2][0],Ke=de[2][1],se.push(yo([[Pe-g,Ke-g],[Pe-g,Ae+g],[ve+g,Ae+g],[ve+g,Me-g]],30));return{type:"Polygon",coordinates:[r.merge(se)]}}function Zo(ie,se,de){var ve,Me;function Ae(nt,Ze){for(var at=Ze<0?-1:1,yt=se[+(Ze<0)],Pt=0,Ut=yt.length-1;Ptyt[Pt][2][0];++Pt);var ar=ie(nt-yt[Pt][1][0],Ze);return ar[0]+=ie(yt[Pt][1][0],at*Ze>at*yt[Pt][0][1]?yt[Pt][0][1]:Ze)[0],ar}de?Ae.invert=de(Ae):ie.invert&&(Ae.invert=function(nt,Ze){for(var at=Me[+(Ze<0)],yt=se[+(Ze<0)],Pt=0,Ut=at.length;Ptar&&(Ar=Ut,Ut=ar,ar=Ar),[[yt,Ut],[Pt,ar]]})}),Pe):se.map(function(Ze){return Ze.map(function(at){return[[at[0][0]*E,at[0][1]*E],[at[1][0]*E,at[1][1]*E],[at[2][0]*E,at[2][1]*E]]})})},se!=null&&Pe.lobes(se),Pe}var au=[[[[-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 Cv(){return Zo(pe,au).scale(160.857)}var Nc=[[[[-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 r0(){return Zo(_u,Nc).scale(152.63)}var Of=[[[[-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 vh(){return Zo(ee,Of).scale(169.529)}var Nf=[[[[-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 i0(){return Zo(ee,Nf).scale(169.529).rotate([20,0])}var Dv=[[[[-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 gh(){return Zo(ru,Dv,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var up=[[[[-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 n0(){return Zo(Se,up).scale(152.63).rotate([-20,0])}function j0(ie,se){return[3/y*ie*F(b*b/3-se*se),se]}j0.invert=function(ie,se){return[y/3*ie/F(b*b/3-se*se),se]};function $0(){return t.geoProjection(j0).scale(158.837)}function Fv(ie){function se(de,ve){if(i(i(ve)-_)2)return null;de/=2,ve/=2;var Ae=de*de,Pe=ve*ve,Ke=2*ve/(1+Ae+Pe);return Ke=h((1+Ke)/(1-Ke),1/ie),[a(2*de,1-Ae-Pe)/ie,k((Ke-1)/(Ke+1))]},se}function Lv(){var ie=.5,se=t.geoProjectionMutator(Fv),de=se(ie);return de.spacing=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(124.75)}var Uc=b/T;function cp(ie,se){return[ie*(1+F(o(se)))/2,se/(o(se/2)*o(ie/6))]}cp.invert=function(ie,se){var de=i(ie),ve=i(se),Me=g,Ae=_;veg||i(Vr)>g)&&--Me>0);return Me&&[de,ve]};function Es(){return t.geoProjection(ju).scale(139.98)}function Vo(ie,se){return[v(ie)/o(se),m(se)*o(ie)]}Vo.invert=function(ie,se){var de=ie*ie,ve=se*se,Me=ve+1,Ae=de+Me,Pe=ie?x*F((Ae-F(Ae*Ae-4*de))/de):1/F(Me);return[k(ie*Pe),p(se)*D(Pe)]};function wu(){return t.geoProjection(Vo).scale(144.049).clipAngle(90-.001)}function W0(ie){var se=o(ie),de=m(M+ie/2);function ve(Me,Ae){var Pe=Ae-ie,Ke=i(Pe)=0;)at=ie[Ze],yt=at[0]+Ke*(Ut=yt)-nt*Pt,Pt=at[1]+Ke*Pt+nt*Ut;return yt=Ke*(Ut=yt)-nt*Pt,Pt=Ke*Pt+nt*Ut,[yt,Pt]}return de.invert=function(ve,Me){var Ae=20,Pe=ve,Ke=Me;do{for(var nt=se,Ze=ie[nt],at=Ze[0],yt=Ze[1],Pt=0,Ut=0,ar;--nt>=0;)Ze=ie[nt],Pt=at+Pe*(ar=Pt)-Ke*Ut,Ut=yt+Pe*Ut+Ke*ar,at=Ze[0]+Pe*(ar=at)-Ke*yt,yt=Ze[1]+Pe*yt+Ke*ar;Pt=at+Pe*(ar=Pt)-Ke*Ut,Ut=yt+Pe*Ut+Ke*ar,at=Pe*(ar=at)-Ke*yt-ve,yt=Pe*yt+Ke*ar-Me;var Ar=Pt*Pt+Ut*Ut,Vr,_i;Pe-=Vr=(at*Pt+yt*Ut)/Ar,Ke-=_i=(yt*Pt-at*Ut)/Ar}while(i(Vr)+i(_i)>g*g&&--Ae>0);if(Ae){var rn=F(Pe*Pe+Ke*Ke),cn=2*n(rn*.5),xn=v(cn);return[a(Pe*xn,rn*o(cn)),rn?k(Ke*xn/rn):0]}},de}var Wm=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Tx=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],xh=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Bs=[[.9245,0],[0,0],[.01943,0]],Iv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Rv(){return hf(Wm,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function _h(){return hf(Tx,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function cg(){return hf(xh,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Y0(){return hf(Bs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function fp(){return hf(Iv,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function hf(ie,se){var de=t.geoProjection(ug(ie)).rotate(se).clipAngle(90),ve=t.geoRotation(se),Me=de.center;return delete de.rotate,de.center=function(Ae){return arguments.length?Me(ve(Ae)):ve.invert(Me())},de}var zv=F(6),hp=F(7);function X0(ie,se){var de=k(7*v(se)/(3*zv));return[zv*ie*(2*o(2*de/3)-1)/hp,9*v(de/3)/hp]}X0.invert=function(ie,se){var de=3*k(se*hp/9);return[ie*hp/(zv*(2*o(2*de/3)-1)),k(v(de)*3*zv/7)]};function fg(){return t.geoProjection(X0).scale(164.859)}function hg(ie,se){for(var de=(1+x)*v(se),ve=se,Me=0,Ae;Me<25&&(ve-=Ae=(v(ve/2)+v(ve)-de)/(.5*o(ve/2)+o(ve)),!(i(Ae)w&&--ve>0);return Ae=de*de,Pe=Ae*Ae,Ke=Ae*Pe,[ie/(.84719-.13063*Ae+Ke*Ke*(-.04515+.05494*Ae-.02326*Pe+.00331*Ke)),de]};function dp(){return t.geoProjection(Vf).scale(175.295)}function pc(ie,se){return[ie*(1+o(se))/2,2*(se-m(se/2))]}pc.invert=function(ie,se){for(var de=se/2,ve=0,Me=1/0;ve<10&&i(Me)>g;++ve){var Ae=o(se/2);se-=Me=(se-m(se/2)-de)/(1-.5/(Ae*Ae))}return[2*ie/(1+o(se)),se]};function Z0(){return t.geoProjection(pc).scale(152.63)}var Gf=[[[[-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 dg(){return Zo(ce(1/0),Gf).rotate([20,0]).scale(152.63)}function qv(ie,se){var de=v(se),ve=o(se),Me=p(ie);if(ie===0||i(se)===_)return[0,se];if(se===0)return[ie,0];if(i(ie)===_)return[ie*ve,_*de];var Ae=b/(2*ie)-2*ie/b,Pe=2*se/b,Ke=(1-Pe*Pe)/(de-Pe),nt=Ae*Ae,Ze=Ke*Ke,at=1+nt/Ze,yt=1+Ze/nt,Pt=(Ae*de/Ke-Ae/2)/at,Ut=(Ze*de/nt+Ke/2)/yt,ar=Pt*Pt+ve*ve/at,Ar=Ut*Ut-(Ze*de*de/nt+Ke*de-1)/yt;return[_*(Pt+F(ar)*Me),_*(Ut+F(Ar<0?0:Ar)*p(-se*Ae)*Me)]}qv.invert=function(ie,se){ie/=_,se/=_;var de=ie*ie,ve=se*se,Me=de+ve,Ae=b*b;return[ie?(Me-1+F((1-Me)*(1-Me)+4*de))/(2*ie)*_:0,be(function(Pe){return Me*(b*v(Pe)-2*Pe)*b+4*Pe*Pe*(se-v(Pe))+2*b*Pe-Ae*se},0)]};function pg(){return t.geoProjection(qv).scale(127.267)}var Ov=1.0148,pp=.23185,Nv=-.14499,Uv=.02406,Xm=Ov,$u=5*pp,Vc=7*Nv,vg=9*Uv,Tu=1.790857183;function vp(ie,se){var de=se*se;return[ie,se*(Ov+de*de*(pp+de*(Nv+Uv*de)))]}vp.invert=function(ie,se){se>Tu?se=Tu:se<-Tu&&(se=-Tu);var de=se,ve;do{var Me=de*de;de-=ve=(de*(Ov+Me*Me*(pp+Me*(Nv+Uv*Me)))-se)/(Xm+Me*Me*($u+Me*(Vc+vg*Me)))}while(i(ve)>g);return[ie,de]};function o0(){return t.geoProjection(vp).scale(139.319)}function bh(ie,se){if(i(se)g&&--Me>0);return Pe=m(ve),[(i(se)=0;)if(ve=se[Ke],de[0]===ve[0]&&de[1]===ve[1]){if(Ae)return[Ae,de];Ae=de}}}function gp(ie){for(var se=ie.length,de=[],ve=ie[se-1],Me=0;Me0?[-ve[0],0]:[180-ve[0],180])};var se=yp.map(function(de){return{face:de,project:ie(de)}});return[-1,0,0,1,0,1,4,5].forEach(function(de,ve){var Me=se[de];Me&&(Me.children||(Me.children=[])).push(se[ve])}),K0(se[0],function(de,ve){return se[de<-b/2?ve<0?6:4:de<0?ve<0?2:0:deve^Ut>ve&&de<(Pt-Ze)*(ve-at)/(Ut-at)+Ze&&(Me=!Me)}return Me}function Gv(ie,se){var de=se.stream,ve;if(!de)throw new Error("invalid projection");switch(ie&&ie.type){case"Feature":ve=ry;break;case"FeatureCollection":ve=ty;break;default:ve=Hv;break}return ve(ie,de)}function ty(ie,se){return{type:"FeatureCollection",features:ie.features.map(function(de){return ry(de,se)})}}function ry(ie,se){return{type:"Feature",id:ie.id,properties:ie.properties,geometry:Hv(ie.geometry,se)}}function yg(ie,se){return{type:"GeometryCollection",geometries:ie.geometries.map(function(de){return Hv(de,se)})}}function Hv(ie,se){if(!ie)return null;if(ie.type==="GeometryCollection")return yg(ie,se);var de;switch(ie.type){case"Point":de=Tp;break;case"MultiPoint":de=Tp;break;case"LineString":de=xg;break;case"MultiLineString":de=xg;break;case"Polygon":de=Ap;break;case"MultiPolygon":de=Ap;break;case"Sphere":de=Ap;break;default:return null}return t.geoStream(ie,se(de)),de.result()}var cl=[],Gc=[],Tp={point:function(ie,se){cl.push([ie,se])},result:function(){var ie=cl.length?cl.length<2?{type:"Point",coordinates:cl[0]}:{type:"MultiPoint",coordinates:cl}:null;return cl=[],ie}},xg={lineStart:ed,point:function(ie,se){cl.push([ie,se])},lineEnd:function(){cl.length&&(Gc.push(cl),cl=[])},result:function(){var ie=Gc.length?Gc.length<2?{type:"LineString",coordinates:Gc[0]}:{type:"MultiLineString",coordinates:Gc}:null;return Gc=[],ie}},Ap={polygonStart:ed,lineStart:ed,point:function(ie,se){cl.push([ie,se])},lineEnd:function(){var ie=cl.length;if(ie){do cl.push(cl[0].slice());while(++ie<4);Gc.push(cl),cl=[]}},polygonEnd:ed,result:function(){if(!Gc.length)return null;var ie=[],se=[];return Gc.forEach(function(de){wp(de)?ie.push([de]):se.push(de)}),se.forEach(function(de){var ve=de[0];ie.some(function(Me){if(mg(Me[0],ve))return Me.push(de),!0})||ie.push([de])}),Gc=[],ie.length?ie.length>1?{type:"MultiPolygon",coordinates:ie}:{type:"Polygon",coordinates:ie[0]}:null}};function Mp(ie){var se=ie(_,0)[0]-ie(-_,0)[0];function de(ve,Me){var Ae=i(ve)<_,Pe=ie(Ae?ve:ve>0?ve-b:ve+b,Me),Ke=(Pe[0]-Pe[1])*x,nt=(Pe[0]+Pe[1])*x;if(Ae)return[Ke,nt];var Ze=se*x,at=Ke>0^nt>0?-1:1;return[at*Ke-p(nt)*Ze,at*nt-p(Ke)*Ze]}return ie.invert&&(de.invert=function(ve,Me){var Ae=(ve+Me)*x,Pe=(Me-ve)*x,Ke=i(Ae)<.5*se&&i(Pe)<.5*se;if(!Ke){var nt=se*x,Ze=Ae>0^Pe>0?-1:1,at=-Ze*ve+(Pe>0?1:-1)*nt,yt=-Ze*Me+(Ae>0?1:-1)*nt;Ae=(-at-yt)*x,Pe=(at-yt)*x}var Pt=ie.invert(Ae,Pe);return Ke||(Pt[0]+=Ae>0?b:-b),Pt}),t.geoProjection(de).rotate([-90,-90,45]).clipAngle(180-.001)}function Te(){return Mp(Wt).scale(176.423)}function qe(){return Mp(fa).scale(111.48)}function rt(ie,se){if(!(0<=(se=+se)&&se<=20))throw new Error("invalid digits");function de(Ze){var at=Ze.length,yt=2,Pt=new Array(at);for(Pt[0]=+Ze[0].toFixed(se),Pt[1]=+Ze[1].toFixed(se);yt2||Ut[0]!=at[0]||Ut[1]!=at[1])&&(yt.push(Ut),at=Ut)}return yt.length===1&&Ze.length>1&&yt.push(de(Ze[Ze.length-1])),yt}function Ae(Ze){return Ze.map(Me)}function Pe(Ze){if(Ze==null)return Ze;var at;switch(Ze.type){case"GeometryCollection":at={type:"GeometryCollection",geometries:Ze.geometries.map(Pe)};break;case"Point":at={type:"Point",coordinates:de(Ze.coordinates)};break;case"MultiPoint":at={type:Ze.type,coordinates:ve(Ze.coordinates)};break;case"LineString":at={type:Ze.type,coordinates:Me(Ze.coordinates)};break;case"MultiLineString":case"Polygon":at={type:Ze.type,coordinates:Ae(Ze.coordinates)};break;case"MultiPolygon":at={type:"MultiPolygon",coordinates:Ze.coordinates.map(Ae)};break;default:return Ze}return Ze.bbox!=null&&(at.bbox=Ze.bbox),at}function Ke(Ze){var at={type:"Feature",properties:Ze.properties,geometry:Pe(Ze.geometry)};return Ze.id!=null&&(at.id=Ze.id),Ze.bbox!=null&&(at.bbox=Ze.bbox),at}if(ie!=null)switch(ie.type){case"Feature":return Ke(ie);case"FeatureCollection":{var nt={type:"FeatureCollection",features:ie.features.map(Ke)};return ie.bbox!=null&&(nt.bbox=ie.bbox),nt}default:return Pe(ie)}return ie}function Ye(ie){var se=v(ie);function de(ve,Me){var Ae=se?m(ve*se/2)/se:ve/2;if(!Me)return[2*Ae,-ie];var Pe=2*n(Ae*v(Me)),Ke=1/m(Me);return[v(Pe)*Ke,Me+(1-o(Pe))*Ke-ie]}return de.invert=function(ve,Me){if(i(Me+=ie)g&&--Ke>0);var Pt=ve*(Ze=m(Pe)),Ut=m(i(Me)0?_:-_)*(nt+Me*(at-Pe)/2+Me*Me*(at-2*nt+Pe)/2)]}Kt.invert=function(ie,se){var de=se/_,ve=de*90,Me=f(18,i(ve/5)),Ae=c(0,l(Me));do{var Pe=Gt[Ae][1],Ke=Gt[Ae+1][1],nt=Gt[f(19,Ae+2)][1],Ze=nt-Pe,at=nt-2*Ke+Pe,yt=2*(i(de)-Ke)/Ze,Pt=at/Ze,Ut=yt*(1-Pt*yt*(1-2*Pt*yt));if(Ut>=0||Ae===1){ve=(se>=0?5:-5)*(Ut+Me);var ar=50,Ar;do Me=f(18,i(ve)/5),Ae=l(Me),Ut=Me-Ae,Pe=Gt[Ae][1],Ke=Gt[Ae+1][1],nt=Gt[f(19,Ae+2)][1],ve-=(Ar=(se>=0?_:-_)*(Ke+Ut*(nt-Pe)/2+Ut*Ut*(nt-2*Ke+Pe)/2)-se)*E;while(i(Ar)>w&&--ar>0);break}}while(--Ae>=0);var Vr=Gt[Ae][0],_i=Gt[Ae+1][0],rn=Gt[f(19,Ae+2)][0];return[ie/(_i+Ut*(rn-Vr)/2+Ut*Ut*(rn-2*_i+Vr)/2),ve*S]};function cr(){return t.geoProjection(Kt).scale(152.63)}function mr(ie){function se(de,ve){var Me=o(ve),Ae=(ie-1)/(ie-Me*o(de));return[Ae*Me*v(de),Ae*v(ve)]}return se.invert=function(de,ve){var Me=de*de+ve*ve,Ae=F(Me),Pe=(ie-F(1-Me*(ie+1)/(ie-1)))/((ie-1)/Ae+Ae/(ie-1));return[a(de*Pe,Ae*F(1-Pe*Pe)),Ae?k(ve*Pe/Ae):0]},se}function Pr(ie,se){var de=mr(ie);if(!se)return de;var ve=o(se),Me=v(se);function Ae(Pe,Ke){var nt=de(Pe,Ke),Ze=nt[1],at=Ze*Me/(ie-1)+ve;return[nt[0]*ve/at,Ze/at]}return Ae.invert=function(Pe,Ke){var nt=(ie-1)/(ie-1-Ke*Me);return de.invert(nt*Pe,nt*Ke*ve)},Ae}function rr(){var ie=2,se=0,de=t.geoProjectionMutator(Pr),ve=de(ie,se);return ve.distance=function(Me){return arguments.length?de(ie=+Me,se):ie},ve.tilt=function(Me){return arguments.length?de(ie,se=Me*S):se*E},ve.scale(432.147).clipAngle(D(1/ie)*E-1e-6)}var fr=1e-4,pr=1e4,Dr=-180,Hr=Dr+fr,zi=180,ki=zi-fr,Vi=-90,Xi=Vi+fr,Yr=90,ai=Yr-fr;function on(ie){return ie.length>0}function En(ie){return Math.floor(ie*pr)/pr}function ga(ie){return ie===Vi||ie===Yr?[0,ie]:[Dr,En(ie)]}function $a(ie){var se=ie[0],de=ie[1],ve=!1;return se<=Hr?(se=Dr,ve=!0):se>=ki&&(se=zi,ve=!0),de<=Xi?(de=Vi,ve=!0):de>=ai&&(de=Yr,ve=!0),ve?[se,de]:ie}function Ca(ie){return ie.map($a)}function xo(ie,se,de){for(var ve=0,Me=ie.length;ve=ki||at<=Xi||at>=ai){Ae[Pe]=$a(nt);for(var yt=Pe+1;ytHr&&UtXi&&ar=Ke)break;de.push({index:-1,polygon:se,ring:Ae=Ae.slice(yt-1)}),Ae[0]=ga(Ae[0][1]),Pe=-1,Ke=Ae.length}}}}function aa(ie){var se,de=ie.length,ve={},Me={},Ae,Pe,Ke,nt,Ze;for(se=0;se0?b-Ke:Ke)*E],Ze=t.geoProjection(ie(Pe)).rotate(nt),at=t.geoRotation(nt),yt=Ze.center;return delete Ze.rotate,Ze.center=function(Pt){return arguments.length?yt(at(Pt)):at.invert(yt())},Ze.clipAngle(90)}function bl(ie){var se=o(ie);function de(ve,Me){var Ae=t.geoGnomonicRaw(ve,Me);return Ae[0]*=se,Ae}return de.invert=function(ve,Me){return t.geoGnomonicRaw.invert(ve/se,Me)},de}function Au(){return vf([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function vf(ie,se){return ks(bl,ie,se)}function Hc(ie){if(!(ie*=2))return t.geoAzimuthalEquidistantRaw;var se=-ie/2,de=-se,ve=ie*ie,Me=m(de),Ae=.5/v(de);function Pe(Ke,nt){var Ze=D(o(nt)*o(Ke-se)),at=D(o(nt)*o(Ke-de)),yt=nt<0?-1:1;return Ze*=Ze,at*=at,[(Ze-at)/(2*ie),yt*F(4*ve*at-(ve-Ze+at)*(ve-Ze+at))/(2*ie)]}return Pe.invert=function(Ke,nt){var Ze=nt*nt,at=o(F(Ze+(Pt=Ke+se)*Pt)),yt=o(F(Ze+(Pt=Ke+de)*Pt)),Pt,Ut;return[a(Ut=at-yt,Pt=(at+yt)*Me),(nt<0?-1:1)*D(F(Pt*Pt+Ut*Ut)*Ae)]},Pe}function Hf(){return Yu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yu(ie,se){return ks(Hc,ie,se)}function Th(ie,se){if(i(se)g&&--Ke>0);return[p(ie)*(F(Me*Me+4)+Me)*b/4,_*Pe]};function jc(){return t.geoProjection($v).scale(127.16)}function iy(ie,se,de,ve,Me){function Ae(Pe,Ke){var nt=de*v(ve*Ke),Ze=F(1-nt*nt),at=F(2/(1+Ze*o(Pe*=Me)));return[ie*Ze*at*v(Pe),se*nt*at]}return Ae.invert=function(Pe,Ke){var nt=Pe/ie,Ze=Ke/se,at=F(nt*nt+Ze*Ze),yt=2*k(at/2);return[a(Pe*m(yt),ie*at)/Me,at&&k(Ke*v(yt)/(se*de*at))/ve]},Ae}function Wv(ie,se,de,ve){var Me=b/3;ie=c(ie,g),se=c(se,g),ie=f(ie,_),se=f(se,b-g),de=c(de,0),de=f(de,100-g),ve=c(ve,g);var Ae=de/100+1,Pe=ve/100,Ke=D(Ae*o(Me))/Me,nt=v(ie)/v(Ke*_),Ze=se/b,at=F(Pe*v(ie/2)/v(se/2)),yt=at/F(Ze*nt*Ke),Pt=1/(at*F(Ze*nt*Ke));return iy(yt,Pt,nt,Ke,Ze)}function bg(){var ie=65*S,se=60*S,de=20,ve=200,Me=t.geoProjectionMutator(Wv),Ae=Me(ie,se,de,ve);return Ae.poleline=function(Pe){return arguments.length?Me(ie=+Pe*S,se,de,ve):ie*E},Ae.parallels=function(Pe){return arguments.length?Me(ie,se=+Pe*S,de,ve):se*E},Ae.inflation=function(Pe){return arguments.length?Me(ie,se,de=+Pe,ve):de},Ae.ratio=function(Pe){return arguments.length?Me(ie,se,de,ve=+Pe):ve},Ae.scale(163.775)}function Yv(){return bg().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Mh=4*b+3*F(3),wg=2*F(2*b*F(3)/Mh),Ep=ue(wg*F(3)/b,wg,Mh/6);function kp(){return t.geoProjection(Ep).scale(176.84)}function td(ie,se){return[ie*F(1-3*se*se/(b*b)),se]}td.invert=function(ie,se){return[ie/F(1-3*se*se/(b*b)),se]};function Cp(){return t.geoProjection(td).scale(152.63)}function rd(ie,se){var de=o(se),ve=o(ie)*de,Me=1-ve,Ae=o(ie=a(v(ie)*de,-v(se))),Pe=v(ie);return de=F(1-ve*ve),[Pe*de-Ae*Me,-Ae*de-Pe*Me]}rd.invert=function(ie,se){var de=(ie*ie+se*se)/-2,ve=F(-de*(2+de)),Me=se*de+ie*ve,Ae=ie*de-se*ve,Pe=F(Ae*Ae+Me*Me);return[a(ve*Me,Pe*(1+de)),Pe?-k(ve*Ae/Pe):0]};function Xv(){return t.geoProjection(rd).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Tg(ie,se){var de=Y(ie,se);return[(de[0]+ie/_)/2,(de[1]+se)/2]}Tg.invert=function(ie,se){var de=ie,ve=se,Me=25;do{var Ae=o(ve),Pe=v(ve),Ke=v(2*ve),nt=Pe*Pe,Ze=Ae*Ae,at=v(de),yt=o(de/2),Pt=v(de/2),Ut=Pt*Pt,ar=1-Ze*yt*yt,Ar=ar?D(Ae*yt)*F(Vr=1/ar):Vr=0,Vr,_i=.5*(2*Ar*Ae*Pt+de/_)-ie,rn=.5*(Ar*Pe+ve)-se,cn=.5*Vr*(Ze*Ut+Ar*Ae*yt*nt)+.5/_,xn=Vr*(at*Ke/4-Ar*Pe*Pt),Dn=.125*Vr*(Ke*Pt-Ar*Pe*Ze*at),Qa=.5*Vr*(nt*yt+Ar*Ut*Ae)+.5,So=xn*Dn-Qa*cn,oa=(rn*xn-_i*Qa)/So,as=(_i*Dn-rn*cn)/So;de-=oa,ve-=as}while((i(oa)>g||i(as)>g)&&--Me>0);return[de,ve]};function gc(){return t.geoProjection(Tg).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=$,e.geoAiryRaw=O,e.geoAitoff=K,e.geoAitoffRaw=Y,e.geoArmadillo=q,e.geoArmadilloRaw=j,e.geoAugust=U,e.geoAugustRaw=J,e.geoBaker=G,e.geoBakerRaw=H,e.geoBerghaus=te,e.geoBerghausRaw=Q,e.geoBertin1953=Ee,e.geoBertin1953Raw=oe,e.geoBoggs=we,e.geoBoggsRaw=pe,e.geoBonne=Ie,e.geoBonneRaw=_e,e.geoBottomley=Qe,e.geoBottomleyRaw=Oe,e.geoBromley=_t,e.geoBromleyRaw=et,e.geoChamberlin=Ue,e.geoChamberlinRaw=mt,e.geoChamberlinAfrica=Ne,e.geoCollignon=je,e.geoCollignonRaw=Ge,e.geoCraig=Ve,e.geoCraigRaw=Re,e.geoCraster=Xt,e.geoCrasterRaw=Tt,e.geoCylindricalEqualArea=lr,e.geoCylindricalEqualAreaRaw=Vt,e.geoCylindricalStereographic=Bt,e.geoCylindricalStereographicRaw=ur,e.geoEckert1=kr,e.geoEckert1Raw=Zt,e.geoEckert2=tt,e.geoEckert2Raw=$e,e.geoEckert3=xt,e.geoEckert3Raw=st,e.geoEckert4=Ct,e.geoEckert4Raw=Je,e.geoEckert5=hr,e.geoEckert5Raw=ir,e.geoEckert6=si,e.geoEckert6Raw=Ur,e.geoEisenlohr=$i,e.geoEisenlohrRaw=Lr,e.geoFahey=ta,e.geoFaheyRaw=hn,e.geoFoucaut=dn,e.geoFoucautRaw=ca,e.geoFoucautSinusoidal=ra,e.geoFoucautSinusoidalRaw=Vn,e.geoGilbert=Rs,e.geoGingery=zs,e.geoGingeryRaw=ho,e.geoGinzburg4=_l,e.geoGinzburg4Raw=Xs,e.geoGinzburg5=ul,e.geoGinzburg5Raw=yu,e.geoGinzburg6=ot,e.geoGinzburg6Raw=Le,e.geoGinzburg8=kt,e.geoGinzburg8Raw=lt,e.geoGinzburg9=Rt,e.geoGinzburg9Raw=Jt,e.geoGringorten=ti,e.geoGringortenRaw=Wt,e.geoGuyou=oo,e.geoGuyouRaw=fa,e.geoHammer=Ce,e.geoHammerRaw=ce,e.geoHammerRetroazimuthal=ps,e.geoHammerRetroazimuthalRaw=Ao,e.geoHealpix=vs,e.geoHealpixRaw=Ro,e.geoHill=Ks,e.geoHillRaw=Zs,e.geoHomolosine=dc,e.geoHomolosineRaw=_u,e.geoHufnagel=ja,e.geoHufnagelRaw=Nl,e.geoHyperelliptical=iu,e.geoHyperellipticalRaw=Ss,e.geoInterrupt=Zo,e.geoInterruptedBoggs=Cv,e.geoInterruptedHomolosine=r0,e.geoInterruptedMollweide=vh,e.geoInterruptedMollweideHemispheres=i0,e.geoInterruptedSinuMollweide=gh,e.geoInterruptedSinusoidal=n0,e.geoKavrayskiy7=$0,e.geoKavrayskiy7Raw=j0,e.geoLagrange=Lv,e.geoLagrangeRaw=Fv,e.geoLarrivee=mh,e.geoLarriveeRaw=cp,e.geoLaskowski=Es,e.geoLaskowskiRaw=ju,e.geoLittrow=wu,e.geoLittrowRaw=Vo,e.geoLoximuthal=yh,e.geoLoximuthalRaw=W0,e.geoMiller=Pv,e.geoMillerRaw=a0,e.geoModifiedStereographic=hf,e.geoModifiedStereographicRaw=ug,e.geoModifiedStereographicAlaska=Rv,e.geoModifiedStereographicGs48=_h,e.geoModifiedStereographicGs50=cg,e.geoModifiedStereographicMiller=Y0,e.geoModifiedStereographicLee=fp,e.geoMollweide=ae,e.geoMollweideRaw=ee,e.geoMtFlatPolarParabolic=fg,e.geoMtFlatPolarParabolicRaw=X0,e.geoMtFlatPolarQuartic=Ym,e.geoMtFlatPolarQuarticRaw=hg,e.geoMtFlatPolarSinusoidal=Bv,e.geoMtFlatPolarSinusoidalRaw=Uf,e.geoNaturalEarth2=dp,e.geoNaturalEarth2Raw=Vf,e.geoNellHammer=Z0,e.geoNellHammerRaw=pc,e.geoInterruptedQuarticAuthalic=dg,e.geoNicolosi=pg,e.geoNicolosiRaw=qv,e.geoPatterson=o0,e.geoPattersonRaw=vp,e.geoPolyconic=gg,e.geoPolyconicRaw=bh,e.geoPolyhedral=K0,e.geoPolyhedralButterfly=wh,e.geoPolyhedralCollignon=ey,e.geoPolyhedralWaterman=_p,e.geoProject=Gv,e.geoGringortenQuincuncial=Te,e.geoPeirceQuincuncial=qe,e.geoPierceQuincuncial=qe,e.geoQuantize=rt,e.geoQuincuncial=Mp,e.geoRectangularPolyconic=At,e.geoRectangularPolyconicRaw=Ye,e.geoRobinson=cr,e.geoRobinsonRaw=Kt,e.geoSatellite=rr,e.geoSatelliteRaw=Pr,e.geoSinuMollweide=xu,e.geoSinuMollweideRaw=ru,e.geoSinusoidal=ke,e.geoSinusoidalRaw=Se,e.geoStitch=po,e.geoTimes=Sa,e.geoTimesRaw=di,e.geoTwoPointAzimuthal=vf,e.geoTwoPointAzimuthalRaw=bl,e.geoTwoPointAzimuthalUsa=Au,e.geoTwoPointEquidistant=Yu,e.geoTwoPointEquidistantRaw=Hc,e.geoTwoPointEquidistantUsa=Hf,e.geoVanDerGrinten=Ah,e.geoVanDerGrintenRaw=Th,e.geoVanDerGrinten2=_g,e.geoVanDerGrinten2Raw=Sp,e.geoVanDerGrinten3=Mx,e.geoVanDerGrinten3Raw=jv,e.geoVanDerGrinten4=jc,e.geoVanDerGrinten4Raw=$v,e.geoWagner=bg,e.geoWagner7=Yv,e.geoWagnerRaw=Wv,e.geoWagner4=kp,e.geoWagner4Raw=Ep,e.geoWagner6=Cp,e.geoWagner6Raw=td,e.geoWiechel=Xv,e.geoWiechelRaw=rd,e.geoWinkel3=gc,e.geoWinkel3Raw=Tg,Object.defineProperty(e,"__esModule",{value:!0})}))});var kVe=W((zjr,EVe)=>{"use strict";var nl=vi(),uQ=it(),$rr=yi(),R4=Math.PI/180,Tb=180/Math.PI,fQ={cursor:"pointer"},hQ={cursor:"auto"};function Wrr(e,t){var r=e.projection,i;return t._isScoped?i=Yrr:t._isClipped?i=Zrr:i=Xrr,i(e,r)}EVe.exports=Wrr;function dQ(e,t){return nl.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function pQ(e,t,r){var i=e.id,n=e.graphDiv,a=n.layout,o=a[i],s=n._fullLayout,l=s[i],u={},c={};function f(h,d){u[i+"."+h]=uQ.nestedProperty(o,h).get(),$rr.call("_storeDirectGUIEdit",a,s._preGUI,u);var p=uQ.nestedProperty(l,h);p.get()!==d&&(p.set(d),uQ.nestedProperty(o,h).set(d),c[i+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),n.emit("plotly_relayout",c)}function Yrr(e,t){var r=dQ(e,t);function i(){nl.select(this).style(fQ)}function n(){t.scale(nl.event.scale).translate(nl.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 a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nl.select(this).style(hQ),pQ(e,t,a)}return r.on("zoomstart",i).on("zoom",n).on("zoomend",o),r}function Xrr(e,t){var r=dQ(e,t),i=2,n,a,o,s,l,u,c,f,h;function d(b){return t.invert(b)}function p(b){var _=d(b);if(!_)return!0;var M=t(_);return Math.abs(M[0]-b[0])>i||Math.abs(M[1]-b[1])>i}function v(){nl.select(this).style(fQ);let{x:b,y:_,width:M,height:x}=this.getBBox();n=nl.event.sourceEvent?nl.mouse(this):[b+M/2,_+x/2],a=t.rotate(),o=t.translate(),s=a,l=d(n)}function m(){let{x:b,y:_,width:M,height:x}=this.getBBox();if(u=nl.event.sourceEvent?nl.mouse(this):[b+M/2,_+x/2],p(n)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nl.event.scale),t.translate([o[0],nl.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(n=u,l=d(n)),h=!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 g(){nl.select(this).style(hQ),h&&pQ(e,t,w)}function w(b){var _=t.rotate(),M=t.invert(e.midPt);b("projection.rotation.lon",-_[0]),b("center.lon",M[0]),b("center.lat",M[1])}return r.on("zoomstart",v).on("zoom",m).on("zoomend",g),r}function Zrr(e,t){var r={r:t.rotate(),k:t.scale()},i=dQ(e,t),n=nir(i,"zoomstart","zoom","zoomend"),a=0,o=i.on,s;i.on("zoomstart",function(){nl.select(this).style(fQ);let{x:h,y:d,width:p,height:v}=this.getBBox(),m=nl.event.sourceEvent?nl.mouse(this):[h+p/2,d+v/2],g=t.rotate(),w=g,b=t.translate(),_=Krr(g);s=JI(t,m),o.call(i,"zoom",function(){let{x:M,y:x,width:T,height:A}=this.getBBox(),y=nl.event.sourceEvent?nl.mouse(this):[M+T/2,x+A/2];if(t.scale(r.k=nl.event.scale),!s)m=y,s=JI(t,m);else if(JI(t,y)){t.rotate(g).translate(b);var E=JI(t,y),S=Qrr(s,E),C=tir(Jrr(_,S)),k=r.r=eir(C,s,w);(!isFinite(k[0])||!isFinite(k[1])||!isFinite(k[2]))&&(k=w),t.rotate(k),w=k}u(n.of(this,arguments))}),l(n.of(this,arguments))}).on("zoomend",function(){nl.select(this).style(hQ),o.call(i,"zoom",null),c(n.of(this,arguments)),pQ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nl.rebind(i,n,"on")}function JI(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&rir(r)}function Krr(e){var t=.5*e[0]*R4,r=.5*e[1]*R4,i=.5*e[2]*R4,n=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i);return[a*s*u+n*o*l,n*s*u-a*o*l,a*o*u+n*s*l,a*s*l-n*o*u]}function Jrr(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-i*s-n*l-a*u,r*s+i*o+n*u-a*l,r*l-i*u+n*o+a*s,r*u+i*l-n*s+a*o]}function Qrr(e,t){if(!(!e||!t)){var r=iir(e,t),i=Math.sqrt(SVe(r,r)),n=.5*Math.acos(Math.max(-1,Math.min(1,SVe(e,t)))),a=Math.sin(n)/i;return i&&[Math.cos(n),r[2]*a,-r[1]*a,r[0]*a]}}function eir(e,t,r){var i=cQ(t,2,e[0]);i=cQ(i,1,e[1]),i=cQ(i,0,e[2]-r[2]);var n=t[0],a=t[1],o=t[2],s=i[0],l=i[1],u=i[2],c=Math.atan2(a,n)*Tb,f=Math.sqrt(n*n+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*Tb-c,h=Math.sqrt(f*f-l*l));var p=180-d-2*c,v=(Math.atan2(u,s)-Math.atan2(o,h))*Tb,m=(Math.atan2(u,s)-Math.atan2(o,-h))*Tb,g=AVe(r[0],r[1],d,v),w=AVe(r[0],r[1],p,m);return g<=w?[d,v,r[2]]:[p,m,r[2]]}function AVe(e,t,r,i){var n=MVe(r-e),a=MVe(i-t);return Math.sqrt(n*n+a*a)}function MVe(e){return(e%360+540)%360-180}function cQ(e,t,r){var i=r*R4,n=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(i),l=Math.sin(i);return n[a]=e[a]*s-e[o]*l,n[o]=e[o]*s+e[a]*l,n}function tir(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*Tb,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*Tb,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*Tb]}function rir(e){var t=e[0]*R4,r=e[1]*R4,i=Math.cos(r);return[i*Math.cos(t),i*Math.sin(t),Math.sin(r)]}function SVe(e,t){for(var r=0,i=0,n=e.length;i{"use strict";var q1=vi(),mQ=HI(),air=mQ.geoPath,oir=mQ.geoDistance,sir=TVe(),lir=yi(),mE=it(),uir=mE.strTranslate,QI=ni(),gE=Ji(),CVe=Ds(),cir=Ko(),gQ=ji(),{concatExtremes:fir,getAutoRange:DVe,makePadFn:FVe}=Op(),vQ=bf(),hir=cu().prepSelect,dir=cu().clearOutline,pir=cu().selectOnClick,vir=kVe(),oh=fE(),yQ=cm(),{unwrapLonRange:gir}=yQ,PVe=II(),mir=GJ().feature;function IVe(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 dv=IVe.prototype;RVe.exports=function(t){return new IVe(t)};dv.plot=function(e,t,r,i){var n=this;if(i)return n.update(e,t,!0);n._geoCalcData=e,n._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in oh.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)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),cir.generalUpdatePerTraceModule(this.graphDiv,this,e,i);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()};dv.updateProjection=function(e,t){var r=this.graphDiv,i=t[this.id],n=t._size,a=i.domain,o=i.projection,s=i.lonaxis,l=i.lataxis,u=s._ax,c=l._ax,f=this.projection=yir(i),h=[[n.l+n.w*a.x[0],n.t+n.h*(1-a.y[1])],[n.l+n.w*a.x[1],n.t+n.h*(1-a.y[0])]],d=i.center||{},p=o.rotation||{},v=s.range||[],m=l.range||[];if(i.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=DVe(r,u),c.range=DVe(r,c);let F=[];for(let j of e){let q=j[0].trace;q.visible===!0&&q._module.fitCoords&&F.push(q._module.fitCoords(j,i))}let P=fir(r,u),R=P.min.reduce((j,{val:q})=>Math.min(j,q),1/0),I=P.max.reduce((j,{val:q})=>Math.max(j,q),-1/0)-R,B=yQ.boundsOfCoords(F.flat()),[O,,$]=B||[],Y=$-O;if(!!B&&(I>360||I<360&&YMath.max(G,j(Q)),0),U=P.max.reduce((G,Q)=>Math.max(G,q(Q)),0),V=u._length-J-U,X=V>u._length/10?Y*u._length/V:Y,H=(O+$)/2;u.range=[H-X/2,H+X/2]}var g=(u.range[0]+u.range[1])/2,w=(c.range[0]+c.range[1])/2;if(i._isScoped)d={lon:g,lat:w};else if(i._isClipped){d={lon:g,lat:w},p={lon:g,lat:w,roll:p.roll};var b=o.type,_=oh.lonaxisSpan[b]/2||180,M=oh.lataxisSpan[b]/2||90;v=[g-_,g+_],m=[w-M,w+M]}else d={lon:g,lat:w},p={lon:g,lat:p.lat,roll:p.roll}}f.center([d.lon-p.lon,d.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var x=LVe(v,m);f.fitExtent(h,x);var T=this.bounds=f.getBounds(x),A=this.fitScale=f.scale(),y=f.translate();if(f.scaleExtent=()=>{var R;let{minscale:F}=o,P=(R=o.maxscale)!=null?R:1/0;return[A*Math.min(F,P),A*Math.max(F,P)]},i.fitbounds){var E=f.getBounds(LVe(u.range,c.range)),S=Math.min((T[1][0]-T[0][0])/(E[1][0]-E[0][0]),(T[1][1]-T[0][1])/(E[1][1]-E[0][1]));isFinite(S)?f.scale(S*A):mE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*A);var C=this.midPt=[(T[0][0]+T[1][0])/2,(T[0][1]+T[1][1])/2];if(f.translate([y[0]+(C[0]-y[0]),y[1]+(C[1]-y[1])]).clipExtent(T),i._isAlbersUsa){var k=f([d.lon,d.lat]);if(k){var D=f.translate();f.translate([D[0]-(k[0]-D[0]),D[1]-(k[1]-D[1])])}}};dv.updateBaseLayers=function(e,t){var r=this,i=r.topojson,n=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!oh.lineLayers[h]}function l(h){return!!oh.fillLayers[h]}var u=this.hasChoropleth?oh.layersForChoropleth:oh.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete n[h],delete a[h],q1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=n[h]=q1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],p=oh.layerNameToAdjective[h];h==="frame"?d.datum(oh.sphereSVG):s(h)||l(h)?d.datum(mir(i,i.objects[h])):o(h)&&d.datum(xir(h,t,e)).call(QI.stroke,t[h].gridcolor).call(gE.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(QI.stroke,t[p+"color"]).call(gE.dashLine,"",t[p+"width"]):l(h)&&d.call(QI.fill,t[p+"color"])})};dv.updateDims=function(e,t){var r=this.bounds,i=(t.framewidth||0)/2,n=r[0][0]-i,a=r[0][1]-i,o=r[1][0]-n+i,s=r[1][1]-a+i;gE.setRect(this.clipRect,n,a,o,s),this.bgRect.call(gE.setRect,n,a,o,s).call(QI.fill,t.bgcolor),this.xaxis._offset=n,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};dv.updateFx=function(e,t){var r=this,i=r.graphDiv,n=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];lir.call("_guiRelayout",i,h),i.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,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var p=f.lassoPoints={};p[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:i,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&&dir(i)}};if(a==="pan"){n.node().onmousedown=null;let f=vir(r,t);if(n.call(f),!q1.event){let h=r.projection.scale(),[d,p]=r.projection.scaleExtent();(hp)&&f.event(n)}n.on("dblclick.zoom",s),i._context._scrollZoom.geo||n.on("wheel.zoom",null)}else(a==="select"||a==="lasso")&&(n.on(".zoom",null),c.prepFn=function(f,h,d){hir(f,h,d,c,a)},vQ.init(c));n.on("mousemove",function(){var f=r.projection.invert(mE.getPositionFromD3Event());if(!f)return vQ.unhover(i,q1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},CVe.hover(i,q1.event,r.id)}),n.on("mouseout",function(){i._dragging||vQ.unhover(i,q1.event)}),n.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&pir(q1.event,i,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&CVe.click(i,q1.event))})};dv.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=q1.select(e.container).append("g").attr("class","geo "+e.id).call(gE.setClipUrl,i,t),e.project=function(n){var a=e.projection(n);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(n){return e.project(n)[0]}},e.yaxis={_id:"y",c2p:function(n){return e.project(n)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gQ.setConvert(e.mockAxis,r)};dv.saveViewInitial=function(e){var t=e.center||{},r=e.projection,i=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var n;e._isScoped?n={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?n={"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat,"center.lon":t.lon,"center.lat":t.lat}:n={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":i.lon},mE.extendFlat(this.viewInitial,n)};dv.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};dv._render=function(){var e=this.projection,t=e.getPath(),r;function i(a){var o=e(a.lonlat);return o?uir(o[0],o[1]):null}function n(a){return e.isLonLatOverEdges(a.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(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",n).attr("transform",i)};function yir(e){var t=e.projection,r=t.type,i=oh.projNames[r];i="geo"+mE.titleCase(i);for(var n=mQ[i]||sir[i],a=n(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?oh.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;up}else return!1},a.getPath=function(){return air().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(oh.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-oh.clipPad),a}function xir(e,t,r){var i=1e-6,n=2.5,a=t[e],o=oh.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(w,b){return[w,b]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(w,b){return[b,w]});var c={type:"linear",range:[s[0],s[1]-i],tick0:a.tick0,dtick:a.dtick};gQ.setConvert(c,r);var f=gQ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),p=0;p{"use strict";var B4=Vl(),_ir=us().attributes,bir=Du().dash,z4=fE(),wir=ls().overrideAll,BVe=(qx(),Go(Bx)).default,qVe={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:B4.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:bir},Tir=OVe.exports=wir({domain:_ir({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:BVe(z4.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:BVe(z4.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:B4.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:z4.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:z4.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:z4.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:z4.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:B4.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:B4.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:B4.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:B4.background},lonaxis:qVe,lataxis:qVe},"plot","from-root");Tir.uirevision={valType:"any",editType:"none"}});var VVe=W((Ojr,UVe)=>{"use strict";var eR=it(),Air=q_(),Mir=_c().getSubplotData,{unwrapLonRange:Sir}=cm(),yE=fE(),Eir=xQ(),NVe=yE.axesNames;UVe.exports=function(t,r,i){Air(t,r,i,{type:"geo",attributes:Eir,handleDefaults:kir,fullData:i,partition:"y"})};function kir(e,t,r,i){var n=Mir(i.fullData,"geo",i.id),a=n.map(function(B){return B.index}),o=r("resolution"),s=r("scope"),l=yE.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",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!yE.lonaxisSpan[u];if(e.visible===!1){var v=eR.extendDeep({},t._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),t._template=v}for(var m=r("visible"),g,w=0;wJ[U]!=null)||yE.fitboundsIncompatible.has(u)?t.fitbounds=!1:j.forEach(({dst:J,key:U})=>J&&(J[U]=null))}}});var _Q=W((Njr,jVe)=>{"use strict";var Cir=_c().getSubplotCalcData,Dir=it().counterRegex,Fir=zVe(),O1="geo",GVe=Dir(O1),HVe={};HVe[O1]={valType:"subplotid",dflt:O1,editType:"calc"};function Lir(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[O1],n=0;n{"use strict";$Ve.exports={attributes:I4(),supplyDefaults:xUe(),colorbar:Ac(),formatLabels:wUe(),calc:VJ(),calcGeoJSON:XI().calcGeoJSON,fitCoords:XI().fitCoords,plot:XI().plot,style:aQ(),styleOnSelect:th().styleOnSelect,hoverPoints:pVe(),eventData:gVe(),selectPoints:xVe(),moduleType:"trace",name:"scattergeo",basePlotModule:_Q(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var XVe=W((Vjr,YVe)=>{"use strict";YVe.exports=WVe()});var xE=W((Gjr,JVe)=>{"use strict";var{hovertemplateAttrs:Rir,templatefallbackAttrs:zir}=Ga(),k2=I4(),Bir=Eo(),ZVe=Wa(),qir=Vl().defaultLine,E2=tn().extendFlat,KVe=k2.marker.line;JVe.exports=E2({locations:{valType:"data_array",editType:"calc"},locationmode:k2.locationmode,z:{valType:"data_array",editType:"calc"},geojson:E2({},k2.geojson,{}),featureidkey:k2.featureidkey,text:E2({},k2.text,{}),hovertext:E2({},k2.hovertext,{}),marker:{line:{color:E2({},KVe.color,{dflt:qir}),width:E2({},KVe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:k2.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:k2.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:E2({},ZVe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Rir(),hovertemplatefallback:zir(),showlegend:E2({},ZVe.showlegend,{dflt:!1})},Bir("",{cLetter:"z",editTypeOverride:"calc"}))});var eGe=W((Hjr,QVe)=>{"use strict";var tR=it(),Oir=Fu(),Nir=xE();QVe.exports=function(t,r,i,n){function a(h,d){return tR.coerce(t,r,Nir,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&tR.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||tR.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),Oir(t,r,n,a,{prefix:"",cLetter:"z"}),tR.coerceSelectionMarkerOpacity(r,a)}});var bQ=W((jjr,iGe)=>{"use strict";var tGe=sn(),Uir=Kn().BADNUM,Vir=Zc(),Gir=x1(),Hir=w0();function rGe(e){return e&&typeof e=="string"}iGe.exports=function(t,r){var i=r._length,n=new Array(i),a;r.geojson?a=function(c){return rGe(c)||tGe(c)}:a=rGe;for(var o=0;o{"use strict";var jir=vi(),$ir=ni(),wQ=Ji(),Wir=Jo();function Yir(e,t){t&&nGe(e,t)}function nGe(e,t){var r=t[0].trace,i=t[0].node3,n=i.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=Wir.makeColorScaleFuncFromTrace(r);n.each(function(l){jir.select(this).attr("fill",s(l.z)).call($ir.stroke,l.mlc||o.color).call(wQ.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),wQ.selectedPointStyle(n,r)}function Xir(e,t){var r=t[0].node3,i=t[0].trace;i.selectedpoints?wQ.selectedPointStyle(r.selectAll(".choroplethlocation"),i):nGe(e,t)}aGe.exports={style:Yir,styleOnSelect:Xir}});var iR=W((Wjr,lGe)=>{"use strict";var Zir=vi(),oGe=it(),Ab=cm(),Kir=II().getTopojsonFeatures,sGe=Op().findExtremes,Jir=rR().style;function Qir(e,t,r){var i=t.layers.backplot.select(".choroplethlayer");oGe.makeTraceGroups(i,r,"trace choropleth").each(function(n){var a=Zir.select(this),o=a.selectAll("path.choroplethlocation").data(oGe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Jir(e,n)})}function enr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?Ab.extractTraceFeature(e):Kir(r,n.topojson);let l=Ab.fitGeojsonBbox(r,i);for(var u=[],c=[],f=0;f{"use strict";var rnr=ji(),inr=xE(),nnr=it().fillText,{ANTIMERIDIAN_LON_SHIFT:anr}=cm();uGe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s,l,u,c,f=[r,i];let h=[r+anr,i];for(l=0;l")}}});var AQ=W((Xjr,cGe)=>{"use strict";cGe.exports=function(t,r,i,n,a){t.location=r.location,t.z=r.z;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var MQ=W((Zjr,fGe)=>{"use strict";fGe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";hGe.exports={attributes:xE(),supplyDefaults:eGe(),colorbar:x5(),calc:bQ(),calcGeoJSON:iR().calcGeoJSON,fitCoords:iR().fitCoords,plot:iR().plot,style:rR().style,styleOnSelect:rR().styleOnSelect,hoverPoints:TQ(),eventData:AQ(),selectPoints:MQ(),moduleType:"trace",name:"choropleth",basePlotModule:_Q(),categories:["geo","noOpacity","showLegend"],meta:{}}});var vGe=W((Jjr,pGe)=>{"use strict";pGe.exports=dGe()});var nR=W((Qjr,mGe)=>{"use strict";var snr=yi(),L0=it(),lnr=Xw(),unr=Ji();function cnr(e,t,r,i){var n=e.cd,a=n[0].t,o=n[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,p;if(a.tree){var v=s.p2c(f-d),m=s.p2c(f+d),g=l.p2c(h-d),w=l.p2c(h+d);i==="x"?p=a.tree.range(Math.min(v,m),Math.min(l._rl[0],l._rl[1]),Math.max(v,m),Math.max(l._rl[0],l._rl[1])):p=a.tree.range(Math.min(v,m),Math.min(g,w),Math.max(v,m),Math.max(g,w))}else p=a.ids;var b,_,M,x,T,A,y,E,S,C=d;if(i==="x"){var k=!!o.xperiodalignment,D=!!o.yperiodalignment;for(T=0;T=Math.min(F,P)&&f<=Math.max(F,P)?0:1/0}if(A=Math.min(R,L)&&h<=Math.max(R,L)?0:1/0}S=Math.sqrt(A*A+y*y),_=p[T]}}}else for(T=p.length-1;T>-1;T--)b=p[T],M=u[b],x=c[b],A=s.c2p(M)-f,y=l.c2p(x)-h,E=Math.sqrt(A*A+y*y),E{"use strict";var yGe=20;xGe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:yGe,SYMBOL_STROKE:yGe/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 _E=W((t$r,TGe)=>{"use strict";var fnr=Wa(),hnr=Ho(),dnr=g1(),Ls=Ns(),_Ge=_s().axisHoverFormat,bGe=Eo(),pnr=(qx(),Go(Bx)).default,SQ=tn().extendFlat,vnr=ls().overrideAll,gnr=C2().DASHES,wGe=Ls.line,fm=Ls.marker,mnr=fm.line,D2=TGe.exports=vnr({x:Ls.x,x0:Ls.x0,dx:Ls.dx,y:Ls.y,y0:Ls.y0,dy:Ls.dy,xperiod:Ls.xperiod,yperiod:Ls.yperiod,xperiod0:Ls.xperiod0,yperiod0:Ls.yperiod0,xperiodalignment:Ls.xperiodalignment,yperiodalignment:Ls.yperiodalignment,xhoverformat:_Ge("x"),yhoverformat:_Ge("y"),text:Ls.text,hovertext:Ls.hovertext,textposition:Ls.textposition,textfont:hnr({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:wGe.color,width:wGe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:pnr(gnr),dflt:"solid"}},marker:SQ({},bGe("marker"),{symbol:fm.symbol,angle:fm.angle,size:fm.size,sizeref:fm.sizeref,sizemin:fm.sizemin,sizemode:fm.sizemode,opacity:fm.opacity,colorbar:fm.colorbar,line:SQ({},bGe("marker.line"),{width:mnr.width})}),connectgaps:Ls.connectgaps,fill:SQ({},Ls.fill,{dflt:"none"}),fillcolor:dnr(),selected:{marker:Ls.selected.marker,textfont:Ls.selected.textfont},unselected:{marker:Ls.unselected.marker,textfont:Ls.unselected.textfont},opacity:fnr.opacity},"calc","nested");D2.x.editType=D2.y.editType=D2.x0.editType=D2.y0.editType="calc+clearAxisTypes";D2.hovertemplate=Ls.hovertemplate;D2.hovertemplatefallback=Ls.hovertemplatefallback;D2.texttemplate=Ls.texttemplate;D2.texttemplatefallback=Ls.texttemplatefallback});var aR=W(EQ=>{"use strict";var AGe=C2();EQ.isOpenSymbol=function(e){return typeof e=="string"?AGe.OPEN_RE.test(e):e%200>100};EQ.isDotSymbol=function(e){return typeof e=="string"?AGe.DOT_RE.test(e):e>200}});var EGe=W((i$r,SGe)=>{"use strict";var MGe=it(),ynr=yi(),xnr=aR(),_nr=_E(),bnr=v1(),oR=$o(),wnr=x_(),Tnr=Hp(),Anr=bd(),Mnr=jp(),Snr=y1(),Enr=$p();SGe.exports=function(t,r,i,n){function a(d,p){return MGe.coerce(t,r,_nr,d,p)}var o=t.marker?xnr.isOpenSymbol(t.marker.symbol):!1,s=oR.isBubble(t),l=wnr(t,r,n,a);if(!l){r.visible=!1;return}Tnr(t,r,n,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var knr=mF();kGe.exports=function(t,r,i){var n=t.i;return"x"in t||(t.x=r._x[n]),"y"in t||(t.y=r._y[n]),knr(t,r,i)}});var FGe=W((a$r,DGe)=>{"use strict";function Cnr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,n=o-1):i=o+1}return a}function Dnr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,n=o-1):i=o+1}return a}function Fnr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,i=o+1):n=o-1}return a}function Lnr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,i=o+1):n=o-1}return a}function Pnr(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?i=a+1:n=a-1}return-1}function bE(e,t,r,i,n,a){return typeof r=="function"?a(e,t,r,i===void 0?0:i|0,n===void 0?e.length-1:n|0):a(e,t,void 0,r===void 0?0:r|0,i===void 0?e.length-1:i|0)}DGe.exports={ge:function(e,t,r,i,n){return bE(e,t,r,i,n,Cnr)},gt:function(e,t,r,i,n){return bE(e,t,r,i,n,Dnr)},lt:function(e,t,r,i,n){return bE(e,t,r,i,n,Fnr)},le:function(e,t,r,i,n){return bE(e,t,r,i,n,Lnr)},eq:function(e,t,r,i,n){return bE(e,t,r,i,n,Pnr)}}});var kQ=W((o$r,LGe)=>{LGe.exports=Inr;function Inr(e,t,r){return tr?r:e:et?t:e}});var N1=W((s$r,IGe)=>{"use strict";IGe.exports=function(t,r,i){var n={},a,o;if(typeof r=="string"&&(r=PGe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var Rnr=N1();RGe.exports=znr;function znr(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=Rnr(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 Mb=W((u$r,zGe)=>{"use strict";zGe.exports=Bnr;function Bnr(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),i=0;in&&(n=e[o]),e[o]{"use strict";BGe.exports=function(){for(var t=0;t{OGe.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 Sb=W((h$r,UGe)=>{var NGe=sR();UGe.exports=qnr;function qnr(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 i=e[0].length,n=e.length*i,a,o,s,l;(!t||typeof t=="string")&&(t=new(NGe(t||"float32"))(n+r));var u=t.length-r;if(n!==u)throw new Error("source length "+n+" ("+i+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";VGe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var jGe=W((p$r,HGe)=>{"use strict";HGe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var JGe=W((v$r,KGe)=>{"use strict";var $Ge=FGe(),WGe=kQ(),Onr=q4(),Nnr=Mb(),YGe=N1(),DQ=qGe(),Unr=Sb(),Vnr=GGe(),Gnr=sR(),XGe=jGe(),Hnr=1073741824;KGe.exports=function(t,r){r||(r={}),t=Unr(t,"float64"),r=YGe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let i=DQ(r.maxDepth,255),n=DQ(r.bounds,Nnr(t,2));n[0]===n[2]&&n[2]++,n[1]===n[3]&&n[3]++;let a=ZGe(t,n),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(Gnr(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;gi||x>Hnr){for(let L=0;L<_.length;L++)T.push(_[L]),A.push(x),y.push(null,null,null,null);return E}if(T.push(_[0]),A.push(x),_.length<=1)return y.push(null,null,null,null),E;let S=b*.5,C=g+S,k=w+S,D=[],F=[],P=[],R=[];for(let L=1,I=_.length;L$||y>Y||E=C||B===O)return;let K=l[I];O===void 0&&(O=K.length);for(let Q=B;Q=_&&ce<=x&&ge>=M&&ge<=T&&k.push(te)}let j=u[I],q=j[B*4+0],J=j[B*4+1],U=j[B*4+2],V=j[B*4+3],X=F(j,B+1),H=L*.5,G=I+1;D(P,R,H,G,q,J||U||V||X),D(P,R+H,H,G,J,U||V||X),D(P+H,R,H,G,U,V||X),D(P+H,R+H,H,G,V,X)}function F(P,R){let L=null,I=0;for(;L===null;)if(L=P[R*4+I],I++,I>P.length)return null;return L}return k}function v(g,w,b,_,M){let x=[];for(let T=0;T{"use strict";QGe.exports=JGe()});var tHe=W((m$r,eHe)=>{eHe.exports=$nr;var FQ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},jnr=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function $nr(e){var t=[];return e.replace(jnr,function(r,i,n){var a=i.toLowerCase();for(n=Ynr(n),a=="m"&&n.length>2&&(t.push([i].concat(n.splice(0,2))),a="l",i=i=="m"?"l":"L");;){if(n.length==FQ[a])return n.unshift(i),t.push(n);if(n.length{rHe.exports=Xnr;function Xnr(e){var t=0,r=0,i=0,n=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=i,a[7]+=n;break;case"v":a[1]+=n;break;case"h":a[1]+=i;break;default:for(var l=1;l{"use strict";Object.defineProperty(uR,"__esModule",{value:!0});var Znr=(function(){function e(t,r){var i=[],n=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(i.push(l.value),!(r&&i.length===r));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}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")}})(),wE=Math.PI*2,LQ=function(t,r,i,n,a,o,s){var l=t.x,u=t.y;l*=r,u*=i;var c=n*l-a*u,f=a*l+n*u;return{x:c+o,y:f+s}},Knr=function(t,r){var i=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),n=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:n-a*i,y:a+n*i},{x:o+s*i,y:s-o*i},{x:o,y:s}]},nHe=function(t,r,i,n){var a=t*n-r*i<0?-1:1,o=t*i+r*n;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},Jnr=function(t,r,i,n,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),p=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(h,2),g=d*p-d*m-p*v;g<0&&(g=0),g/=d*m+p*v,g=Math.sqrt(g)*(s===l?-1:1);var w=g*a/o*h,b=g*-o/a*f,_=c*w-u*b+(t+i)/2,M=u*w+c*b+(r+n)/2,x=(f-w)/a,T=(h-b)/o,A=(-f-w)/a,y=(-h-b)/o,E=nHe(1,0,x,T),S=nHe(x,T,A,y);return l===0&&S>0&&(S-=wE),l===1&&S<0&&(S+=wE),[_,M,E,S]},Qnr=function(t){var r=t.px,i=t.py,n=t.cx,a=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,h=t.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||s===0)return[];var v=Math.sin(u*wE/360),m=Math.cos(u*wE/360),g=m*(r-n)/2+v*(i-a)/2,w=-v*(r-n)/2+m*(i-a)/2;if(g===0&&w===0)return[];o=Math.abs(o),s=Math.abs(s);var b=Math.pow(g,2)/Math.pow(o,2)+Math.pow(w,2)/Math.pow(s,2);b>1&&(o*=Math.sqrt(b),s*=Math.sqrt(b));var _=Jnr(r,i,n,a,o,s,f,d,v,m,g,w),M=Znr(_,4),x=M[0],T=M[1],A=M[2],y=M[3],E=Math.abs(y)/(wE/4);Math.abs(1-E)<1e-7&&(E=1);var S=Math.max(Math.ceil(E),1);y/=S;for(var C=0;C{"use strict";lHe.exports=tar;var ear=oHe();function tar(e){for(var t,r=[],i=0,n=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(i=d[d.length-4],n=d[d.length-3]):(i=u,n=c),r.push(d)}return r}function cR(e,t,r,i){return["C",e,t,r,i,r,i]}function sHe(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]}});var PQ=W((_$r,cHe)=>{"use strict";cHe.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 hHe=W((b$r,fHe)=>{"use strict";var rar=tHe(),iar=iHe(),nar=uHe(),aar=PQ();fHe.exports=oar;function oar(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!aar(e))throw Error("String is not an SVG path.");e=rar(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=iar(e),e=nar(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,i=e.length;rt[2]&&(t[2]=n[a+0]),n[a+1]>t[3]&&(t[3]=n[a+1]);return t}});var gHe=W((w$r,vHe)=>{"use strict";vHe.exports=sar;var TE=1e20;function sar(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,n=t.channel||0,a,o,s,l,u,c,f,h,d,p,v;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");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),p=0,v=Math.floor(u.length/c);p_He});function _He(e,t={}){if(!(0,yHe.default)(e))throw Error("Invalid SVG path");let r,i;t.shape||Array.isArray(t)?[r,i]=t.shape||t:(r=IQ.width=t.width||t.w||200,i=IQ.height=t.height||t.h||200);let n=Math.min(r,i),a=t.stroke||0,o=t.viewbox||t.viewBox||(0,mHe.default)(e),s=[r/(o[2]-o[0]),i/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;pv.fillStyle="black",pv.fillRect(0,0,r,i),pv.fillStyle="white",a&&(typeof a!="number"&&(a=1),pv.strokeStyle=a>0?"white":"black",pv.lineWidth=Math.abs(a)),pv.translate(r*.5,i*.5),pv.scale(l,l);let u=new Path2D(e);return pv.fill(u),a&&pv.stroke(u),pv.setTransform(1,0,0,1,0,0),(0,xHe.default)(pv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:n*.5})}var mHe,yHe,xHe,IQ,pv,wHe=Ea(()=>{mHe=nd(hHe()),yHe=nd(PQ()),xHe=nd(gHe()),IQ=document.createElement("canvas"),pv=IQ.getContext("2d",{willReadFrequently:!0})});var kb=W((T$r,PHe)=>{"use strict";var hR=sn(),lar=(wHe(),Go(bHe)).default,{normalize:fR}=ni(),uar=yi(),U4=it(),Rl=U4.isArrayOrTypedArray,O4=Ji(),THe=Cs(),AHe=sm().formatColor,N4=$o(),car=fA(),zQ=aR(),AE=C2(),far=kg().DESELECTDIM,MHe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},har=Kf().appendArrayPointValue;function dar(e,t){var r,i={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},n=e._context.plotGlPixelRatio;if(t.visible!==!0)return i;if(N4.hasText(t)&&(i.text=LHe(e,t),i.textSel=EHe(e,t,t.selected),i.textUnsel=EHe(e,t,t.unselected)),N4.hasMarkers(t)&&(i.marker=qQ(e,t),i.markerSel=BQ(e,t,t.selected),i.markerUnsel=BQ(e,t,t.unselected),!t.unselected&&Rl(t.marker.opacity))){var a=t.marker.opacity;for(i.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function qQ(e,t){var r=t._length,i=t.marker,n={},a,o=Rl(i.symbol),s=Rl(i.angle),l=Rl(i.color),u=Rl(i.line.color),c=Rl(i.opacity),f=Rl(i.size),h=Rl(i.line.width),d;if(o||(d=zQ.isOpenSymbol(i.symbol)),o||l||u||c||s){n.symbols=new Array(r),n.angles=new Array(r),n.colors=new Array(r),n.borderColors=new Array(r);var p=i.symbol,v=i.angle,m=AHe(i,i.opacity,r),g=AHe(i.line,i.opacity,r);if(!Rl(g[0])){var w=g;for(g=Array(r),a=0;aAE.TOO_MANY_POINTS||N4.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,d=Rl(u)?u.length>1?u[o]:u[0]:u,p=MHe[h],v=MHe[d],m=c?c/.8+1:0,g=-v*m-v*.5;a.offset[o]=[p*m/f,g/f]}}return a}PHe.exports={style:dar,markerStyle:qQ,markerSelection:BQ,linePositions:gar,errorBarPositions:mar,textPosition:yar}});var OQ=W((A$r,IHe)=>{"use strict";var dR=it();IHe.exports=function(t,r){var i=r._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 r._scene||(i=r._scene={},i.init=function(){dR.extendFlat(i,a,n)},i.init(),i.update=function(s){var l=dR.repeat(s,i.count);if(i.fill2d&&i.fill2d.update(l),i.scatter2d&&i.scatter2d.update(l),i.line2d&&i.line2d.update(l),i.error2d&&i.error2d.update(l.concat(l)),i.select2d&&i.select2d.update(l),i.glText)for(var u=0;u{"use strict";var xar=lR(),V4=it(),RHe=Cs(),_ar=Op().findExtremes,zHe=Wp(),NQ=Td(),bar=NQ.calcMarkerSize,war=NQ.calcAxisExpansion,Tar=NQ.setFirstScatter,Aar=wd(),G4=kb(),Mar=OQ(),BHe=Kn().BADNUM,Sar=C2().TOO_MANY_POINTS;OHe.exports=function(t,r){var i=t._fullLayout,n=r._xA=RHe.getFromId(t,r.xaxis,"x"),a=r._yA=RHe.getFromId(t,r.yaxis,"y"),o=i._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Sar,u=s*2,c={},f,h=n.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),p=zHe(r,n,"x",h),v=zHe(r,a,"y",d),m=p.vals,g=v.vals;r._x=m,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=v.starts,r._yEnds=v.ends);var w=new Array(u),b=new Array(s);for(f=0;f1&&V4.extendFlat(o.line,G4.linePositions(e,r,i)),o.errorX||o.errorY){var s=G4.errorBarPositions(e,r,i,n,a);o.errorX&&V4.extendFlat(o.errorX,s.x),o.errorY&&V4.extendFlat(o.errorY,s.y)}return o.text&&(V4.extendFlat(o.text,{positions:i},G4.textPosition(e,r,o.text,o.marker)),V4.extendFlat(o.textSel,{positions:i},G4.textPosition(e,r,o.text,o.markerSel)),V4.extendFlat(o.textUnsel,{positions:i},G4.textPosition(e,r,o.text,o.markerUnsel))),o}});var UQ=W((S$r,VHe)=>{"use strict";var UHe=it(),kar=ni(),Car=kg().DESELECTDIM;function Dar(e){var t=e[0],r=t.trace,i=t.t,n=i._scene,a=i.index,o=n.selectBatch[a],s=n.unselectBatch[a],l=n.textOptions[a],u=n.textSelectedOptions[a]||{},c=n.textUnselectedOptions[a]||{},f=UHe.extendFlat({},l),h,d;if(o.length||s.length){var p=u.color,v=c.color,m=l.color,g=UHe.isArrayOrTypedArray(m);for(f.color=new Array(r._length),h=0;h{"use strict";var GHe=$o(),Far=UQ().styleTextSelection;HHe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l=i[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var p=GHe.hasText(s),v=GHe.hasMarkers(s),m=!v&&!p;if(s.visible!==!0||m)return o;var g=[],w=[];if(r!==!1&&!r.degenerate)for(var b=0;b{"use strict";var Lar=nR();jHe.exports={moduleType:"trace",name:"scattergl",basePlotModule:dl(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:_E(),supplyDefaults:EGe(),crossTraceDefaults:Dj(),colorbar:Ac(),formatLabels:CGe(),calc:NHe(),hoverPoints:Lar.hoverPoints,selectPoints:VQ(),meta:{}}});var YHe=W((C$r,WHe)=>{"use strict";WHe.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 JHe=W((D$r,KHe)=>{"use strict";var XHe=YHe();KHe.exports=Par;var ZHe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Par(e){var t,r=[],i=1,n;if(typeof e=="string")if(e=e.toLowerCase(),XHe[e])r=XHe[e].slice(),n="rgb";else if(e==="transparent")i=0,n="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;i=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(i=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(i=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),n="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",a=l.replace(/a$/,"");n=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(ZHe[h]!==void 0)return ZHe[h]}return parseFloat(h)}),l===a&&r.push(1),i=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)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],n="rgb",i=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(n="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="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]),i=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(i/=100)):(n="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:n,values:r,alpha:i}}});var eje=W((F$r,QHe)=>{"use strict";var Iar=JHe();QHe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,i,n,a=Iar(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=Rar(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function Rar(e){var t=e[0]/360,r=e[1]/100,i=e[2]/100,n,a,o,s,l,u=0;if(r===0)return l=i*255,[l,l,l];for(a=i<.5?i*(1+r):i+r-i*r,n=2*i-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?n+(a-n)*6*o:2*o<1?a:3*o<2?n+(a-n)*(2/3-o)*6:n,s[u++]=l*255;return s}});var ME=W((L$r,tje)=>{"use strict";var zar=eje(),Bar=sR();tje.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var i=Bar(r),n=new i(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=zar(t),t[0]/=255,t[1]/=255,t[2]/=255),qar(t)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:255,a&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(a?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:1):(n[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),n[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),n)};function qar(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 ije=W((P$r,vR)=>{"use strict";var pR=kQ();vR.exports=rje;vR.exports.to=rje;vR.exports.from=Oar;function rje(e,t){t==null&&(t=!0);var r=e[0],i=e[1],n=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,i*=255,n*=255,a*=255),r=pR(r,0,255)&255,i=pR(i,0,255)&255,n=pR(n,0,255)&255,a=pR(a,0,255)&255;var o=r*16777216+(i<<16)+(n<<8)+a;return o}function Oar(e,t){e=+e;var r=e>>>24,i=(e&16711680)>>>16,n=(e&65280)>>>8,a=e&255;return t===!1?[r,i,n,a]:[r/255,i/255,n/255,a/255]}});var aje=W((I$r,nje)=>{nje.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i{"use strict";oje.exports=function(t,r,i){Array.isArray(i)||(i=[].slice.call(arguments,2));for(var n=0,a=i.length;n{"use strict";H4.exports=SE;H4.exports.float32=H4.exports.float=SE;H4.exports.fract32=H4.exports.fract=Nar;var sje=new Float32Array(1);function Nar(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=SE(e));for(var r=0,i=t.length;r{"use strict";var Uar=ME(),Var=Mb(),Gar=ije(),Har=lR(),mR=aje(),jar=N1(),$ar=GQ(),War=Sb(),yR=gR(),Yar=q4(),Xar=Fc;function Fc(e,t){if(!(this instanceof Fc))return new Fc(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,i,n=[],a={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,i=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:n,paletteIds:a,paletteTexture:i,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,v)=>[this.tooManyColors?0:u,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:(p,v)=>v.xAttr||{buffer:v.positionBuffer,stride:8,offset:0},y:(p,v)=>v.yAttr||{buffer:v.positionBuffer,stride:8,offset:4},xFract:(p,v)=>v.xAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:0},yFract:(p,v)=>v.yAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:4},size:(p,v)=>v.size.length?{buffer:v.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(v.size*255/this.maxSize)]},borderSize:(p,v)=>v.borderSize.length?{buffer:v.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(v.borderSize*255/this.maxSize)]},colorId:(p,v)=>v.color.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(v.color*4,v.color*4+4):[v.color]},borderColorId:(p,v)=>v.borderColor.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(v.borderColor*4,v.borderColor*4+4):[v.borderColor]},isActive:(p,v)=>v.activation===!0?{constant:[1]}:v.activation?v.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"},h=Object.assign({},f);h.frag=mR([`precision highp float; #define GLSLIFY 1 uniform float opacity; uniform sampler2D markerTexture; varying vec4 fragColor, fragBorderColor; varying float fragWidth, fragBorderColorLevel, fragColorLevel; float smoothStep(float x, float y) { return 1.0 / (1.0 + exp(50.0*(x - y))); } void main() { float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth; // max-distance alpha if (dist < 0.003) discard; // null-border case if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) { float colorAmt = smoothstep(.5 - delta, .5 + delta, dist); gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity); } else { float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist); float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist); vec4 color = fragBorderColor; color.a *= borderColorAmt; color = mix(color, fragColor, colorAmt); color.a *= opacity; gl_FragColor = color; } } `]),h.vert=mR([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 scale, scaleFract, translate, translateFract, paletteSize; uniform sampler2D paletteTexture; const float maxSize = 100.; const float borderLevel = .5; varying vec4 fragColor, fragBorderColor; varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = 2. * size * pointSizeScale; fragPointSize = size * pixelRatio; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragColor = color; fragBorderColor = borderColor; fragWidth = 1. / gl_PointSize; fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } `]),this.drawMarker=e(h);let d=Object.assign({},f);d.frag=mR([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; uniform float opacity; float smoothStep(float edge0, float edge1, float x) { float t; t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3.0 - 2.0 * t); } void main() { float radius, alpha = 1.0, delta = fragWidth; radius = length(2.0 * gl_PointCoord.xy - 1.0); if (radius > 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),d.vert=mR([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),this.drawCircle=e(d)}Fc.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};Fc.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};Fc.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(a)});return this};Fc.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if(typeof t=="number"&&(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 a=1;a{let f=i[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=jar(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||(i[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:a.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},Fc.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 h=0,d=0;if($ar(f,u,[{snap:!0,size:(p,v)=>(p==null&&(p=Fc.defaults.size),h+=p&&p.length?1:0,p),borderSize:(p,v)=>(p==null&&(p=Fc.defaults.borderSize),h+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,v)=>(p==null&&(p=Fc.defaults.color),p=this.updateColor(p),d++,p),borderColor:(p,v)=>(p==null&&(p=Fc.defaults.borderColor),p=this.updateColor(p),d++,p),bounds:(p,v,m)=>("range"in m||(m.range=null),p),positions:(p,v,m)=>{let{snap:g}=v,{positionBuffer:w,positionFractBuffer:b,selectionBuffer:_}=v;if(p.x||p.y)return p.x.length?v.xAttr={buffer:a.buffer(p.x),offset:0,stride:4,count:p.x.length}:v.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?v.yAttr={buffer:a.buffer(p.y),offset:0,stride:4,count:p.y.length}:v.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},v.count=Math.max(v.xAttr.count,v.yAttr.count),p;p=War(p,"float64");let M=v.count=Math.floor(p.length/2),x=v.bounds=M?Var(p,2):null;if(!m.range&&!v.range&&(delete v.range,m.range=x),!m.marker&&!v.marker&&(delete v.marker,m.marker=null),g&&(g===!0||M>g)?v.tree=Har(p,{bounds:x}):g&&g.length&&(v.tree=g),v.tree){let y={primitive:"points",usage:"static",data:v.tree,type:"uint32"};v.elements?v.elements(y):v.elements=a.elements(y)}var T=yR.float32(p);w({data:T,usage:"dynamic"});var A=yR.fract32(p,T);return b({data:A,usage:"dynamic"}),_({data:new Uint8Array(M),type:"uint8",usage:"stream"}),p}},{marker:(p,v,m)=>{let{activation:g}=v;if(g.forEach(w=>w&&w.destroy&&w.destroy()),g.length=0,!p||typeof p[0]=="number"){let w=this.addMarker(p);g[w]=!0}else{let w=[];for(let b=0,_=Math.min(p.length,v.count);b<_;b++){let M=this.addMarker(p[b]);w[M]||(w[M]=new Uint8Array(v.count)),w[M][b]=1}for(let b=0;b{let g=v.bounds;if(g)return p||(p=g),v.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],v.translate=[-p[0],-p[1]],v.scaleFract=yR.fract(v.scale),v.translateFract=yR.fract(v.translate),p},viewport:p=>Yar(p||[n.drawingBufferWidth,n.drawingBufferHeight])}]),h){let{count:p,size:v,borderSize:m,sizeBuffer:g}=f,w=new Uint8Array(p*2);if(v.length||m.length)for(let b=0;b=0)return n;let a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(let s=0,l=e.length;si*4&&(this.tooManyColors=!0),this.updatePalette(r),n.length===1?n[0]:n};Fc.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(e.length*.25/t);if(i>1){e=e.slice();for(let n=e.length*.25%t;n{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 Zar=function(e,t){var r=new Xar(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};lje.exports=Zar});var qu=W((q$r,cje)=>{"use strict";var uje=Object.getOwnPropertySymbols,Kar=Object.prototype.hasOwnProperty,Jar=Object.prototype.propertyIsEnumerable;function Qar(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function eor(){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 i=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(a){n[a]=a}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}cje.exports=eor()?Object.assign:function(e,t){for(var r,i=Qar(e),n,a=1;a{"use strict";YQ.exports=bR;YQ.exports.default=bR;function bR(e,t,r){r=r||2;var i=t&&t.length,n=i?t[0]*r:e.length,a=hje(e,0,n,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(i&&(a=aor(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;pu&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return EE(a,o,r,s,l,d,0),o}function hje(e,t,r,i,n){var a,o;if(n===WQ(e,t,r,i)>0)for(a=t;a=t;a-=i)o=fje(a,e[a],e[a+1],o);return o&&wR(o,o.next)&&(CE(o),o=o.next),o}function Cb(e,t){if(!e)return e;t||(t=e);var r=e,i;do if(i=!1,!r.steiner&&(wR(r,r.next)||zl(r.prev,r,r.next)===0)){if(CE(r),r=t=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==t);return t}function EE(e,t,r,i,n,a,o){if(e){!o&&a&&cor(e,i,n,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?ror(e,i,n,a):tor(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),CE(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=ior(Cb(e),t,r),EE(e,t,r,i,n,a,2)):o===2&&nor(e,t,r,i,n,a):EE(Cb(e),t,r,i,n,a,1);break}}}}function tor(e){var t=e.prev,r=e,i=e.next;if(zl(t,r,i)>=0)return!1;for(var n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=na?n>o?n:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,p=i.next;p!==t;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&j4(n,s,a,l,o,u,p.x,p.y)&&zl(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function ror(e,t,r,i){var n=e.prev,a=e,o=e.next;if(zl(n,a,o)>=0)return!1;for(var s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,d=sl?s>u?s:u:l>u?l:u,m=c>f?c>h?c:h:f>h?f:h,g=jQ(d,p,t,r,i),w=jQ(v,m,t,r,i),b=e.prevZ,_=e.nextZ;b&&b.z>=g&&_&&_.z<=w;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&j4(s,c,l,f,u,h,b.x,b.y)&&zl(b.prev,b,b.next)>=0||(b=b.prevZ,_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==n&&_!==o&&j4(s,c,l,f,u,h,_.x,_.y)&&zl(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;b&&b.z>=g;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&j4(s,c,l,f,u,h,b.x,b.y)&&zl(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=w;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==n&&_!==o&&j4(s,c,l,f,u,h,_.x,_.y)&&zl(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function ior(e,t,r){var i=e;do{var n=i.prev,a=i.next.next;!wR(n,a)&&dje(n,i,i.next,a)&&kE(n,a)&&kE(a,n)&&(t.push(n.i/r|0),t.push(i.i/r|0),t.push(a.i/r|0),CE(i),CE(i.next),i=e=a),i=i.next}while(i!==e);return Cb(i)}function nor(e,t,r,i,n,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&por(o,s)){var l=pje(o,s);o=Cb(o,o.next),l=Cb(l,l.next),EE(o,t,r,i,n,a,0),EE(l,t,r,i,n,a,0);return}s=s.next}o=o.next}while(o!==e)}function aor(e,t,r,i){var n=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&i!==r.x&&j4(no.x||r.x===o.x&&uor(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function uor(e,t){return zl(e.prev,e,t.prev)<0&&zl(t.next,e,e.next)<0}function cor(e,t,r,i){var n=e;do n.z===0&&(n.z=jQ(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,hor(n)}function hor(e){var t,r,i,n,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t0||l>0&&i;)s!==0&&(l===0||!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,u*=2}while(o>1);return e}function jQ(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|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 dor(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function por(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!vor(e,t)&&(kE(e,t)&&kE(t,e)&&gor(e,t)&&(zl(e.prev,e,t.prev)||zl(e,t.prev,t))||wR(e,t)&&zl(e.prev,e,e.next)>0&&zl(t.prev,t,t.next)>0)}function zl(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function wR(e,t){return e.x===t.x&&e.y===t.y}function dje(e,t,r,i){var n=_R(zl(e,t,r)),a=_R(zl(e,t,i)),o=_R(zl(r,i,e)),s=_R(zl(r,i,t));return!!(n!==a&&o!==s||n===0&&xR(e,r,t)||a===0&&xR(e,i,t)||o===0&&xR(r,e,i)||s===0&&xR(r,t,i))}function xR(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 _R(e){return e>0?1:e<0?-1:0}function vor(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&&dje(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function kE(e,t){return zl(e.prev,e,e.next)<0?zl(e,t,e.next)>=0&&zl(e,e.prev,t)>=0:zl(e,t,e.prev)<0||zl(e,e.next,t)<0}function gor(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}function pje(e,t){var r=new $Q(e.i,e.x,e.y),i=new $Q(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 fje(e,t,r,i){var n=new $Q(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 CE(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 $Q(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}bR.deviation=function(e,t,r,i){var n=t&&t.length,a=n?t[0]*r:e.length,o=Math.abs(WQ(e,0,a,r));if(n)for(var s=0,l=t.length;s0&&(i+=e[n-1].length,r.holes.push(i))}return r}});var mje=W((N$r,gje)=>{"use strict";var mor=Mb();gje.exports=yor;function yor(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=mor(e,t));for(var i=0;i{"use strict";yje.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 bje=W((V$r,_je)=>{"use strict";_je.exports=function(){}});var F2=W((G$r,wje)=>{"use strict";var xor=bje()();wje.exports=function(e){return e!==xor&&e!==null}});var XQ=W((H$r,Aje)=>{"use strict";var _or=Object.create,bor=Object.getPrototypeOf,Tje={};Aje.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||_or;return typeof e!="function"?!1:bor(e(t(null),Tje))===Tje}});var ZQ=W((j$r,Mje)=>{"use strict";var wor=F2(),Tor={function:!0,object:!0};Mje.exports=function(e){return wor(e)&&Tor[typeof e]||!1}});var hm=W(($$r,Sje)=>{"use strict";var Aor=F2();Sje.exports=function(e){if(!Aor(e))throw new TypeError("Cannot use null or undefined");return e}});var kje=W((W$r,Eje)=>{"use strict";var KQ=Object.create,TR;XQ()()||(TR=JQ());Eje.exports=(function(){var e,t,r;return!TR||TR.level!==1?KQ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(i){if(i==="__proto__"){t[i]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[i]=r}),Object.defineProperties(e,t),Object.defineProperty(TR,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(i,n){return KQ(i===null?e:i,n)})})()});var JQ=W((Y$r,Cje)=>{"use strict";var Mor=ZQ(),Sor=hm(),Eor=Object.prototype.isPrototypeOf,kor=Object.defineProperty,Cor={configurable:!0,enumerable:!1,writable:!0,value:void 0},AR;AR=function(e,t){if(Sor(e),t===null||Mor(t))return e;throw new TypeError("Prototype must be null or an object")};Cje.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(i,n){return r.call(AR(i,n),n),i}):t=function(i,n){return AR(i,n).__proto__=n,i}:t=function i(n,a){var o;return AR(n,a),o=Eor.call(i.nullPolyfill,n),o&&delete i.nullPolyfill.__proto__,a===null&&(a=i.nullPolyfill),n.__proto__=a,o&&kor(i.nullPolyfill,"__proto__",Cor),n},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(i){try{r=i.set,r.call(e,t)}catch(n){}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)})());kje()});var MR=W((X$r,Dje)=>{"use strict";Dje.exports=XQ()()?Object.setPrototypeOf:JQ()});var Lje=W((Z$r,Fje)=>{"use strict";var Dor=ZQ();Fje.exports=function(e){if(!Dor(e))throw new TypeError(e+" is not an Object");return e}});var Ije=W((K$r,Pje)=>{"use strict";var For=Object.create(null),Lor=Math.random;Pje.exports=function(){var e;do e=Lor().toString(36).slice(2);while(For[e]);return e}});var Db=W((J$r,Rje)=>{"use strict";var Por=void 0;Rje.exports=function(e){return e!==Por&&e!==null}});var QQ=W((Q$r,zje)=>{"use strict";var Ior=Db(),Ror={object:!0,function:!0,undefined:!0};zje.exports=function(e){return Ior(e)?hasOwnProperty.call(Ror,typeof e):!1}});var qje=W((eWr,Bje)=>{"use strict";var zor=QQ();Bje.exports=function(e){if(!zor(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var Nje=W((tWr,Oje)=>{"use strict";var Bor=qje();Oje.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!Bor(e)}});var eee=W((rWr,Uje)=>{"use strict";var qor=Nje(),Oor=/^\s*class[\s{/}]/,Nor=Function.prototype.toString;Uje.exports=function(e){return!(!qor(e)||Oor.test(Nor.call(e)))}});var Gje=W((iWr,Vje)=>{"use strict";Vje.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 jje=W((nWr,Hje)=>{"use strict";Hje.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var Wje=W((aWr,$je)=>{"use strict";var Uor=F2(),Vor=Object.keys;$je.exports=function(e){return Vor(Uor(e)?Object(e):e)}});var Xje=W((oWr,Yje)=>{"use strict";Yje.exports=jje()()?Object.keys:Wje()});var Kje=W((sWr,Zje)=>{"use strict";var Gor=Xje(),Hor=hm(),jor=Math.max;Zje.exports=function(e,t){var r,i,n=jor(arguments.length,2),a;for(e=Object(Hor(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},i=1;i{"use strict";Jje.exports=Gje()()?Object.assign:Kje()});var tee=W((uWr,Qje)=>{"use strict";var $or=F2(),Wor=Array.prototype.forEach,Yor=Object.create,Xor=function(e,t){var r;for(r in e)t[r]=e[r]};Qje.exports=function(e){var t=Yor(null);return Wor.call(arguments,function(r){$or(r)&&Xor(Object(r),t)}),t}});var t$e=W((cWr,e$e)=>{"use strict";var ree="razdwatrzy";e$e.exports=function(){return typeof ree.contains!="function"?!1:ree.contains("dwa")===!0&&ree.contains("foo")===!1}});var i$e=W((fWr,r$e)=>{"use strict";var Zor=String.prototype.indexOf;r$e.exports=function(e){return Zor.call(this,e,arguments[1])>-1}});var iee=W((hWr,n$e)=>{"use strict";n$e.exports=t$e()()?String.prototype.contains:i$e()});var dm=W((dWr,l$e)=>{"use strict";var ER=Db(),a$e=eee(),o$e=SR(),s$e=tee(),DE=iee(),Kor=l$e.exports=function(e,t){var r,i,n,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],ER(e)?(r=DE.call(e,"c"),i=DE.call(e,"e"),n=DE.call(e,"w")):(r=n=!0,i=!1),o={value:t,configurable:r,enumerable:i,writable:n},a?o$e(s$e(a),o):o};Kor.gs=function(e,t,r){var i,n,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],ER(t)?a$e(t)?ER(r)?a$e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,ER(e)?(i=DE.call(e,"c"),n=DE.call(e,"e")):(i=!0,n=!1),o={get:t,set:r,configurable:i,enumerable:n},a?o$e(s$e(a),o):o}});var FE=W((pWr,c$e)=>{"use strict";var u$e=Object.prototype.toString,Jor=u$e.call((function(){return arguments})());c$e.exports=function(e){return u$e.call(e)===Jor}});var LE=W((vWr,h$e)=>{"use strict";var f$e=Object.prototype.toString,Qor=f$e.call("");h$e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||f$e.call(e)===Qor)||!1}});var p$e=W((gWr,d$e)=>{"use strict";d$e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var m$e=W((mWr,g$e)=>{var v$e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};g$e.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return v$e()}try{return __global__||v$e()}finally{delete Object.prototype.__global__}})()});var PE=W((yWr,y$e)=>{"use strict";y$e.exports=p$e()()?globalThis:m$e()});var _$e=W((xWr,x$e)=>{"use strict";var esr=PE(),nee={object:!0,symbol:!0};x$e.exports=function(){var e=esr.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!nee[typeof e.iterator]||!nee[typeof e.toPrimitive]||!nee[typeof e.toStringTag])}});var w$e=W((_Wr,b$e)=>{"use strict";b$e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var aee=W((bWr,T$e)=>{"use strict";var tsr=w$e();T$e.exports=function(e){if(!tsr(e))throw new TypeError(e+" is not a symbol");return e}});var k$e=W((wWr,E$e)=>{"use strict";var A$e=dm(),rsr=Object.create,M$e=Object.defineProperty,isr=Object.prototype,S$e=rsr(null);E$e.exports=function(e){for(var t=0,r,i;S$e[e+(t||"")];)++t;return e+=t||"",S$e[e]=!0,r="@@"+e,M$e(isr,r,A$e.gs(null,function(n){i||(i=!0,M$e(this,r,A$e(n)),i=!1)})),r}});var D$e=W((TWr,C$e)=>{"use strict";var vv=dm(),Xl=PE().Symbol;C$e.exports=function(e){return Object.defineProperties(e,{hasInstance:vv("",Xl&&Xl.hasInstance||e("hasInstance")),isConcatSpreadable:vv("",Xl&&Xl.isConcatSpreadable||e("isConcatSpreadable")),iterator:vv("",Xl&&Xl.iterator||e("iterator")),match:vv("",Xl&&Xl.match||e("match")),replace:vv("",Xl&&Xl.replace||e("replace")),search:vv("",Xl&&Xl.search||e("search")),species:vv("",Xl&&Xl.species||e("species")),split:vv("",Xl&&Xl.split||e("split")),toPrimitive:vv("",Xl&&Xl.toPrimitive||e("toPrimitive")),toStringTag:vv("",Xl&&Xl.toStringTag||e("toStringTag")),unscopables:vv("",Xl&&Xl.unscopables||e("unscopables"))})}});var P$e=W((AWr,L$e)=>{"use strict";var F$e=dm(),nsr=aee(),IE=Object.create(null);L$e.exports=function(e){return Object.defineProperties(e,{for:F$e(function(t){return IE[t]?IE[t]:IE[t]=e(String(t))}),keyFor:F$e(function(t){var r;nsr(t);for(r in IE)if(IE[r]===t)return r})})}});var z$e=W((MWr,R$e)=>{"use strict";var U1=dm(),oee=aee(),kR=PE().Symbol,asr=k$e(),osr=D$e(),ssr=P$e(),lsr=Object.create,see=Object.defineProperties,CR=Object.defineProperty,Ff,$4,I$e;if(typeof kR=="function")try{String(kR()),I$e=!0}catch(e){}else kR=null;$4=function(t){if(this instanceof $4)throw new TypeError("Symbol is not a constructor");return Ff(t)};R$e.exports=Ff=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return I$e?kR(t):(r=lsr($4.prototype),t=t===void 0?"":String(t),see(r,{__description__:U1("",t),__name__:U1("",asr(t))}))};osr(Ff);ssr(Ff);see($4.prototype,{constructor:U1(Ff),toString:U1("",function(){return this.__name__})});see(Ff.prototype,{toString:U1(function(){return"Symbol ("+oee(this).__description__+")"}),valueOf:U1(function(){return oee(this)})});CR(Ff.prototype,Ff.toPrimitive,U1("",function(){var e=oee(this);return typeof e=="symbol"?e:e.toString()}));CR(Ff.prototype,Ff.toStringTag,U1("c","Symbol"));CR($4.prototype,Ff.toStringTag,U1("c",Ff.prototype[Ff.toStringTag]));CR($4.prototype,Ff.toPrimitive,U1("c",Ff.prototype[Ff.toPrimitive]))});var L2=W((SWr,B$e)=>{"use strict";B$e.exports=_$e()()?PE().Symbol:z$e()});var O$e=W((EWr,q$e)=>{"use strict";var usr=hm();q$e.exports=function(){return usr(this).length=0,this}});var W4=W((kWr,N$e)=>{"use strict";N$e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var V$e=W((CWr,U$e)=>{"use strict";var csr=Db(),fsr=QQ(),hsr=Object.prototype.toString;U$e.exports=function(e){if(!csr(e))return null;if(fsr(e)){var t=e.toString;if(typeof t!="function"||t===hsr)return null}try{return""+e}catch(r){return null}}});var H$e=W((DWr,G$e)=>{"use strict";G$e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var $$e=W((FWr,j$e)=>{"use strict";var dsr=H$e(),psr=/[\n\r\u2028\u2029]/g;j$e.exports=function(e){var t=dsr(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(psr,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 Y$e=W((LWr,W$e)=>{"use strict";var vsr=V$e(),gsr=$$e();W$e.exports=function(e,t,r){r&&r.errorMessage&&(e=vsr(r.errorMessage));var i=e.indexOf("%v"),n=i>-1?gsr(t):null;if(r&&r.name){var a=e.indexOf("%n");if(a>-1){if(i>-1){var o,s,l,u;return a>i?(o=n,l=i,s=r.name,u=a):(o=r.name,l=a,s=n,u=i),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,a)+r.name+e.slice(a+2)}}return i>-1?e.slice(0,i)+n+e.slice(i+2):e}});var lee=W((PWr,X$e)=>{"use strict";var msr=Db(),ysr=Y$e();X$e.exports=function(e,t,r){if(r&&!msr(e)){if("default"in r)return r.default;if(r.isOptional)return null}var i=r&&r.Error||TypeError,n=new i(ysr(t,e,r));throw r&&r.errorCode&&(n.code=r.errorCode),n}});var K$e=W((IWr,Z$e)=>{"use strict";var xsr=lee(),_sr=Db();Z$e.exports=function(e){if(_sr(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return xsr(e,r,t)}});var Q$e=W((RWr,J$e)=>{"use strict";var bsr=lee(),wsr=eee();J$e.exports=function(e){if(wsr(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 bsr(e,r,t)}});var tWe=W((zWr,eWe)=>{"use strict";eWe.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 iWe=W((BWr,rWe)=>{"use strict";var Tsr=Object.prototype.toString,Asr=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);rWe.exports=function(e){return typeof e=="function"&&Asr(Tsr.call(e))}});var aWe=W((qWr,nWe)=>{"use strict";nWe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var sWe=W((OWr,oWe)=>{"use strict";oWe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var uWe=W((NWr,lWe)=>{"use strict";lWe.exports=aWe()()?Math.sign:sWe()});var fWe=W((UWr,cWe)=>{"use strict";var Msr=uWe(),Ssr=Math.abs,Esr=Math.floor;cWe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Msr(e)*Esr(Ssr(e)))}});var dWe=W((VWr,hWe)=>{"use strict";var ksr=fWe(),Csr=Math.max;hWe.exports=function(e){return Csr(0,ksr(e))}});var mWe=W((GWr,gWe)=>{"use strict";var Dsr=L2().iterator,Fsr=FE(),Lsr=iWe(),Psr=dWe(),pWe=W4(),Isr=hm(),Rsr=F2(),zsr=LE(),vWe=Array.isArray,uee=Function.prototype.call,Fb={configurable:!0,enumerable:!0,writable:!0,value:null},cee=Object.defineProperty;gWe.exports=function(e){var t=arguments[1],r=arguments[2],i,n,a,o,s,l,u,c,f,h;if(e=Object(Isr(e)),Rsr(t)&&pWe(t),!this||this===Array||!Lsr(this)){if(!t){if(Fsr(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(vWe(e)){for(o=new Array(s=e.length),n=0;n=55296&&l<=56319&&(h+=e[++n])),h=t?uee.call(t,r,h,a):h,i?(Fb.value=h,cee(o,a,Fb)):o[a]=h,++a;s=a}}if(s===void 0)for(s=Psr(e.length),i&&(o=new i(s)),n=0;n{"use strict";yWe.exports=tWe()()?Array.from:mWe()});var bWe=W((jWr,_We)=>{"use strict";var Bsr=xWe(),qsr=SR(),Osr=hm();_We.exports=function(e){var t=Object(Osr(e)),r=arguments[1],i=Object(arguments[2]);if(t!==e&&!r)return t;var n={};return r?Bsr(r,function(a){(i.ensure||a in e)&&(n[a]=e[a])}):qsr(n,e),n}});var AWe=W(($Wr,TWe)=>{"use strict";var Nsr=W4(),Usr=hm(),Vsr=Function.prototype.bind,wWe=Function.prototype.call,Gsr=Object.keys,Hsr=Object.prototype.propertyIsEnumerable;TWe.exports=function(e,t){return function(r,i){var n,a=arguments[2],o=arguments[3];return r=Object(Usr(r)),Nsr(i),n=Gsr(r),o&&n.sort(typeof o=="function"?Vsr.call(o,r):void 0),typeof e!="function"&&(e=n[e]),wWe.call(e,n,function(s,l){return Hsr.call(r,s)?wWe.call(i,a,r[s],s,r,l):t})}}});var SWe=W((WWr,MWe)=>{"use strict";MWe.exports=AWe()("forEach")});var kWe=W((YWr,EWe)=>{"use strict";var jsr=W4(),$sr=SWe(),Wsr=Function.prototype.call;EWe.exports=function(e,t){var r={},i=arguments[2];return jsr(t),$sr(e,function(n,a,o,s){r[a]=Wsr.call(t,i,n,a,o,s)}),r}});var LWe=W((XWr,FWe)=>{"use strict";var Ysr=Db(),Xsr=K$e(),CWe=Q$e(),Zsr=bWe(),Ksr=tee(),Jsr=kWe(),Qsr=Function.prototype.bind,elr=Object.defineProperty,tlr=Object.prototype.hasOwnProperty,DWe;DWe=function(e,t,r){var i=Xsr(t)&&CWe(t.value),n;return n=Zsr(t),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&tlr.call(this,e)?i:(t.value=Qsr.call(i,r.resolveContext?r.resolveContext(this):this),elr(this,e,t),this[e])},n};FWe.exports=function(e){var t=Ksr(arguments[1]);return Ysr(t.resolveContext)&&CWe(t.resolveContext),Jsr(e,function(r,i){return DWe(i,r,t)})}});var fee=W((ZWr,zWe)=>{"use strict";var rlr=O$e(),ilr=SR(),nlr=W4(),alr=hm(),Yh=dm(),olr=LWe(),PWe=L2(),IWe=Object.defineProperty,RWe=Object.defineProperties,RE;zWe.exports=RE=function(e,t){if(!(this instanceof RE))throw new TypeError("Constructor requires 'new'");RWe(this,{__list__:Yh("w",alr(e)),__context__:Yh("w",t),__nextIndex__:Yh("w",0)}),t&&(nlr(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete RE.prototype.constructor;RWe(RE.prototype,ilr({_next:Yh(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__){IWe(this,"__redo__",Yh("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Yh(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,i){r>e&&(this.__redo__[i]=--r)},this)))}),_onClear:Yh(function(){this.__redo__&&rlr.call(this.__redo__),this.__nextIndex__=0})})));IWe(RE.prototype,PWe.iterator,Yh(function(){return this}))});var UWe=W((KWr,NWe)=>{"use strict";var BWe=MR(),qWe=iee(),hee=dm(),slr=L2(),dee=fee(),OWe=Object.defineProperty,Y4;Y4=NWe.exports=function(e,t){if(!(this instanceof Y4))throw new TypeError("Constructor requires 'new'");dee.call(this,e),t?qWe.call(t,"key+value")?t="key+value":qWe.call(t,"key")?t="key":t="value":t="value",OWe(this,"__kind__",hee("",t))};BWe&&BWe(Y4,dee);delete Y4.prototype.constructor;Y4.prototype=Object.create(dee.prototype,{_resolve:hee(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});OWe(Y4.prototype,slr.toStringTag,hee("c","Array Iterator"))});var jWe=W((JWr,HWe)=>{"use strict";var VWe=MR(),DR=dm(),llr=L2(),pee=fee(),GWe=Object.defineProperty,X4;X4=HWe.exports=function(e){if(!(this instanceof X4))throw new TypeError("Constructor requires 'new'");e=String(e),pee.call(this,e),GWe(this,"__length__",DR("",e.length))};VWe&&VWe(X4,pee);delete X4.prototype.constructor;X4.prototype=Object.create(pee.prototype,{_next:DR(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});GWe(X4.prototype,llr.toStringTag,DR("c","String Iterator"))});var WWe=W((QWr,$We)=>{"use strict";var ulr=FE(),clr=F2(),flr=LE(),hlr=L2().iterator,dlr=Array.isArray;$We.exports=function(e){return clr(e)?dlr(e)||flr(e)||ulr(e)?!0:typeof e[hlr]=="function":!1}});var XWe=W((eYr,YWe)=>{"use strict";var plr=WWe();YWe.exports=function(e){if(!plr(e))throw new TypeError(e+" is not iterable");return e}});var vee=W((tYr,JWe)=>{"use strict";var vlr=FE(),glr=LE(),ZWe=UWe(),mlr=jWe(),ylr=XWe(),KWe=L2().iterator;JWe.exports=function(e){return typeof ylr(e)[KWe]=="function"?e[KWe]():vlr(e)?new ZWe(e):glr(e)?new mlr(e):new ZWe(e)}});var eYe=W((rYr,QWe)=>{"use strict";var xlr=FE(),_lr=W4(),blr=LE(),wlr=vee(),Tlr=Array.isArray,gee=Function.prototype.call,Alr=Array.prototype.some;QWe.exports=function(e,t){var r,i=arguments[2],n,a,o,s,l,u,c;if(Tlr(e)||xlr(e)?r="array":blr(e)?r="string":e=wlr(e),_lr(t),a=function(){o=!0},r==="array"){Alr.call(e,function(f){return gee.call(t,i,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),gee.call(t,i,u,a),!o);++s);return}for(n=e.next();!n.done;){if(gee.call(t,i,n.value,a),o)return;n=e.next()}}});var rYe=W((iYr,tYe)=>{"use strict";tYe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var aYe=W((nYr,nYe)=>{"use strict";var Mlr=F2(),LR=MR(),FR=Lje(),Slr=hm(),Elr=Ije(),pm=dm(),klr=vee(),Clr=eYe(),Dlr=L2().toStringTag,iYe=rYe(),Flr=Array.isArray,yee=Object.defineProperty,mee=Object.prototype.hasOwnProperty,Llr=Object.getPrototypeOf,P2;nYe.exports=P2=function(){var e=arguments[0],t;if(!(this instanceof P2))throw new TypeError("Constructor requires 'new'");return t=iYe&&LR&&WeakMap!==P2?LR(new WeakMap,Llr(this)):this,Mlr(e)&&(Flr(e)||(e=klr(e))),yee(t,"__weakMapData__",pm("c","$weakMap$"+Elr())),e&&Clr(e,function(r){Slr(r),t.set(r[0],r[1])}),t};iYe&&(LR&&LR(P2,WeakMap),P2.prototype=Object.create(WeakMap.prototype,{constructor:pm(P2)}));Object.defineProperties(P2.prototype,{delete:pm(function(e){return mee.call(FR(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:pm(function(e){if(mee.call(FR(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:pm(function(e){return mee.call(FR(e),this.__weakMapData__)}),set:pm(function(e,t){return yee(FR(e),this.__weakMapData__,pm("c",t)),this}),toString:pm(function(){return"[object WeakMap]"})});yee(P2.prototype,Dlr,pm("c","WeakMap"))});var xee=W((aYr,oYe)=>{"use strict";oYe.exports=xje()()?WeakMap:aYe()});var lYe=W((oYr,sYe)=>{"use strict";sYe.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 i=Object(e),n=i.length;if(n===0)return-1;for(var a=0;a{"use strict";var PR=ME(),Plr=Mb(),bee=qu(),Ilr=N1(),Rlr=Sb(),uYe=vje(),zlr=mje(),{float32:Blr,fract32:_ee}=gR(),qlr=xee(),cYe=q4(),Olr=lYe(),Nlr=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; attribute vec4 color; attribute float lineEnd, lineTop; uniform vec2 scale, scaleFract, translate, translateFract; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; varying vec4 fragColor; varying vec2 tangent; vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) { // the order is important return position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; } void main() { float lineStart = 1. - lineEnd; float lineOffset = lineTop * 2. - 1.; vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract); tangent = normalize(diff * scale * viewport.zw); vec2 normal = vec2(-tangent.y, tangent.x); vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart + project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd + thickness * normal * .5 * lineOffset / viewport.zw; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; } `,Ulr=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; void main() { float alpha = 1.; float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `,Vlr=` precision highp float; attribute vec2 position, positionFract; uniform vec4 color; uniform vec2 scale, scaleFract, translate, translateFract; uniform float pixelRatio, id; uniform vec4 viewport; uniform float opacity; varying vec4 fragColor; const float MAX_LINES = 256.; void main() { float depth = (MAX_LINES - 4. - id) / (MAX_LINES); vec2 position = position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; fragColor.a *= opacity; } `,Glr=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `,Hlr=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; attribute vec4 aColor, bColor; attribute float lineEnd, lineTop; uniform vec2 scale, translate; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; uniform float miterLimit, miterMode; varying vec4 fragColor; varying vec4 startCutoff, endCutoff; varying vec2 tangent; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; const float REVERSE_THRESHOLD = -.875; const float MIN_DIFF = 1e-6; // TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead // TODO: precalculate dot products, normalize things beforehead etc. // TODO: refactor to rectangular algorithm float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } bool isNaN( float val ){ return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true; } void main() { vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; vec2 adjustedScale; adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x; adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y; vec2 scaleRatio = adjustedScale * viewport.zw; vec2 normalWidth = thickness / scaleRatio; float lineStart = 1. - lineEnd; float lineBot = 1. - lineTop; fragColor = (lineStart * aColor + lineEnd * bColor) / 255.; if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return; if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord); if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord); vec2 prevDiff = aCoord - prevCoord; vec2 currDiff = bCoord - aCoord; vec2 nextDiff = nextCoord - bCoord; vec2 prevTangent = normalize(prevDiff * scaleRatio); vec2 currTangent = normalize(currDiff * scaleRatio); vec2 nextTangent = normalize(nextDiff * scaleRatio); vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x); vec2 currNormal = vec2(-currTangent.y, currTangent.x); vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x); vec2 startJoinDirection = normalize(prevTangent - currTangent); vec2 endJoinDirection = normalize(currTangent - nextTangent); // collapsed/unidirectional segment cases // FIXME: there should be more elegant solution vec2 prevTanDiff = abs(prevTangent - currTangent); vec2 nextTanDiff = abs(nextTangent - currTangent); if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) { startJoinDirection = currNormal; } if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) { endJoinDirection = currNormal; } if (aCoord == bCoord) { endJoinDirection = startJoinDirection; currNormal = prevNormal; currTangent = prevTangent; } tangent = currTangent; //calculate join shifts relative to normals float startJoinShift = dot(currNormal, startJoinDirection); float endJoinShift = dot(currNormal, endJoinDirection); float startMiterRatio = abs(1. / startJoinShift); float endMiterRatio = abs(1. / endJoinShift); vec2 startJoin = startJoinDirection * startMiterRatio; vec2 endJoin = endJoinDirection * endMiterRatio; vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin; startTopJoin = sign(startJoinShift) * startJoin * .5; startBotJoin = -startTopJoin; endTopJoin = sign(endJoinShift) * endJoin * .5; endBotJoin = -endTopJoin; vec2 aTopCoord = aCoord + normalWidth * startTopJoin; vec2 bTopCoord = bCoord + normalWidth * endTopJoin; vec2 aBotCoord = aCoord + normalWidth * startBotJoin; vec2 bBotCoord = bCoord + normalWidth * endBotJoin; //miter anti-clipping float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x))); float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x))); //prevent close to reverse direction switch bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal); bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal); if (prevReverse) { //make join rectangular vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.); aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `,jlr=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `;fYe.exports=fs;function fs(e,t){if(!(this instanceof fs))return new fs(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=fs.shaders.has(e)?fs.shaders.get(e):fs.shaders.set(e,fs.createShaders(e)).get(e),this.update(t)}fs.dashMult=2;fs.maxPatternLength=256;fs.precisionThreshold=3e6;fs.maxPoints=1e4;fs.maxLines=2048;fs.shaders=new qlr;fs.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")},i=e(bee({vert:Nlr,frag:Ulr,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)),n;try{n=e(bee({cull:{enable:!0,face:"back"},vert:Hlr,frag:jlr,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){n=i}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:Vlr,frag:Glr,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:i,miter:n}};fs.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};fs.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};fs.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>fs.precisionThreshold||t.scale[1]*t.viewport.height>fs.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=fs.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};fs.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((n,a)=>{let o=this.passes[a];if(n!==void 0){if(n===null){this.passes[a]=null;return}if(typeof n[0]=="number"&&(n={positions:n}),n=Ilr(n,{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[a]=o={id:a,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})},n=bee({},fs.defaults,n)),n.thickness!=null&&(o.thickness=parseFloat(n.thickness)),n.opacity!=null&&(o.opacity=parseFloat(n.opacity)),n.miterLimit!=null&&(o.miterLimit=parseFloat(n.miterLimit)),n.overlay!=null&&(o.overlay=!!n.overlay,aM-x),w=[],b=0,_=o.hole!=null?o.hole[0]:null;if(_!=null){let M=Olr(g,x=>x>=_);g=g.slice(0,M),g.push(_)}for(let M=0;My-_+(g[M]-b)),A=uYe(x,T);A=A.map(y=>y+b+(y+b{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var gYe=W((lYr,vYe)=>{"use strict";var $lr=Mb(),Wlr=ME(),Ylr=GQ(),Xlr=N1(),hYe=qu(),dYe=Sb(),{float32:Zlr,fract32:Tee}=gR();vYe.exports=Klr;var pYe=[[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 Klr(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,i,n,a,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)}),n=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=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:pYe}),p(t),i=e({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range: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:(m,g)=>[g.viewport.x,g.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:o,offset:(m,g)=>g.offset*4,divisor:1},position:{buffer:n,offset:(m,g)=>g.offset*8,divisor:1},positionFract:{buffer:a,offset:(m,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(m,g)=>g.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:pYe.length}),hYe(f,{update:p,draw:h,destroy:v,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(m){m?p(m):m===null&&v(),h()}function h(m){if(typeof m=="number")return d(m);m&&!Array.isArray(m)&&(m=[m]),e._refresh(),c.forEach((g,w)=>{if(g){if(m&&(m[w]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}d(w)}})}function d(m){typeof m=="number"&&(m=c[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],i(m),m.after&&m.after(m))}function p(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let g=0,w=0;if(f.groups=c=m.map((M,x)=>{let T=c[x];if(M)typeof M=="function"?M={after:M}:typeof M[0]=="number"&&(M={positions:M});else return T;return M=Xlr(M,{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[x]=T={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},M=hYe({},u,M)),Ylr(T,M,[{lineWidth:A=>+A*.5,capSize:A=>+A*.5,opacity:parseFloat,errors:A=>(A=dYe(A),w+=A.length,A),positions:(A,y)=>(A=dYe(A,"float64"),y.count=Math.floor(A.length/2),y.bounds=$lr(A,2),y.offset=g,g+=y.count,A)},{color:(A,y)=>{let E=y.count;if(A||(A="transparent"),!Array.isArray(A)||typeof A[0]=="number"){let C=A;A=Array(E);for(let k=0;k{let S=y.bounds;return A||(A=S),y.scale=[1/(A[2]-A[0]),1/(A[3]-A[1])],y.translate=[-A[0],-A[1]],y.scaleFract=Tee(y.scale),y.translateFract=Tee(y.translate),A},viewport:A=>{let y;return Array.isArray(A)?y={x:A[0],y:A[1],width:A[2]-A[0],height:A[3]-A[1]}:A?(y={x:A.x||A.left||0,y:A.y||A.top||0},A.right?y.width=A.right-y.x:y.width=A.w||A.width||0,A.bottom?y.height=A.bottom-y.y:y.height=A.h||A.height||0):y={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},y}}]),T}),g||w){let M=c.reduce((y,E,S)=>y+(E?E.count:0),0),x=new Float64Array(M*2),T=new Uint8Array(M*4),A=new Float32Array(M*4);c.forEach((y,E)=>{if(!y)return;let{positions:S,count:C,offset:k,color:D,errors:F}=y;C&&(T.set(D,k*4),A.set(F,k*4),x.set(S,k*2))});var b=Zlr(x);n(b);var _=Tee(x,b);a(_),o(T),s(A)}}function v(){n.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var xYe=W((uYr,yYe)=>{var mYe=/[\'\"]/;yYe.exports=function(t){return t?(mYe.test(t.charAt(0))&&(t=t.substr(1)),mYe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var Aee=W((cYr,Jlr)=>{Jlr.exports=["inherit","initial","unset"]});var Mee=W((fYr,Qlr)=>{Qlr.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var See=W((hYr,eur)=>{eur.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var Eee=W((dYr,tur)=>{tur.exports=["normal","italic","oblique"]});var kee=W((pYr,rur)=>{rur.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var TYe=W((vYr,wYe)=>{"use strict";function _Ye(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||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(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,p){var v=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(v),n+v+n}r.forEach(function(h,d){for(var p,v=0;h!=p;)if(p=h,h=h.replace(u,f),v++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+n+d+"\\"+n+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+n+"([0-9]+)\\"+n);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function bYe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",i=e[0],n;if(!i)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;i!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=i,i=i.replace(a,s)}return i}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 Cee(e,t){return Array.isArray(e)?bYe(e,t):_Ye(e,t)}Cee.parse=_Ye;Cee.stringify=bYe;wYe.exports=Cee});var SYe=W((gYr,MYe)=>{"use strict";var AYe=TYe();MYe.exports=function(t,r,i){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");i?(typeof i=="string"||Array.isArray(i))&&(i={ignore:i}):i={},i.escape==null&&(i.escape=!0),i.ignore==null?i.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof i.ignore=="string"&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var n=AYe.parse(t,{flat:!0,brackets:i.ignore}),a=n[0],o=a.split(r);if(i.escape){for(var s=[],l=0;l{iur.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var Dee=W((yYr,kYe)=>{"use strict";var nur=EYe();kYe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||nur.indexOf(t)!==-1}}});var LYe=W((xYr,FYe)=>{"use strict";var aur=xYe(),our=Aee(),sur=Mee(),lur=See(),uur=Eee(),cur=kee(),Fee=SYe(),fur=Dee().isSize;FYe.exports=DYe;var zE=DYe.cache={};function DYe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(zE[e])return zE[e];if(e==="")throw new Error("Cannot parse an empty string.");if(sur.indexOf(e)!==-1)return zE[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=Fee(e,/\s+/),i;i=r.shift();){if(our.indexOf(i)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=i}),zE[e]=t;if(uur.indexOf(i)!==-1){t.style=i;continue}if(i==="normal"||i==="small-caps"){t.variant=i;continue}if(cur.indexOf(i)!==-1){t.stretch=i;continue}if(lur.indexOf(i)!==-1){t.weight=i;continue}if(fur(i)){var n=Fee(i,"/");if(t.size=n[0],n[1]!=null?t.lineHeight=CYe(n[1]):r[0]==="/"&&(r.shift(),t.lineHeight=CYe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=Fee(r.join(" "),/\s*,\s*/).map(aur),zE[e]=t}throw new Error("Unknown or unsupported font token: "+i)}throw new Error("Missing required font-size.")}function CYe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var Pee=W((_Yr,PYe)=>{"use strict";var hur=N1(),dur=Dee().isSize,pur=qE(Aee()),vur=qE(Mee()),gur=qE(See()),mur=qE(Eee()),yur=qE(kee()),xur={normal:1,"small-caps":1},_ur={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},Lee={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};PYe.exports=function(t){if(t=hur(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&&BE(t.system,vur),t.system;if(BE(t.style,mur),BE(t.variant,xur),BE(t.weight,gur),BE(t.stretch,yur),t.size==null&&(t.size=Lee.size),typeof t.size=="number"&&(t.size+="px"),!dur)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=Lee.family),Array.isArray(t.family)&&(t.family.length||(t.family=[Lee.family]),t.family=t.family.map(function(i){return _ur[i]?i:'"'+i+'"'}).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 BE(e,t){if(e&&!t[e]&&!pur[e])throw Error("Unknown keyword `"+e+"`");return e}function qE(e){for(var t={},r=0;r{"use strict";IYe.exports={parse:LYe(),stringify:Pee()}});var zee=W((Iee,Ree)=>{(function(e,t){typeof Iee=="object"&&typeof Ree!="undefined"?Ree.exports=t():e.createREGL=t()})(Iee,(function(){"use strict";var e=function(Be,gt){for(var Mt=Object.keys(gt),or=0;or1&>===Mt&&(gt==='"'||gt==="'"))return['"'+o(Be.substr(1,Be.length-2))+'"'];var or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Be);if(or)return s(Be.substr(0,or.index)).concat(s(or[1])).concat(s(Be.substr(or.index+or[0].length)));var vr=Be.split(".");if(vr.length===1)return['"'+o(Be)+'"'];for(var wr=[],dr=0;dr65535)<<4,Be>>>=gt,Mt=(Be>255)<<3,Be>>>=Mt,gt|=Mt,Mt=(Be>15)<<2,Be>>>=Mt,gt|=Mt,Mt=(Be>3)<<1,Be>>>=Mt,gt|=Mt,gt|Be>>1}function L(){var Be=A(8,function(){return[]});function gt(wr){var dr=P(wr),Br=Be[R(dr)>>2];return Br.length>0?Br.pop():new ArrayBuffer(dr)}function Mt(wr){Be[R(wr.byteLength)>>2].push(wr)}function or(wr,dr){var Br=null;switch(wr){case y:Br=new Int8Array(gt(dr),0,dr);break;case E:Br=new Uint8Array(gt(dr),0,dr);break;case S:Br=new Int16Array(gt(2*dr),0,dr);break;case C:Br=new Uint16Array(gt(2*dr),0,dr);break;case k:Br=new Int32Array(gt(4*dr),0,dr);break;case D:Br=new Uint32Array(gt(4*dr),0,dr);break;case F:Br=new Float32Array(gt(4*dr),0,dr);break;default:return null}return Br.length!==dr?Br.subarray(0,dr):Br}function vr(wr){Mt(wr.buffer)}return{alloc:gt,free:Mt,allocType:or,freeType:vr}}var I=L();I.zero=L();var B=3408,O=3410,$=3411,Y=3412,K=3413,j=3414,q=3415,J=33901,U=33902,V=3379,X=3386,H=34921,G=36347,Q=36348,te=35661,ce=35660,ge=34930,Ce=36349,be=34076,he=34024,oe=7936,Ee=7937,ye=7938,ue=35724,ee=34047,ae=36063,xe=34852,re=3553,pe=34067,we=34069,Fe=33984,Se=6408,ke=5126,_e=5121,Ie=36160,Oe=36053,Qe=36064,et=16384,_t=function(Be,gt){var Mt=1;gt.ext_texture_filter_anisotropic&&(Mt=Be.getParameter(ee));var or=1,vr=1;gt.webgl_draw_buffers&&(or=Be.getParameter(xe),vr=Be.getParameter(ae));var wr=!!gt.oes_texture_float;if(wr){var dr=Be.createTexture();Be.bindTexture(re,dr),Be.texImage2D(re,0,Se,1,1,0,Se,ke,null);var Br=Be.createFramebuffer();if(Be.bindFramebuffer(Ie,Br),Be.framebufferTexture2D(Ie,Qe,re,dr,0),Be.bindTexture(re,null),Be.checkFramebufferStatus(Ie)!==Oe)wr=!1;else{Be.viewport(0,0,1,1),Be.clearColor(1,0,0,1),Be.clear(et);var Zr=I.allocType(ke,4);Be.readPixels(0,0,1,1,Se,ke,Zr),Be.getError()?wr=!1:(Be.deleteFramebuffer(Br),Be.deleteTexture(dr),wr=Zr[0]===1),I.freeType(Zr)}}var Kr=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Jr=!0;if(!Kr){var un=Be.createTexture(),Oi=I.allocType(_e,36);Be.activeTexture(Fe),Be.bindTexture(pe,un),Be.texImage2D(we,0,Se,3,3,0,Se,_e,Oi),I.freeType(Oi),Be.bindTexture(pe,null),Be.deleteTexture(un),Jr=!Be.getError()}return{colorBits:[Be.getParameter(O),Be.getParameter($),Be.getParameter(Y),Be.getParameter(K)],depthBits:Be.getParameter(j),stencilBits:Be.getParameter(q),subpixelBits:Be.getParameter(B),extensions:Object.keys(gt).filter(function(mi){return!!gt[mi]}),maxAnisotropic:Mt,maxDrawbuffers:or,maxColorAttachments:vr,pointSizeDims:Be.getParameter(J),lineWidthDims:Be.getParameter(U),maxViewportDims:Be.getParameter(X),maxCombinedTextureUnits:Be.getParameter(te),maxCubeMapSize:Be.getParameter(be),maxRenderbufferSize:Be.getParameter(he),maxTextureUnits:Be.getParameter(ge),maxTextureSize:Be.getParameter(V),maxAttributes:Be.getParameter(H),maxVertexUniforms:Be.getParameter(G),maxVertexTextureUnits:Be.getParameter(ce),maxVaryingVectors:Be.getParameter(Q),maxFragmentUniforms:Be.getParameter(Ce),glsl:Be.getParameter(ue),renderer:Be.getParameter(Ee),vendor:Be.getParameter(oe),version:Be.getParameter(ye),readFloat:wr,npotTextureCube:Jr}},ut=function(Be){return Be instanceof Uint8Array||Be instanceof Uint16Array||Be instanceof Uint32Array||Be instanceof Int8Array||Be instanceof Int16Array||Be instanceof Int32Array||Be instanceof Float32Array||Be instanceof Float64Array||Be instanceof Uint8ClampedArray};function vt(Be){return!!Be&&typeof Be=="object"&&Array.isArray(Be.shape)&&Array.isArray(Be.stride)&&typeof Be.offset=="number"&&Be.shape.length===Be.stride.length&&(Array.isArray(Be.data)||ut(Be.data))}var Xe=function(Be){return Object.keys(Be).map(function(gt){return Be[gt]})},mt={shape:Re,flatten:je};function bt(Be,gt,Mt){for(var or=0;or0){var pn;if(Array.isArray(Sr[0])){xi=Je(Sr);for(var qr=1,Ir=1;Ir0){if(typeof qr[0]=="number"){var li=I.allocType(Nr.dtype,qr.length);Lr(li,qr),xi(li,Ii),I.freeType(li)}else if(Array.isArray(qr[0])||ut(qr[0])){gi=Je(qr);var hi=xt(qr,gi,Nr.dtype);xi(hi,Ii),I.freeType(hi)}}}else if(vt(qr)){gi=qr.shape;var Ri=qr.stride,vn=0,Hn=0,wi=0,Hi=0;gi.length===1?(vn=gi[0],Hn=1,wi=Ri[0],Hi=0):gi.length===2&&(vn=gi[0],Hn=gi[1],wi=Ri[0],Hi=Ri[1]);var Bn=Array.isArray(qr.data)?Nr.dtype:ei(qr.data),qn=I.allocType(Bn,vn*Hn);$i(qn,qr.data,vn,Hn,wi,Hi,qr.offset),xi(qn,Ii),I.freeType(qn)}return Ai}return jr||Ai(Qt),Ai._reglType="buffer",Ai._buffer=Nr,Ai.subdata=pn,Mt.profile&&(Ai.stats=Nr.stats),Ai.destroy=function(){Oi(Nr)},Ai}function Fr(){Xe(wr).forEach(function(Qt){Qt.buffer=Be.createBuffer(),Be.bindBuffer(Qt.type,Qt.buffer),Be.bufferData(Qt.type,Qt.persistentData||Qt.byteLength,Qt.usage)})}return Mt.profile&&(gt.getTotalBufferSize=function(){var Qt=0;return Object.keys(wr).forEach(function(Sr){Qt+=wr[Sr].stats.size}),Qt}),{create:mi,createStream:Zr,destroyStream:Kr,clear:function(){Xe(wr).forEach(Oi),Br.forEach(Oi)},getBuffer:function(Qt){return Qt&&Qt._buffer instanceof dr?Qt._buffer:null},restore:Fr,_initBuffer:un}}var hn=0,ta=0,ca=1,dn=1,Vn=4,ra=4,ds={points:hn,point:ta,lines:ca,line:dn,triangles:Vn,triangle:ra,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},mo=0,Rs=1,ho=4,ka=5120,ao=5121,zs=5122,_a=5123,Xs=5124,_l=5125,yu=34963,ul=35040,Le=35044;function ot(Be,gt,Mt,or){var vr={},wr=0,dr={uint8:ao,uint16:_a};gt.oes_element_index_uint&&(dr.uint32=_l);function Br(Fr){this.id=wr++,vr[this.id]=this,this.buffer=Fr,this.primType=ho,this.vertCount=0,this.type=0}Br.prototype.bind=function(){this.buffer.bind()};var Zr=[];function Kr(Fr){var Qt=Zr.pop();return Qt||(Qt=new Br(Mt.create(null,yu,!0,!1)._buffer)),un(Qt,Fr,ul,-1,-1,0,0),Qt}function Jr(Fr){Zr.push(Fr)}function un(Fr,Qt,Sr,jr,ii,Nr,Ai){Fr.buffer.bind();var xi;if(Qt){var pn=Ai;!Ai&&(!ut(Qt)||vt(Qt)&&!ut(Qt.data))&&(pn=gt.oes_element_index_uint?_l:_a),Mt._initBuffer(Fr.buffer,Qt,Sr,pn,3)}else Be.bufferData(yu,Nr,Sr),Fr.buffer.dtype=xi||ao,Fr.buffer.usage=Sr,Fr.buffer.dimension=3,Fr.buffer.byteLength=Nr;if(xi=Ai,!Ai){switch(Fr.buffer.dtype){case ao:case ka:xi=ao;break;case _a:case zs:xi=_a;break;case _l:case Xs:xi=_l;break;default:}Fr.buffer.dtype=xi}Fr.type=xi;var qr=ii;qr<0&&(qr=Fr.buffer.byteLength,xi===_a?qr>>=1:xi===_l&&(qr>>=2)),Fr.vertCount=qr;var Ir=jr;if(jr<0){Ir=ho;var Ii=Fr.buffer.dimension;Ii===1&&(Ir=mo),Ii===2&&(Ir=Rs),Ii===3&&(Ir=ho)}Fr.primType=Ir}function Oi(Fr){or.elementsCount--,delete vr[Fr.id],Fr.buffer.destroy(),Fr.buffer=null}function mi(Fr,Qt){var Sr=Mt.create(null,yu,!0),jr=new Br(Sr._buffer);or.elementsCount++;function ii(Nr){if(!Nr)Sr(),jr.primType=ho,jr.vertCount=0,jr.type=ao;else if(typeof Nr=="number")Sr(Nr),jr.primType=ho,jr.vertCount=Nr|0,jr.type=ao;else{var Ai=null,xi=Le,pn=-1,qr=-1,Ir=0,Ii=0;Array.isArray(Nr)||ut(Nr)||vt(Nr)?Ai=Nr:("data"in Nr&&(Ai=Nr.data),"usage"in Nr&&(xi=st[Nr.usage]),"primitive"in Nr&&(pn=ds[Nr.primitive]),"count"in Nr&&(qr=Nr.count|0),"type"in Nr&&(Ii=dr[Nr.type]),"length"in Nr?Ir=Nr.length|0:(Ir=qr,Ii===_a||Ii===zs?Ir*=2:(Ii===_l||Ii===Xs)&&(Ir*=4))),un(jr,Ai,xi,pn,qr,Ir,Ii)}return ii}return ii(Fr),ii._reglType="elements",ii._elements=jr,ii.subdata=function(Nr,Ai){return Sr.subdata(Nr,Ai),ii},ii.destroy=function(){Oi(jr)},ii}return{create:mi,createStream:Kr,destroyStream:Jr,getElements:function(Fr){return typeof Fr=="function"&&Fr._elements instanceof Br?Fr._elements:null},clear:function(){Xe(vr).forEach(Oi)}}}var lt=new Float32Array(1),kt=new Uint32Array(lt.buffer),Jt=5123;function Rt(Be){for(var gt=I.allocType(Jt,Be.length),Mt=0;Mt>>31<<15,wr=(or<<1>>>24)-127,dr=or>>13&1023;if(wr<-24)gt[Mt]=vr;else if(wr<-14){var Br=-14-wr;gt[Mt]=vr+(dr+1024>>Br)}else wr>15?gt[Mt]=vr+31744:gt[Mt]=vr+(wr+15<<10)+dr}return gt}function Tr(Be){return Array.isArray(Be)||ut(Be)}var Wt=34467,br=3553,Xr=34067,ti=34069,Mi=6408,an=6406,Gn=6407,yn=6409,fa=6410,Wn=32854,Ja=32855,oo=36194,Ao=32819,Io=32820,ps=33635,rs=34042,Mo=6402,is=34041,Ro=35904,Uo=35906,so=36193,In=33776,va=33777,vs=33778,Zs=33779,Ks=35986,Ol=35987,Js=34798,ru=35840,xu=35841,_u=35842,dc=35843,Nl=36196,ja=5121,bu=5123,Hu=5125,Ss=5126,iu=10242,ph=10243,yo=10497,nu=33071,Zo=33648,au=10240,Cv=10241,Nc=9728,r0=9729,Of=9984,vh=9985,Nf=9986,i0=9987,Dv=33170,gh=4352,up=4353,n0=4354,j0=34046,$0=3317,Fv=37440,Lv=37441,Uc=37443,cp=37444,mh=33984,ju=[Of,Nf,vh,i0],Es=[0,yn,fa,Gn,Mi],Vo={};Vo[yn]=Vo[an]=Vo[Mo]=1,Vo[is]=Vo[fa]=2,Vo[Gn]=Vo[Ro]=3,Vo[Mi]=Vo[Uo]=4;function wu(Be){return"[object "+Be+"]"}var W0=wu("HTMLCanvasElement"),yh=wu("OffscreenCanvas"),a0=wu("CanvasRenderingContext2D"),Pv=wu("ImageBitmap"),ug=wu("HTMLImageElement"),Wm=wu("HTMLVideoElement"),Tx=Object.keys(Ve).concat([W0,yh,a0,Pv,ug,Wm]),xh=[];xh[ja]=1,xh[Ss]=4,xh[so]=2,xh[bu]=2,xh[Hu]=4;var Bs=[];Bs[Wn]=2,Bs[Ja]=2,Bs[oo]=2,Bs[is]=4,Bs[In]=.5,Bs[va]=.5,Bs[vs]=1,Bs[Zs]=1,Bs[Ks]=.5,Bs[Ol]=1,Bs[Js]=1,Bs[ru]=.5,Bs[xu]=.25,Bs[_u]=.5,Bs[dc]=.25,Bs[Nl]=.5;function Iv(Be){return Array.isArray(Be)&&(Be.length===0||typeof Be[0]=="number")}function Rv(Be){if(!Array.isArray(Be))return!1;var gt=Be.length;return!(gt===0||!Tr(Be[0]))}function _h(Be){return Object.prototype.toString.call(Be)}function cg(Be){return _h(Be)===W0}function Y0(Be){return _h(Be)===yh}function fp(Be){return _h(Be)===a0}function hf(Be){return _h(Be)===Pv}function zv(Be){return _h(Be)===ug}function hp(Be){return _h(Be)===Wm}function X0(Be){if(!Be)return!1;var gt=_h(Be);return Tx.indexOf(gt)>=0?!0:Iv(Be)||Rv(Be)||vt(Be)}function fg(Be){return Ve[Object.prototype.toString.call(Be)]|0}function hg(Be,gt){var Mt=gt.length;switch(Be.type){case ja:case bu:case Hu:case Ss:var or=I.allocType(Be.type,Mt);or.set(gt),Be.data=or;break;case so:Be.data=Rt(gt);break;default:}}function Ym(Be,gt){return I.allocType(Be.type===so?Ss:Be.type,gt)}function Uf(Be,gt){Be.type===so?(Be.data=Rt(gt),I.freeType(gt)):Be.data=gt}function Bv(Be,gt,Mt,or,vr,wr){for(var dr=Be.width,Br=Be.height,Zr=Be.channels,Kr=dr*Br*Zr,Jr=Ym(Be,Kr),un=0,Oi=0;Oi=1;)Br+=dr*Zr*Zr,Zr/=2;return Br}else return dr*Mt*or}function dp(Be,gt,Mt,or,vr,wr,dr){var Br={"don't care":gh,"dont care":gh,nice:n0,fast:up},Zr={repeat:yo,clamp:nu,mirror:Zo},Kr={nearest:Nc,linear:r0},Jr=e({mipmap:i0,"nearest mipmap nearest":Of,"linear mipmap nearest":vh,"nearest mipmap linear":Nf,"linear mipmap linear":i0},Kr),un={none:0,browser:cp},Oi={uint8:ja,rgba4:Ao,rgb565:ps,"rgb5 a1":Io},mi={alpha:an,luminance:yn,"luminance alpha":fa,rgb:Gn,rgba:Mi,rgba4:Wn,"rgb5 a1":Ja,rgb565:oo},Fr={};gt.ext_srgb&&(mi.srgb=Ro,mi.srgba=Uo),gt.oes_texture_float&&(Oi.float32=Oi.float=Ss),gt.oes_texture_half_float&&(Oi.float16=Oi["half float"]=so),gt.webgl_depth_texture&&(e(mi,{depth:Mo,"depth stencil":is}),e(Oi,{uint16:bu,uint32:Hu,"depth stencil":rs})),gt.webgl_compressed_texture_s3tc&&e(Fr,{"rgb s3tc dxt1":In,"rgba s3tc dxt1":va,"rgba s3tc dxt3":vs,"rgba s3tc dxt5":Zs}),gt.webgl_compressed_texture_atc&&e(Fr,{"rgb atc":Ks,"rgba atc explicit alpha":Ol,"rgba atc interpolated alpha":Js}),gt.webgl_compressed_texture_pvrtc&&e(Fr,{"rgb pvrtc 4bppv1":ru,"rgb pvrtc 2bppv1":xu,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":dc}),gt.webgl_compressed_texture_etc1&&(Fr["rgb etc1"]=Nl);var Qt=Array.prototype.slice.call(Be.getParameter(Wt));Object.keys(Fr).forEach(function(wt){var yr=Fr[wt];Qt.indexOf(yr)>=0&&(mi[wt]=yr)});var Sr=Object.keys(mi);Mt.textureFormats=Sr;var jr=[];Object.keys(mi).forEach(function(wt){var yr=mi[wt];jr[yr]=wt});var ii=[];Object.keys(Oi).forEach(function(wt){var yr=Oi[wt];ii[yr]=wt});var Nr=[];Object.keys(Kr).forEach(function(wt){var yr=Kr[wt];Nr[yr]=wt});var Ai=[];Object.keys(Jr).forEach(function(wt){var yr=Jr[wt];Ai[yr]=wt});var xi=[];Object.keys(Zr).forEach(function(wt){var yr=Zr[wt];xi[yr]=wt});var pn=Sr.reduce(function(wt,yr){var xr=mi[yr];return xr===yn||xr===an||xr===yn||xr===fa||xr===Mo||xr===is||gt.ext_srgb&&(xr===Ro||xr===Uo)?wt[xr]=xr:xr===Ja||yr.indexOf("rgba")>=0?wt[xr]=Mi:wt[xr]=Gn,wt},{});function qr(){this.internalformat=Mi,this.format=Mi,this.type=ja,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=cp,this.width=0,this.height=0,this.channels=0}function Ir(wt,yr){wt.internalformat=yr.internalformat,wt.format=yr.format,wt.type=yr.type,wt.compressed=yr.compressed,wt.premultiplyAlpha=yr.premultiplyAlpha,wt.flipY=yr.flipY,wt.unpackAlignment=yr.unpackAlignment,wt.colorSpace=yr.colorSpace,wt.width=yr.width,wt.height=yr.height,wt.channels=yr.channels}function Ii(wt,yr){if(!(typeof yr!="object"||!yr)){if("premultiplyAlpha"in yr&&(wt.premultiplyAlpha=yr.premultiplyAlpha),"flipY"in yr&&(wt.flipY=yr.flipY),"alignment"in yr&&(wt.unpackAlignment=yr.alignment),"colorSpace"in yr&&(wt.colorSpace=un[yr.colorSpace]),"type"in yr){var xr=yr.type;wt.type=Oi[xr]}var Zi=wt.width,Oa=wt.height,ss=wt.channels,Wi=!1;"shape"in yr?(Zi=yr.shape[0],Oa=yr.shape[1],yr.shape.length===3&&(ss=yr.shape[2],Wi=!0)):("radius"in yr&&(Zi=Oa=yr.radius),"width"in yr&&(Zi=yr.width),"height"in yr&&(Oa=yr.height),"channels"in yr&&(ss=yr.channels,Wi=!0)),wt.width=Zi|0,wt.height=Oa|0,wt.channels=ss|0;var dt=!1;if("format"in yr){var St=yr.format,It=wt.internalformat=mi[St];wt.format=pn[It],St in Oi&&("type"in yr||(wt.type=Oi[St])),St in Fr&&(wt.compressed=!0),dt=!0}!Wi&&dt?wt.channels=Vo[wt.format]:Wi&&!dt&&wt.channels!==Es[wt.format]&&(wt.format=wt.internalformat=Es[wt.channels])}}function gi(wt){Be.pixelStorei(Fv,wt.flipY),Be.pixelStorei(Lv,wt.premultiplyAlpha),Be.pixelStorei(Uc,wt.colorSpace),Be.pixelStorei($0,wt.unpackAlignment)}function li(){qr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function hi(wt,yr){var xr=null;if(X0(yr)?xr=yr:yr&&(Ii(wt,yr),"x"in yr&&(wt.xOffset=yr.x|0),"y"in yr&&(wt.yOffset=yr.y|0),X0(yr.data)&&(xr=yr.data)),yr.copy){var Zi=vr.viewportWidth,Oa=vr.viewportHeight;wt.width=wt.width||Zi-wt.xOffset,wt.height=wt.height||Oa-wt.yOffset,wt.needsCopy=!0}else if(!xr)wt.width=wt.width||1,wt.height=wt.height||1,wt.channels=wt.channels||4;else if(ut(xr))wt.channels=wt.channels||4,wt.data=xr,!("type"in yr)&&wt.type===ja&&(wt.type=fg(xr));else if(Iv(xr))wt.channels=wt.channels||4,hg(wt,xr),wt.alignment=1,wt.needsFree=!0;else if(vt(xr)){var ss=xr.data;!Array.isArray(ss)&&wt.type===ja&&(wt.type=fg(ss));var Wi=xr.shape,dt=xr.stride,St,It,gr,Mr,nr,er;Wi.length===3?(gr=Wi[2],er=dt[2]):(gr=1,er=1),St=Wi[0],It=Wi[1],Mr=dt[0],nr=dt[1],wt.alignment=1,wt.width=St,wt.height=It,wt.channels=gr,wt.format=wt.internalformat=Es[gr],wt.needsFree=!0,Bv(wt,ss,Mr,nr,er,xr.offset)}else if(cg(xr)||Y0(xr)||fp(xr))cg(xr)||Y0(xr)?wt.element=xr:wt.element=xr.canvas,wt.width=wt.element.width,wt.height=wt.element.height,wt.channels=4;else if(hf(xr))wt.element=xr,wt.width=xr.width,wt.height=xr.height,wt.channels=4;else if(zv(xr))wt.element=xr,wt.width=xr.naturalWidth,wt.height=xr.naturalHeight,wt.channels=4;else if(hp(xr))wt.element=xr,wt.width=xr.videoWidth,wt.height=xr.videoHeight,wt.channels=4;else if(Rv(xr)){var Ht=wt.width||xr[0].length,Ft=wt.height||xr.length,Nt=wt.channels;Tr(xr[0][0])?Nt=Nt||xr[0][0].length:Nt=Nt||1;for(var Et=mt.shape(xr),sr=1,Er=0;Er>=Oa,xr.height>>=Oa,hi(xr,Zi[Oa]),wt.mipmask|=1<=0&&!("faces"in yr)&&(wt.genMipmaps=!0)}if("mag"in yr){var Zi=yr.mag;wt.magFilter=Kr[Zi]}var Oa=wt.wrapS,ss=wt.wrapT;if("wrap"in yr){var Wi=yr.wrap;typeof Wi=="string"?Oa=ss=Zr[Wi]:Array.isArray(Wi)&&(Oa=Zr[Wi[0]],ss=Zr[Wi[1]])}else{if("wrapS"in yr){var dt=yr.wrapS;Oa=Zr[dt]}if("wrapT"in yr){var St=yr.wrapT;ss=Zr[St]}}if(wt.wrapS=Oa,wt.wrapT=ss,"anisotropic"in yr){var It=yr.anisotropic;wt.anisotropic=yr.anisotropic}if("mipmap"in yr){var gr=!1;switch(typeof yr.mipmap){case"string":wt.mipmapHint=Br[yr.mipmap],wt.genMipmaps=!0,gr=!0;break;case"boolean":gr=wt.genMipmaps=yr.mipmap;break;case"object":wt.genMipmaps=!1,gr=!0;break;default:}gr&&!("min"in yr)&&(wt.minFilter=Of)}}function Xf(wt,yr){Be.texParameteri(yr,Cv,wt.minFilter),Be.texParameteri(yr,au,wt.magFilter),Be.texParameteri(yr,iu,wt.wrapS),Be.texParameteri(yr,ph,wt.wrapT),gt.ext_texture_filter_anisotropic&&Be.texParameteri(yr,j0,wt.anisotropic),wt.genMipmaps&&(Be.hint(Dv,wt.mipmapHint),Be.generateMipmap(yr))}var kh=0,Su={},Eu=Mt.maxTextureUnits,Ju=Array(Eu).map(function(){return null});function sa(wt){qr.call(this),this.mipmask=0,this.internalformat=Mi,this.id=kh++,this.refCount=1,this.target=wt,this.texture=Be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new os,dr.profile&&(this.stats={size:0})}function mc(wt){Be.activeTexture(mh),Be.bindTexture(wt.target,wt.texture)}function ms(){var wt=Ju[0];wt?Be.bindTexture(wt.target,wt.texture):Be.bindTexture(br,null)}function Zf(wt){var yr=wt.texture,xr=wt.unit,Zi=wt.target;xr>=0&&(Be.activeTexture(mh+xr),Be.bindTexture(Zi,null),Ju[xr]=null),Be.deleteTexture(yr),wt.texture=null,wt.params=null,wt.pixels=null,wt.refCount=0,delete Su[wt.id],wr.textureCount--}e(sa.prototype,{bind:function(){var wt=this;wt.bindCount+=1;var yr=wt.unit;if(yr<0){for(var xr=0;xr0)continue;Zi.unit=-1}Ju[xr]=wt,yr=xr;break}yr>=Eu,dr.profile&&wr.maxTextureUnits>nr)-gr,er.height=er.height||(xr.height>>nr)-Mr,mc(xr),vn(er,br,gr,Mr,nr),ms(),Hi(er),Zi}function ss(Wi,dt){var St=Wi|0,It=dt|0||St;if(St===xr.width&&It===xr.height)return Zi;Zi.width=xr.width=St,Zi.height=xr.height=It,mc(xr);for(var gr=0;xr.mipmask>>gr;++gr){var Mr=St>>gr,nr=It>>gr;if(!Mr||!nr)break;Be.texImage2D(br,gr,xr.format,Mr,nr,0,xr.format,xr.type,null)}return ms(),dr.profile&&(xr.stats.size=Vf(xr.internalformat,xr.type,St,It,!1,!1)),Zi}return Zi(wt,yr),Zi.subimage=Oa,Zi.resize=ss,Zi._reglType="texture2d",Zi._texture=xr,dr.profile&&(Zi.stats=xr.stats),Zi.destroy=function(){xr.decRef()},Zi}function Dh(wt,yr,xr,Zi,Oa,ss){var Wi=new sa(Xr);Su[Wi.id]=Wi,wr.cubeCount++;var dt=new Array(6);function St(Mr,nr,er,Ht,Ft,Nt){var Et,sr=Wi.texInfo;for(os.call(sr),Et=0;Et<6;++Et)dt[Et]=Pa();if(typeof Mr=="number"||!Mr){var Er=Mr|0||1;for(Et=0;Et<6;++Et)qn(dt[Et],Er,Er)}else if(typeof Mr=="object")if(nr)ba(dt[0],Mr),ba(dt[1],nr),ba(dt[2],er),ba(dt[3],Ht),ba(dt[4],Ft),ba(dt[5],Nt);else if(mf(sr,Mr),Ii(Wi,Mr),"faces"in Mr){var Wr=Mr.faces;for(Et=0;Et<6;++Et)Ir(dt[Et],Wi),ba(dt[Et],Wr[Et])}else for(Et=0;Et<6;++Et)ba(dt[Et],Mr);for(Ir(Wi,dt[0]),sr.genMipmaps?Wi.mipmask=(dt[0].width<<1)-1:Wi.mipmask=dt[0].mipmask,Wi.internalformat=dt[0].internalformat,St.width=dt[0].width,St.height=dt[0].height,mc(Wi),Et=0;Et<6;++Et)Al(dt[Et],ti+Et);for(Xf(sr,Xr),ms(),dr.profile&&(Wi.stats.size=Vf(Wi.internalformat,Wi.type,St.width,St.height,sr.genMipmaps,!0)),St.format=jr[Wi.internalformat],St.type=ii[Wi.type],St.mag=Nr[sr.magFilter],St.min=Ai[sr.minFilter],St.wrapS=xi[sr.wrapS],St.wrapT=xi[sr.wrapT],Et=0;Et<6;++Et)Eh(dt[Et]);return St}function It(Mr,nr,er,Ht,Ft){var Nt=er|0,Et=Ht|0,sr=Ft|0,Er=wi();return Ir(Er,Wi),Er.width=0,Er.height=0,hi(Er,nr),Er.width=Er.width||(Wi.width>>sr)-Nt,Er.height=Er.height||(Wi.height>>sr)-Et,mc(Wi),vn(Er,ti+Mr,Nt,Et,sr),ms(),Hi(Er),St}function gr(Mr){var nr=Mr|0;if(nr!==Wi.width){St.width=Wi.width=nr,St.height=Wi.height=nr,mc(Wi);for(var er=0;er<6;++er)for(var Ht=0;Wi.mipmask>>Ht;++Ht)Be.texImage2D(ti+er,Ht,Wi.format,nr>>Ht,nr>>Ht,0,Wi.format,Wi.type,null);return ms(),dr.profile&&(Wi.stats.size=Vf(Wi.internalformat,Wi.type,St.width,St.height,!1,!0)),St}}return St(wt,yr,xr,Zi,Oa,ss),St.subimage=It,St.resize=gr,St._reglType="textureCube",St._texture=Wi,dr.profile&&(St.stats=Wi.stats),St.destroy=function(){Wi.decRef()},St}function Zn(){for(var wt=0;wt>Zi,xr.height>>Zi,0,xr.internalformat,xr.type,null);else for(var Oa=0;Oa<6;++Oa)Be.texImage2D(ti+Oa,Zi,xr.internalformat,xr.width>>Zi,xr.height>>Zi,0,xr.internalformat,xr.type,null);Xf(xr.texInfo,xr.target)})}function qs(){for(var wt=0;wt=0?Eh=!0:Zr.indexOf(os)>=0&&(Eh=!1))),("depthTexture"in sa||"depthStencilTexture"in sa)&&(Ju=!!(sa.depthTexture||sa.depthStencilTexture)),"depth"in sa&&(typeof sa.depth=="boolean"?Al=sa.depth:(kh=sa.depth,Ku=!1)),"stencil"in sa&&(typeof sa.stencil=="boolean"?Ku=sa.stencil:(Su=sa.stencil,Al=!1)),"depthStencil"in sa&&(typeof sa.depthStencil=="boolean"?Al=Ku=sa.depthStencil:(Eu=sa.depthStencil,Al=!1,Ku=!1))}var ms=null,Zf=null,Ch=null,Dh=null;if(Array.isArray(Pa))ms=Pa.map(Fr);else if(Pa)ms=[Fr(Pa)];else for(ms=new Array(Xf),Bn=0;Bn0&&(Hi.depth=hi[0].depth,Hi.stencil=hi[0].stencil,Hi.depthStencil=hi[0].depthStencil),hi[wi]?hi[wi](Hi):hi[wi]=Ir(Hi)}return e(Ri,{width:Bn,height:Bn,color:os})}function vn(Hn){var wi,Hi=Hn|0;if(Hi===Ri.width)return Ri;var Bn=Ri.color;for(wi=0;wi=Bn.byteLength?qn.subdata(Bn):(qn.destroy(),Ir.buffers[Hn]=null)),Ir.buffers[Hn]||(qn=Ir.buffers[Hn]=vr.create(wi,yp,!1,!0)),Hi.buffer=vr.getBuffer(qn),Hi.size=Hi.buffer.dimension|0,Hi.normalized=!1,Hi.type=Hi.buffer.dtype,Hi.offset=0,Hi.stride=0,Hi.divisor=0,Hi.state=1,Ri[Hn]=1}else vr.getBuffer(wi)?(Hi.buffer=vr.getBuffer(wi),Hi.size=Hi.buffer.dimension|0,Hi.normalized=!1,Hi.type=Hi.buffer.dtype,Hi.offset=0,Hi.stride=0,Hi.divisor=0,Hi.state=1):vr.getBuffer(wi.buffer)?(Hi.buffer=vr.getBuffer(wi.buffer),Hi.size=(+wi.size||Hi.buffer.dimension)|0,Hi.normalized=!!wi.normalized||!1,"type"in wi?Hi.type=kr[wi.type]:Hi.type=Hi.buffer.dtype,Hi.offset=(wi.offset||0)|0,Hi.stride=(wi.stride||0)|0,Hi.divisor=(wi.divisor||0)|0,Hi.state=1):"x"in wi&&(Hi.x=+wi.x||0,Hi.y=+wi.y||0,Hi.z=+wi.z||0,Hi.w=+wi.w||0,Hi.state=2)}for(var ba=0;ba1)for(var gi=0;giQt&&(Qt=Sr.stats.uniformsCount)}),Qt},Mt.getMaxAttributesCount=function(){var Qt=0;return Jr.forEach(function(Sr){Sr.stats.attributesCount>Qt&&(Qt=Sr.stats.attributesCount)}),Qt});function Fr(){vr={},wr={};for(var Qt=0;Qt16&&(Mt=rr(Mt,Be.length*8));for(var or=Array(16),vr=Array(16),wr=0;wr<16;wr++)or[wr]=Mt[wr]^909522486,vr[wr]=Mt[wr]^1549556828;var dr=rr(or.concat(Mp(gt)),512+gt.length*8);return Te(rr(vr.concat(dr),768))}function Gc(Be){for(var gt=ty?"0123456789ABCDEF":"0123456789abcdef",Mt="",or,vr=0;vr>>4&15)+gt.charAt(or&15);return Mt}function Tp(Be){for(var gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mt="",or=Be.length,vr=0;vrBe.length*8?Mt+=ry:Mt+=gt.charAt(wr>>>6*(3-dr)&63);return Mt}function xg(Be,gt){var Mt=gt.length,or=Array(),vr,wr,dr,Br,Zr=Array(Math.ceil(Be.length/2));for(vr=0;vr0;){for(Br=Array(),dr=0,vr=0;vr0||wr>0)&&(Br[Br.length]=wr);or[or.length]=dr,Zr=Br}var Kr="";for(vr=or.length-1;vr>=0;vr--)Kr+=gt.charAt(or[vr]);var Jr=Math.ceil(Be.length*8/(Math.log(gt.length)/Math.log(2)));for(vr=Kr.length;vr>>6&31,128|or&63):or<=65535?gt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):or<=2097151&&(gt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return gt}function Mp(Be){for(var gt=Array(Be.length>>2),Mt=0;Mt>5]|=(Be.charCodeAt(Mt/8)&255)<<24-Mt%32;return gt}function Te(Be){for(var gt="",Mt=0;Mt>5]>>>24-Mt%32&255);return gt}function qe(Be,gt){return Be>>>gt|Be<<32-gt}function rt(Be,gt){return Be>>>gt}function Ye(Be,gt,Mt){return Be>^~Be&Mt}function At(Be,gt,Mt){return Be>^Be&Mt^gt&Mt}function Gt(Be){return qe(Be,2)^qe(Be,13)^qe(Be,22)}function Kt(Be){return qe(Be,6)^qe(Be,11)^qe(Be,25)}function cr(Be){return qe(Be,7)^qe(Be,18)^rt(Be,3)}function mr(Be){return qe(Be,17)^qe(Be,19)^rt(Be,10)}var Pr=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function rr(Be,gt){var Mt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),or=new Array(64),vr,wr,dr,Br,Zr,Kr,Jr,un,Oi,mi,Fr,Qt;for(Be[gt>>5]|=128<<24-gt%32,Be[(gt+64>>9<<4)+15]=gt,Oi=0;Oi>16)+(gt>>16)+(Mt>>16);return or<<16|Mt&65535}function pr(Be){return Array.prototype.slice.call(Be)}function Dr(Be){return pr(Be).join("")}function Hr(Be){var gt=Be&&Be.cache,Mt=0,or=[],vr=[],wr=[];function dr(Fr,Qt){var Sr=Qt&&Qt.stable;if(!Sr){for(var jr=0;jr0&&(Fr.push(ii,"="),Fr.push.apply(Fr,pr(arguments)),Fr.push(";")),ii}return e(Qt,{def:jr,toString:function(){return Dr([Sr.length>0?"var "+Sr.join(",")+";":"",Dr(Fr)])}})}function Zr(){var Fr=Br(),Qt=Br(),Sr=Fr.toString,jr=Qt.toString;function ii(Nr,Ai){Qt(Nr,Ai,"=",Fr.def(Nr,Ai),";")}return e(function(){Fr.apply(Fr,pr(arguments))},{def:Fr.def,entry:Fr,exit:Qt,save:ii,set:function(Nr,Ai,xi){ii(Nr,Ai),Fr(Nr,Ai,"=",xi,";")},toString:function(){return Sr()+jr()}})}function Kr(){var Fr=Dr(arguments),Qt=Zr(),Sr=Zr(),jr=Qt.toString,ii=Sr.toString;return e(Qt,{then:function(){return Qt.apply(Qt,pr(arguments)),this},else:function(){return Sr.apply(Sr,pr(arguments)),this},toString:function(){var Nr=ii();return Nr&&(Nr="else{"+Nr+"}"),Dr(["if(",Fr,"){",jr(),"}",Nr])}})}var Jr=Br(),un={};function Oi(Fr,Qt){var Sr=[];function jr(){var pn="a"+Sr.length;return Sr.push(pn),pn}Qt=Qt||0;for(var ii=0;ii":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Dt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zt={cw:Z,ccw:ne};function $t(Be){return Array.isArray(Be)||ut(Be)||vt(Be)}function Yt(Be){return Be.sort(function(gt,Mt){return gt===Mh?-1:Mt===Mh?1:gt=1,or>=2,gt)}else if(Mt===ga){var vr=Be.data;return new Lt(vr.thisDep,vr.contextDep,vr.propDep,gt)}else{if(Mt===$a)return new Lt(!1,!1,!1,gt);if(Mt===Ca){for(var wr=!1,dr=!1,Br=!1,Zr=0;Zr=1&&(dr=!0),Jr>=2&&(Br=!0)}else Kr.type===ga&&(wr=wr||Kr.data.thisDep,dr=dr||Kr.data.contextDep,Br=Br||Kr.data.propDep)}return new Lt(wr,dr,Br,gt)}else return new Lt(Mt===En,Mt===on,Mt===ai,gt)}}var pi=new Lt(!1,!1,!1,function(){});function Li(Be,gt,Mt,or,vr,wr,dr,Br,Zr,Kr,Jr,un,Oi,mi,Fr,Qt){var Sr=Kr.Record,jr={add:32774,subtract:32778,"reverse subtract":32779};Mt.ext_blend_minmax&&(jr.min=le,jr.max=fe);var ii=Mt.angle_instanced_arrays,Nr=Mt.webgl_draw_buffers,Ai=Mt.oes_vertex_array_object,xi={dirty:!0,profile:Qt.profile},pn={},qr=[],Ir={},Ii={};function gi(dt){return dt.replace(".","_")}function li(dt,St,It){var gr=gi(dt);qr.push(dt),pn[gr]=xi[gr]=!!It,Ir[gr]=St}function hi(dt,St,It){var gr=gi(dt);qr.push(dt),Array.isArray(It)?(xi[gr]=It.slice(),pn[gr]=It.slice()):xi[gr]=pn[gr]=It,Ii[gr]=St}function Ri(dt){return!!isNaN(dt)}li(xo,Ar),li(aa,ar),hi(fl,"blendColor",[0,0,0,0]),hi(ns,"blendEquationSeparate",[We,We]),hi(po,"blendFuncSeparate",[He,ze,He,ze]),li(di,_i,!0),hi(Sa,"depthFunc",ft),hi(ks,"depthRange",[0,1]),hi(bl,"depthMask",!0),hi(Au,Au,[!0,!0,!0,!0]),li(vf,Ut),hi(Hc,"cullFace",N),hi(Hf,Hf,ne),hi(Yu,Yu,1),li(Th,cn),hi(Ah,"polygonOffset",[0,0]),li(Sp,xn),li(_g,Dn),hi(jv,"sampleCoverage",[1,!1]),li(Mx,Vr),hi($v,"stencilMask",-1),hi(jc,"stencilFunc",[De,0,-1]),hi(iy,"stencilOpSeparate",[z,me,me,me]),hi(Wv,"stencilOpSeparate",[N,me,me,me]),li(bg,rn),hi(Yv,"scissor",[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]),hi(Mh,Mh,[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]);var vn={gl:Be,context:Oi,strings:gt,next:pn,current:xi,draw:un,elements:wr,buffer:vr,shader:Jr,attributes:Kr.state,vao:Kr,uniforms:Zr,framebuffer:Br,extensions:Mt,timer:mi,isBufferArgs:$t},Hn={primTypes:ds,compareFuncs:pt,blendFuncs:jt,blendEquations:jr,stencilOps:Dt,glTypes:kr,orientationType:zt};Nr&&(Hn.backBuffer=[N],Hn.drawBuffer=A(or.maxDrawbuffers,function(dt){return dt===0?[0]:A(dt,function(St){return Ot+St})}));var wi=0;function Hi(){var dt=Hr({cache:Fr}),St=dt.link,It=dt.global;dt.id=wi++,dt.batchId="0";var gr=St(vn),Mr=dt.shared={props:"a0"};Object.keys(vn).forEach(function(Nt){Mr[Nt]=It.def(gr,".",Nt)});var nr=dt.next={},er=dt.current={};Object.keys(Ii).forEach(function(Nt){Array.isArray(xi[Nt])&&(nr[Nt]=It.def(Mr.next,".",Nt),er[Nt]=It.def(Mr.current,".",Nt))});var Ht=dt.constants={};Object.keys(Hn).forEach(function(Nt){Ht[Nt]=It.def(JSON.stringify(Hn[Nt]))}),dt.invoke=function(Nt,Et){switch(Et.type){case Yr:var sr=["this",Mr.context,Mr.props,dt.batchId];return Nt.def(St(Et.data),".call(",sr.slice(0,Math.max(Et.data.length+1,4)),")");case ai:return Nt.def(Mr.props,Et.data);case on:return Nt.def(Mr.context,Et.data);case En:return Nt.def("this",Et.data);case ga:return Et.data.append(dt,Nt),Et.data.ref;case $a:return Et.data.toString();case Ca:return Et.data.map(function(Er){return dt.invoke(Nt,Er)})}},dt.attribCache={};var Ft={};return dt.scopeAttrib=function(Nt){var Et=gt.id(Nt);if(Et in Ft)return Ft[Et];var sr=Kr.scope[Et];sr||(sr=Kr.scope[Et]=new Sr);var Er=Ft[Et]=St(sr);return Er},dt}function Bn(dt){var St=dt.static,It=dt.dynamic,gr;if(wg in St){var Mr=!!St[wg];gr=Gr(function(er,Ht){return Mr}),gr.enable=Mr}else if(wg in It){var nr=It[wg];gr=ri(nr,function(er,Ht){return er.invoke(Ht,nr)})}return gr}function qn(dt,St){var It=dt.static,gr=dt.dynamic;if(Ep in It){var Mr=It[Ep];return Mr?(Mr=Br.getFramebuffer(Mr),Gr(function(er,Ht){var Ft=er.link(Mr),Nt=er.shared;Ht.set(Nt.framebuffer,".next",Ft);var Et=Nt.context;return Ht.set(Et,"."+ve,Ft+".width"),Ht.set(Et,"."+Me,Ft+".height"),Ft})):Gr(function(er,Ht){var Ft=er.shared;Ht.set(Ft.framebuffer,".next","null");var Nt=Ft.context;return Ht.set(Nt,"."+ve,Nt+"."+nt),Ht.set(Nt,"."+Me,Nt+"."+Ze),"null"})}else if(Ep in gr){var nr=gr[Ep];return ri(nr,function(er,Ht){var Ft=er.invoke(Ht,nr),Nt=er.shared,Et=Nt.framebuffer,sr=Ht.def(Et,".getFramebuffer(",Ft,")");Ht.set(Et,".next",sr);var Er=Nt.context;return Ht.set(Er,"."+ve,sr+"?"+sr+".width:"+Er+"."+nt),Ht.set(Er,"."+Me,sr+"?"+sr+".height:"+Er+"."+Ze),sr})}else return null}function ba(dt,St,It){var gr=dt.static,Mr=dt.dynamic;function nr(Ft){if(Ft in gr){var Nt=gr[Ft],Et=!0,sr=Nt.x|0,Er=Nt.y|0,Wr,_n;return"width"in Nt?Wr=Nt.width|0:Et=!1,"height"in Nt?_n=Nt.height|0:Et=!1,new Lt(!Et&&St&&St.thisDep,!Et&&St&&St.contextDep,!Et&&St&&St.propDep,function(gn,nn){var en=gn.shared.context,Di=Wr;"width"in Nt||(Di=nn.def(en,".",ve,"-",sr));var Yi=_n;return"height"in Nt||(Yi=nn.def(en,".",Me,"-",Er)),[sr,Er,Di,Yi]})}else if(Ft in Mr){var Bi=Mr[Ft],Ci=ri(Bi,function(gn,nn){var en=gn.invoke(nn,Bi),Di=gn.shared.context,Yi=nn.def(en,".x|0"),Qi=nn.def(en,".y|0"),jn=nn.def('"width" in ',en,"?",en,".width|0:","(",Di,".",ve,"-",Yi,")"),Os=nn.def('"height" in ',en,"?",en,".height|0:","(",Di,".",Me,"-",Qi,")");return[Yi,Qi,jn,Os]});return St&&(Ci.thisDep=Ci.thisDep||St.thisDep,Ci.contextDep=Ci.contextDep||St.contextDep,Ci.propDep=Ci.propDep||St.propDep),Ci}else return St?new Lt(St.thisDep,St.contextDep,St.propDep,function(gn,nn){var en=gn.shared.context;return[0,0,nn.def(en,".",ve),nn.def(en,".",Me)]}):null}var er=nr(Mh);if(er){var Ht=er;er=new Lt(er.thisDep,er.contextDep,er.propDep,function(Ft,Nt){var Et=Ht.append(Ft,Nt),sr=Ft.shared.context;return Nt.set(sr,"."+Ae,Et[2]),Nt.set(sr,"."+Pe,Et[3]),Et})}return{viewport:er,scissor_box:nr(Yv)}}function Al(dt,St){var It=dt.static,gr=typeof It[td]=="string"&&typeof It[kp]=="string";if(gr){if(Object.keys(St.dynamic).length>0)return null;var Mr=St.static,nr=Object.keys(Mr);if(nr.length>0&&typeof Mr[nr[0]]=="number"){for(var er=[],Ht=0;Ht"+Yi+"?"+Et+".constant["+Yi+"]:0;"}).join(""),"}}else{","if(",Wr,"(",Et,".buffer)){",gn,"=",_n,".createStream(",yt,",",Et,".buffer);","}else{",gn,"=",_n,".getBuffer(",Et,".buffer);","}",nn,'="type" in ',Et,"?",Er.glTypes,"[",Et,".type]:",gn,".dtype;",Bi.normalized,"=!!",Et,".normalized;");function en(Di){Nt(Bi[Di],"=",Et,".",Di,"|0;")}return en("size"),en("offset"),en("stride"),en("divisor"),Nt("}}"),Nt.exit("if(",Bi.isStream,"){",_n,".destroyStream(",gn,");","}"),Bi}Mr[nr]=ri(er,Ht)}),Mr}function Xf(dt){var St=dt.static,It=dt.dynamic,gr={};return Object.keys(St).forEach(function(Mr){var nr=St[Mr];gr[Mr]=Gr(function(er,Ht){return typeof nr=="number"||typeof nr=="boolean"?""+nr:er.link(nr)})}),Object.keys(It).forEach(function(Mr){var nr=It[Mr];gr[Mr]=ri(nr,function(er,Ht){return er.invoke(Ht,nr)})}),gr}function kh(dt,St,It,gr,Mr){var nr=dt.static,er=dt.dynamic,Ht=Al(dt,St),Ft=qn(dt,Mr),Nt=ba(dt,Ft,Mr),Et=Pa(dt,Mr),sr=Eh(dt,Mr),Er=Ku(dt,Mr,Ht);function Wr(en){var Di=Nt[en];Di&&(sr[en]=Di)}Wr(Mh),Wr(gi(Yv));var _n=Object.keys(sr).length>0,Bi={framebuffer:Ft,draw:Et,shader:Er,state:sr,dirty:_n,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Bi.profile=Bn(dt,Mr),Bi.uniforms=os(It,Mr),Bi.drawVAO=Bi.scopeVAO=Et.vao,!Bi.drawVAO&&Er.program&&!Ht&&Mt.angle_instanced_arrays&&Et.static.elements){var Ci=!0,gn=Er.program.attributes.map(function(en){var Di=St.static[en];return Ci=Ci&&!!Di,Di});if(Ci&&gn.length>0){var nn=Kr.getVAO(Kr.createVAO({attributes:gn,elements:Et.static.elements}));Bi.drawVAO=new Lt(null,null,null,function(en,Di){return en.link(nn)}),Bi.useVAO=!0}}return Ht?Bi.useVAO=!0:Bi.attributes=mf(St,Mr),Bi.context=Xf(gr,Mr),Bi}function Su(dt,St,It){var gr=dt.shared,Mr=gr.context,nr=dt.scope();Object.keys(It).forEach(function(er){St.save(Mr,"."+er);var Ht=It[er],Ft=Ht.append(dt,St);Array.isArray(Ft)?nr(Mr,".",er,"=[",Ft.join(),"];"):nr(Mr,".",er,"=",Ft,";")}),St(nr)}function Eu(dt,St,It,gr){var Mr=dt.shared,nr=Mr.gl,er=Mr.framebuffer,Ht;Nr&&(Ht=St.def(Mr.extensions,".webgl_draw_buffers"));var Ft=dt.constants,Nt=Ft.drawBuffer,Et=Ft.backBuffer,sr;It?sr=It.append(dt,St):sr=St.def(er,".next"),gr||St("if(",sr,"!==",er,".cur){"),St("if(",sr,"){",nr,".bindFramebuffer(",ht,",",sr,".framebuffer);"),Nr&&St(Ht,".drawBuffersWEBGL(",Nt,"[",sr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",ht,",null);"),Nr&&St(Ht,".drawBuffersWEBGL(",Et,");"),St("}",er,".cur=",sr,";"),gr||St("}")}function Ju(dt,St,It){var gr=dt.shared,Mr=gr.gl,nr=dt.current,er=dt.next,Ht=gr.current,Ft=gr.next,Nt=dt.cond(Ht,".dirty");qr.forEach(function(Et){var sr=gi(Et);if(!(sr in It.state)){var Er,Wr;if(sr in er){Er=er[sr],Wr=nr[sr];var _n=A(xi[sr].length,function(Ci){return Nt.def(Er,"[",Ci,"]")});Nt(dt.cond(_n.map(function(Ci,gn){return Ci+"!=="+Wr+"["+gn+"]"}).join("||")).then(Mr,".",Ii[sr],"(",_n,");",_n.map(function(Ci,gn){return Wr+"["+gn+"]="+Ci}).join(";"),";"))}else{Er=Nt.def(Ft,".",sr);var Bi=dt.cond(Er,"!==",Ht,".",sr);Nt(Bi),sr in Ir?Bi(dt.cond(Er).then(Mr,".enable(",Ir[sr],");").else(Mr,".disable(",Ir[sr],");"),Ht,".",sr,"=",Er,";"):Bi(Mr,".",Ii[sr],"(",Er,");",Ht,".",sr,"=",Er,";")}}}),Object.keys(It.state).length===0&&Nt(Ht,".dirty=false;"),St(Nt)}function sa(dt,St,It,gr){var Mr=dt.shared,nr=dt.current,er=Mr.current,Ht=Mr.gl,Ft;Yt(Object.keys(It)).forEach(function(Nt){var Et=It[Nt];if(!(gr&&!gr(Et))){var sr=Et.append(dt,St);if(Ir[Nt]){var Er=Ir[Nt];Cr(Et)?(Ft=dt.link(sr,{stable:!0}),St(dt.cond(Ft).then(Ht,".enable(",Er,");").else(Ht,".disable(",Er,");")),St(er,".",Nt,"=",Ft,";")):(St(dt.cond(sr).then(Ht,".enable(",Er,");").else(Ht,".disable(",Er,");")),St(er,".",Nt,"=",sr,";"))}else if(Tr(sr)){var Wr=nr[Nt];St(Ht,".",Ii[Nt],"(",sr,");",sr.map(function(_n,Bi){return Wr+"["+Bi+"]="+_n}).join(";"),";")}else Cr(Et)?(Ft=dt.link(sr,{stable:!0}),St(Ht,".",Ii[Nt],"(",Ft,");",er,".",Nt,"=",Ft,";")):St(Ht,".",Ii[Nt],"(",sr,");",er,".",Nt,"=",sr,";")}})}function mc(dt,St){ii&&(dt.instancing=St.def(dt.shared.extensions,".angle_instanced_arrays"))}function ms(dt,St,It,gr,Mr){var nr=dt.shared,er=dt.stats,Ht=nr.current,Ft=nr.timer,Nt=It.profile;function Et(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var sr,Er;function Wr(en){sr=St.def(),en(sr,"=",Et(),";"),typeof Mr=="string"?en(er,".count+=",Mr,";"):en(er,".count++;"),mi&&(gr?(Er=St.def(),en(Er,"=",Ft,".getNumPendingQueries();")):en(Ft,".beginQuery(",er,");"))}function _n(en){en(er,".cpuTime+=",Et(),"-",sr,";"),mi&&(gr?en(Ft,".pushScopeStats(",Er,",",Ft,".getNumPendingQueries(),",er,");"):en(Ft,".endQuery();"))}function Bi(en){var Di=St.def(Ht,".profile");St(Ht,".profile=",en,";"),St.exit(Ht,".profile=",Di,";")}var Ci;if(Nt){if(Cr(Nt)){Nt.enable?(Wr(St),_n(St.exit),Bi("true")):Bi("false");return}Ci=Nt.append(dt,St),Bi(Ci)}else Ci=St.def(Ht,".profile");var gn=dt.block();Wr(gn),St("if(",Ci,"){",gn,"}");var nn=dt.block();_n(nn),St.exit("if(",Ci,"){",nn,"}")}function Zf(dt,St,It,gr,Mr){var nr=dt.shared;function er(Ft){switch(Ft){case So:case Xu:case Ul:return 2;case oa:case jf:case $c:return 3;case as:case u0:case $f:return 4;default:return 1}}function Ht(Ft,Nt,Et){var sr=nr.gl,Er=St.def(Ft,".location"),Wr=St.def(nr.attributes,"[",Er,"]"),_n=Et.state,Bi=Et.buffer,Ci=[Et.x,Et.y,Et.z,Et.w],gn=["buffer","normalized","offset","stride"];function nn(){St("if(!",Wr,".buffer){",sr,".enableVertexAttribArray(",Er,");}");var Di=Et.type,Yi;if(Et.size?Yi=St.def(Et.size,"||",Nt):Yi=Nt,St("if(",Wr,".type!==",Di,"||",Wr,".size!==",Yi,"||",gn.map(function(jn){return Wr+"."+jn+"!=="+Et[jn]}).join("||"),"){",sr,".bindBuffer(",yt,",",Bi,".buffer);",sr,".vertexAttribPointer(",[Er,Yi,Di,Et.normalized,Et.stride,Et.offset],");",Wr,".type=",Di,";",Wr,".size=",Yi,";",gn.map(function(jn){return Wr+"."+jn+"="+Et[jn]+";"}).join(""),"}"),ii){var Qi=Et.divisor;St("if(",Wr,".divisor!==",Qi,"){",dt.instancing,".vertexAttribDivisorANGLE(",[Er,Qi],");",Wr,".divisor=",Qi,";}")}}function en(){St("if(",Wr,".buffer){",sr,".disableVertexAttribArray(",Er,");",Wr,".buffer=null;","}if(",zi.map(function(Di,Yi){return Wr+"."+Di+"!=="+Ci[Yi]}).join("||"),"){",sr,".vertexAttrib4f(",Er,",",Ci,");",zi.map(function(Di,Yi){return Wr+"."+Di+"="+Ci[Yi]+";"}).join(""),"}")}_n===Vi?nn():_n===Xi?en():(St("if(",_n,"===",Vi,"){"),nn(),St("}else{"),en(),St("}"))}gr.forEach(function(Ft){var Nt=Ft.name,Et=It.attributes[Nt],sr;if(Et){if(!Mr(Et))return;sr=Et.append(dt,St)}else{if(!Mr(pi))return;var Er=dt.scopeAttrib(Nt);sr={},Object.keys(new Sr).forEach(function(Wr){sr[Wr]=St.def(Er,".",Wr)})}Ht(dt.link(Ft),er(Ft.info.type),sr)})}function Ch(dt,St,It,gr,Mr,nr){for(var er=dt.shared,Ht=er.gl,Ft,Nt=0;Nt1){for(var Fh=[],Ag=[],ny=0;ny>1)",Bi],");")}function Qi(){It(Ci,".drawArraysInstancedANGLE(",[Er,Wr,_n,Bi],");")}Et&&Et!=="null"?nn?Yi():(It("if(",Et,"){"),Yi(),It("}else{"),Qi(),It("}")):Qi()}function Di(){function Yi(){It(nr+".drawElements("+[Er,_n,gn,Wr+"<<(("+gn+"-"+ki+")>>1)"]+");")}function Qi(){It(nr+".drawArrays("+[Er,Wr,_n]+");")}Et&&Et!=="null"?nn?Yi():(It("if(",Et,"){"),Yi(),It("}else{"),Qi(),It("}")):Qi()}ii&&(typeof Bi!="number"||Bi>=0)?typeof Bi=="string"?(It("if(",Bi,">0){"),en(),It("}else if(",Bi,"<0){"),Di(),It("}")):en():Di()}function Zn(dt,St,It,gr,Mr){var nr=Hi(),er=nr.proc("body",Mr);return ii&&(nr.instancing=er.def(nr.shared.extensions,".angle_instanced_arrays")),dt(nr,er,It,gr),nr.compile().body}function Va(dt,St,It,gr){mc(dt,St),It.useVAO?It.drawVAO?St(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,St),");"):St(dt.shared.vao,".setVAO(",dt.shared.vao,".targetVAO);"):(St(dt.shared.vao,".setVAO(null);"),Zf(dt,St,It,gr.attributes,function(){return!0})),Ch(dt,St,It,gr.uniforms,function(){return!0},!1),Dh(dt,St,St,It)}function qs(dt,St){var It=dt.proc("draw",1);mc(dt,It),Su(dt,It,St.context),Eu(dt,It,St.framebuffer),Ju(dt,It,St),sa(dt,It,St.state),ms(dt,It,St,!1,!0);var gr=St.shader.progVar.append(dt,It);if(It(dt.shared.gl,".useProgram(",gr,".program);"),St.shader.program)Va(dt,It,St,St.shader.program);else{It(dt.shared.vao,".setVAO(null);");var Mr=dt.global.def("{}"),nr=It.def(gr,".id"),er=It.def(Mr,"[",nr,"]");It(dt.cond(er).then(er,".call(this,a0);").else(er,"=",Mr,"[",nr,"]=",dt.link(function(Ht){return Zn(Va,dt,St,Ht,1)}),"(",gr,");",er,".call(this,a0);"))}Object.keys(St.state).length>0&&It(dt.shared.current,".dirty=true;"),dt.shared.vao&&It(dt.shared.vao,".setVAO(null);")}function wt(dt,St,It,gr){dt.batchId="a1",mc(dt,St);function Mr(){return!0}Zf(dt,St,It,gr.attributes,Mr),Ch(dt,St,It,gr.uniforms,Mr,!1),Dh(dt,St,St,It)}function yr(dt,St,It,gr){mc(dt,St);var Mr=It.contextDep,nr=St.def(),er="a0",Ht="a1",Ft=St.def();dt.shared.props=Ft,dt.batchId=nr;var Nt=dt.scope(),Et=dt.scope();St(Nt.entry,"for(",nr,"=0;",nr,"<",Ht,";++",nr,"){",Ft,"=",er,"[",nr,"];",Et,"}",Nt.exit);function sr(gn){return gn.contextDep&&Mr||gn.propDep}function Er(gn){return!sr(gn)}if(It.needsContext&&Su(dt,Et,It.context),It.needsFramebuffer&&Eu(dt,Et,It.framebuffer),sa(dt,Et,It.state,sr),It.profile&&sr(It.profile)&&ms(dt,Et,It,!1,!0),gr)It.useVAO?It.drawVAO?sr(It.drawVAO)?Et(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,Et),");"):Nt(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,Nt),");"):Nt(dt.shared.vao,".setVAO(",dt.shared.vao,".targetVAO);"):(Nt(dt.shared.vao,".setVAO(null);"),Zf(dt,Nt,It,gr.attributes,Er),Zf(dt,Et,It,gr.attributes,sr)),Ch(dt,Nt,It,gr.uniforms,Er,!1),Ch(dt,Et,It,gr.uniforms,sr,!0),Dh(dt,Nt,Et,It);else{var Wr=dt.global.def("{}"),_n=It.shader.progVar.append(dt,Et),Bi=Et.def(_n,".id"),Ci=Et.def(Wr,"[",Bi,"]");Et(dt.shared.gl,".useProgram(",_n,".program);","if(!",Ci,"){",Ci,"=",Wr,"[",Bi,"]=",dt.link(function(gn){return Zn(wt,dt,It,gn,2)}),"(",_n,");}",Ci,".call(this,a0[",nr,"],",nr,");")}}function xr(dt,St){var It=dt.proc("batch",2);dt.batchId="0",mc(dt,It);var gr=!1,Mr=!0;Object.keys(St.context).forEach(function(Wr){gr=gr||St.context[Wr].propDep}),gr||(Su(dt,It,St.context),Mr=!1);var nr=St.framebuffer,er=!1;nr?(nr.propDep?gr=er=!0:nr.contextDep&&gr&&(er=!0),er||Eu(dt,It,nr)):Eu(dt,It,null),St.state.viewport&&St.state.viewport.propDep&&(gr=!0);function Ht(Wr){return Wr.contextDep&&gr||Wr.propDep}Ju(dt,It,St),sa(dt,It,St.state,function(Wr){return!Ht(Wr)}),(!St.profile||!Ht(St.profile))&&ms(dt,It,St,!1,"a1"),St.contextDep=gr,St.needsContext=Mr,St.needsFramebuffer=er;var Ft=St.shader.progVar;if(Ft.contextDep&&gr||Ft.propDep)yr(dt,It,St,null);else{var Nt=Ft.append(dt,It);if(It(dt.shared.gl,".useProgram(",Nt,".program);"),St.shader.program)yr(dt,It,St,St.shader.program);else{It(dt.shared.vao,".setVAO(null);");var Et=dt.global.def("{}"),sr=It.def(Nt,".id"),Er=It.def(Et,"[",sr,"]");It(dt.cond(Er).then(Er,".call(this,a0,a1);").else(Er,"=",Et,"[",sr,"]=",dt.link(function(Wr){return Zn(yr,dt,St,Wr,2)}),"(",Nt,");",Er,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&It(dt.shared.current,".dirty=true;"),dt.shared.vao&&It(dt.shared.vao,".setVAO(null);")}function Zi(dt,St){var It=dt.proc("scope",3);dt.batchId="a2";var gr=dt.shared,Mr=gr.current;if(Su(dt,It,St.context),St.framebuffer&&St.framebuffer.append(dt,It),Yt(Object.keys(St.state)).forEach(function(Ht){var Ft=St.state[Ht],Nt=Ft.append(dt,It);Tr(Nt)?Nt.forEach(function(Et,sr){Ri(Et)?It.set(dt.next[Ht],"["+sr+"]",Et):It.set(dt.next[Ht],"["+sr+"]",dt.link(Et,{stable:!0}))}):Cr(Ft)?It.set(gr.next,"."+Ht,dt.link(Nt,{stable:!0})):It.set(gr.next,"."+Ht,Nt)}),ms(dt,It,St,!0,!0),[Cp,Tg,Xv,gc,rd].forEach(function(Ht){var Ft=St.draw[Ht];if(Ft){var Nt=Ft.append(dt,It);Ri(Nt)?It.set(gr.draw,"."+Ht,Nt):It.set(gr.draw,"."+Ht,dt.link(Nt),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(Ht){var Ft=St.uniforms[Ht].append(dt,It);Array.isArray(Ft)&&(Ft="["+Ft.map(function(Nt){return Ri(Nt)?Nt:dt.link(Nt,{stable:!0})})+"]"),It.set(gr.uniforms,"["+dt.link(gt.id(Ht),{stable:!0})+"]",Ft)}),Object.keys(St.attributes).forEach(function(Ht){var Ft=St.attributes[Ht].append(dt,It),Nt=dt.scopeAttrib(Ht);Object.keys(new Sr).forEach(function(Et){It.set(Nt,"."+Et,Ft[Et])})}),St.scopeVAO){var nr=St.scopeVAO.append(dt,It);Ri(nr)?It.set(gr.vao,".targetVAO",nr):It.set(gr.vao,".targetVAO",dt.link(nr,{stable:!0}))}function er(Ht){var Ft=St.shader[Ht];if(Ft){var Nt=Ft.append(dt,It);Ri(Nt)?It.set(gr.shader,"."+Ht,Nt):It.set(gr.shader,"."+Ht,dt.link(Nt,{stable:!0}))}}er(kp),er(td),Object.keys(St.state).length>0&&(It(Mr,".dirty=true;"),It.exit(Mr,".dirty=true;")),It("a1(",dt.shared.context,",a0,",dt.batchId,");")}function Oa(dt){if(!(typeof dt!="object"||Tr(dt))){for(var St=Object.keys(dt),It=0;It=0;--Zn){var Va=vn[Zn];Va&&Va(Fr,null,0)}Mt.flush(),Jr&&Jr.update()}function ba(){!Bn&&vn.length>0&&(Bn=d.next(qn))}function Al(){Bn&&(d.cancel(qn),Bn=null)}function Ku(Zn){Zn.preventDefault(),vr=!0,Al(),Hn.forEach(function(Va){Va()})}function Pa(Zn){Mt.getError(),vr=!1,wr.restore(),pn.restore(),ii.restore(),qr.restore(),Ir.restore(),Ii.restore(),Ai.restore(),Jr&&Jr.restore(),gi.procs.refresh(),ba(),wi.forEach(function(Va){Va()})}Ri&&(Ri.addEventListener(Yn,Ku,!1),Ri.addEventListener(qa,Pa,!1));function Eh(){vn.length=0,Al(),Ri&&(Ri.removeEventListener(Yn,Ku),Ri.removeEventListener(qa,Pa)),pn.clear(),Ii.clear(),Ir.clear(),Ai.clear(),qr.clear(),Nr.clear(),ii.clear(),Jr&&Jr.clear(),Hi.forEach(function(Zn){Zn()})}function os(Zn){function Va(nr){var er=e({},nr);delete er.uniforms,delete er.attributes,delete er.context,delete er.vao,"stencil"in er&&er.stencil.op&&(er.stencil.opBack=er.stencil.opFront=er.stencil.op,delete er.stencil.op);function Ht(Ft){if(Ft in er){var Nt=er[Ft];delete er[Ft],Object.keys(Nt).forEach(function(Et){er[Ft+"."+Et]=Nt[Et]})}}return Ht("blend"),Ht("depth"),Ht("cull"),Ht("stencil"),Ht("polygonOffset"),Ht("scissor"),Ht("sample"),"vao"in nr&&(er.vao=nr.vao),er}function qs(nr,er){var Ht={},Ft={};return Object.keys(nr).forEach(function(Nt){var Et=nr[Nt];if(h.isDynamic(Et)){Ft[Nt]=h.unbox(Et,Nt);return}else if(er&&Array.isArray(Et)){for(var sr=0;sr0)return dt.call(this,gr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return dt.call(this,nr,nr.length)}else return Wi.call(this,nr)}return e(Mr,{stats:Oa,destroy:function(){ss.destroy()}})}var mf=Ii.setFBO=os({framebuffer:h.define.call(null,gs,"framebuffer")});function Xf(Zn,Va){var qs=0;gi.procs.poll();var wt=Va.color;wt&&(Mt.clearColor(+wt[0]||0,+wt[1]||0,+wt[2]||0,+wt[3]||0),qs|=Qs),"depth"in Va&&(Mt.clearDepth(+Va.depth),qs|=lo),"stencil"in Va&&(Mt.clearStencil(Va.stencil|0),qs|=oi),Mt.clear(qs)}function kh(Zn){if("framebuffer"in Zn)if(Zn.framebuffer&&Zn.framebuffer_reglType==="framebufferCube")for(var Va=0;Va<6;++Va)mf(e({framebuffer:Zn.framebuffer.faces[Va]},Zn),Xf);else mf(Zn,Xf);else Xf(null,Zn)}function Su(Zn){vn.push(Zn);function Va(){var qs=Zu(vn,Zn);function wt(){var yr=Zu(vn,wt);vn[yr]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Al()}vn[qs]=wt}return ba(),{cancel:Va}}function Eu(){var Zn=hi.viewport,Va=hi.scissor_box;Zn[0]=Zn[1]=Va[0]=Va[1]=0,Fr.viewportWidth=Fr.framebufferWidth=Fr.drawingBufferWidth=Zn[2]=Va[2]=Mt.drawingBufferWidth,Fr.viewportHeight=Fr.framebufferHeight=Fr.drawingBufferHeight=Zn[3]=Va[3]=Mt.drawingBufferHeight}function Ju(){Fr.tick+=1,Fr.time=mc(),Eu(),gi.procs.poll()}function sa(){qr.refresh(),Eu(),gi.procs.refresh(),Jr&&Jr.update()}function mc(){return(p()-un)/1e3}sa();function ms(Zn,Va){var qs;switch(Zn){case"frame":return Su(Va);case"lost":qs=Hn;break;case"restore":qs=wi;break;case"destroy":qs=Hi;break;default:}return qs.push(Va),{cancel:function(){for(var wt=0;wt=0},read:li,destroy:Eh,_gl:Mt,_refresh:sa,poll:function(){Ju(),Jr&&Jr.update()},now:mc,stats:Br,getCachedCode:Zf,preloadCachedCode:Ch});return gt.onDone(null,Dh),Dh}return Wc}))});var NYe=W((wYr,OYe)=>{"use strict";var bur=N1();OYe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},BYe(t)?t={container:t}:wur(t)?t={container:t}:Tur(t)?t={gl:t}:t=bur(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}BYe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=qYe(),t.container.appendChild(t.canvas),zYe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=qYe(),t.container.appendChild(t.canvas),zYe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{t.gl=t.canvas.getContext(i,t.attrs)}catch(n){}return t.gl}),t.gl};function zYe(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 BYe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function wur(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function Tur(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function qYe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var VYe=W((TYr,UYe)=>{"use strict";var Aur=Pee(),Mur=[32,126];UYe.exports=Sur;function Sur(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"),i=e.font,n=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||Mur;if(i&&typeof i!="string"&&(i=Aur(i)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=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=i,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=n[0]/2,f=n[1]/2,s=0;st[0]-n[0]/2&&(c=n[0]/2,f+=n[1]);return r}});var qee=W(Zl=>{"use strict";"use restrict";var Bee=32;Zl.INT_BITS=Bee;Zl.INT_MAX=2147483647;Zl.INT_MIN=-1<0)-(e<0)};Zl.abs=function(e){var t=e>>Bee-1;return(e^t)-t};Zl.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};Zl.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};Zl.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function GYe(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}Zl.countTrailingZeros=GYe;Zl.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};Zl.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Zl.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var OE=new 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|=r&1,--n;e[t]=i<>>8&255]<<16|OE[e>>>16&255]<<8|OE[e>>>24&255]};Zl.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};Zl.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};Zl.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};Zl.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};Zl.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>GYe(e)+1}});var $Ye=W((MYr,jYe)=>{"use strict";function HYe(e,t,r){var i=e[r]|0;if(i<=0)return[];var n=new Array(i),a;if(r===e.length-1)for(a=0;a0)return Eur(e|0,t);break;case"object":if(typeof e.length=="number")return HYe(e,t,0);break}return[]}jYe.exports=kur});var sXe=W(co=>{"use strict";var I2=qee(),of=$Ye(),WYe=V_().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:of([32,0]),UINT16:of([32,0]),UINT32:of([32,0]),BIGUINT64:of([32,0]),INT8:of([32,0]),INT16:of([32,0]),INT32:of([32,0]),BIGINT64:of([32,0]),FLOAT:of([32,0]),DOUBLE:of([32,0]),DATA:of([32,0]),UINT8C:of([32,0]),BUFFER:of([32,0])});var Cur=typeof Uint8ClampedArray!="undefined",Dur=typeof BigUint64Array!="undefined",Fur=typeof BigInt64Array!="undefined",du=window.__TYPEDARRAY_POOL;du.UINT8C||(du.UINT8C=of([32,0]));du.BIGUINT64||(du.BIGUINT64=of([32,0]));du.BIGINT64||(du.BIGINT64=of([32,0]));du.BUFFER||(du.BUFFER=of([32,0]));var IR=du.DATA,RR=du.BUFFER;co.free=function(t){if(WYe.isBuffer(t))RR[I2.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,i=I2.log2(r)|0;IR[i].push(t)}};function YYe(e){if(e){var t=e.length||e.byteLength,r=I2.log2(t);IR[r].push(e)}}function Lur(e){YYe(e.buffer)}co.freeUint8=co.freeUint16=co.freeUint32=co.freeBigUint64=co.freeInt8=co.freeInt16=co.freeInt32=co.freeBigInt64=co.freeFloat32=co.freeFloat=co.freeFloat64=co.freeDouble=co.freeUint8Clamped=co.freeDataView=Lur;co.freeArrayBuffer=YYe;co.freeBuffer=function(t){RR[I2.log2(t.length)].push(t)};co.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Xh(t);switch(r){case"uint8":return Oee(t);case"uint16":return XYe(t);case"uint32":return ZYe(t);case"int8":return KYe(t);case"int16":return JYe(t);case"int32":return QYe(t);case"float":case"float32":return eXe(t);case"double":case"float64":return tXe(t);case"uint8_clamped":return rXe(t);case"bigint64":return nXe(t);case"biguint64":return iXe(t);case"buffer":return oXe(t);case"data":case"dataview":return aXe(t);default:return null}return null};function Xh(t){var t=I2.nextPow2(t),r=I2.log2(t),i=IR[r];return i.length>0?i.pop():new ArrayBuffer(t)}co.mallocArrayBuffer=Xh;function Oee(e){return new Uint8Array(Xh(e),0,e)}co.mallocUint8=Oee;function XYe(e){return new Uint16Array(Xh(2*e),0,e)}co.mallocUint16=XYe;function ZYe(e){return new Uint32Array(Xh(4*e),0,e)}co.mallocUint32=ZYe;function KYe(e){return new Int8Array(Xh(e),0,e)}co.mallocInt8=KYe;function JYe(e){return new Int16Array(Xh(2*e),0,e)}co.mallocInt16=JYe;function QYe(e){return new Int32Array(Xh(4*e),0,e)}co.mallocInt32=QYe;function eXe(e){return new Float32Array(Xh(4*e),0,e)}co.mallocFloat32=co.mallocFloat=eXe;function tXe(e){return new Float64Array(Xh(8*e),0,e)}co.mallocFloat64=co.mallocDouble=tXe;function rXe(e){return Cur?new Uint8ClampedArray(Xh(e),0,e):Oee(e)}co.mallocUint8Clamped=rXe;function iXe(e){return Dur?new BigUint64Array(Xh(8*e),0,e):null}co.mallocBigUint64=iXe;function nXe(e){return Fur?new BigInt64Array(Xh(8*e),0,e):null}co.mallocBigInt64=nXe;function aXe(e){return new DataView(Xh(e),0,e)}co.mallocDataView=aXe;function oXe(e){e=I2.nextPow2(e);var t=I2.log2(e),r=RR[t];return r.length>0?r.pop():new WYe(e)}co.mallocBuffer=oXe;co.clearCache=function(){for(var t=0;t<32;++t)du.UINT8[t].length=0,du.UINT16[t].length=0,du.UINT32[t].length=0,du.INT8[t].length=0,du.INT16[t].length=0,du.INT32[t].length=0,du.FLOAT[t].length=0,du.DOUBLE[t].length=0,du.BIGUINT64[t].length=0,du.BIGINT64[t].length=0,du.UINT8C[t].length=0,IR[t].length=0,RR[t].length=0}});var uXe=W((EYr,lXe)=>{"use strict";var Pur=Object.prototype.toString;lXe.exports=function(e){var t;return Pur.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var Nee=W((kYr,cXe)=>{cXe.exports=function(t,r){r||(r=[0,""]),t=String(t);var i=parseFloat(t,10);return r[0]=i,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var dXe=W((CYr,hXe)=>{"use strict";var Iur=Nee();hXe.exports=fXe;var NE=96;function Uee(e,t){var r=Iur(getComputedStyle(e).getPropertyValue(t));return r[0]*fXe(r[1],e)}function Rur(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var i=Uee(r,"font-size")/128;return t.removeChild(r),i}function fXe(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 Rur(e,t);case"em":return Uee(t,"font-size");case"rem":return Uee(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 NE;case"cm":return NE/2.54;case"mm":return NE/25.4;case"pt":return NE/72;case"pc":return NE/6}return 1}});var gXe=W((DYr,vXe)=>{"use strict";vXe.exports=qR;var zur=qR.canvas=document.createElement("canvas"),zR=zur.getContext("2d"),pXe=BR([32,126]);qR.createPairs=BR;qR.ascii=pXe;function qR(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},i,n=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?i=BR(t):Array.isArray(t)?i=t:(t.o?i=BR(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(a=t.threshold))),i||(i=pXe),zR.font=n+"px "+e;for(var o=0;on*a){var c=(u-l)/n;r[s]=c*1e3}}return r}function BR(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n{"use strict";xXe.exports=R2;R2.canvas=document.createElement("canvas");R2.cache={};function R2(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 i=t.size||t.fontSize||t.em||48,n=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,n,i].join(" ")+"px "+r,s=t.origin||"top";if(R2.cache[r]&&i<=R2.cache[r].em)return mXe(R2.cache[r],s);var l=t.canvas||R2.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(i*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var p=V1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var v=V1(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-v+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var m=V1(u.getImageData(0,0,f,f)),g=f-m-1+p;d.baseline=d.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var w=V1(u.getImageData(0,0,f,f));d.median=d.middle=f-w-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var b=V1(u.getImageData(0,0,f,f));d.hanging=f-b-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var _=V1(u.getImageData(0,0,f,f));if(d.ideographic=f-_-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=V1(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=V1(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=V1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=V1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=yXe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var M=yXe(u.getImageData(0,0,f,f));d.overshoot=M-g}for(var x in d)d[x]/=i;return d.em=i,R2.cache[r]=d,mXe(d,s)}function mXe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var i in e)i!=="em"&&(r[i]=e[i]-t);return r}function V1(e){for(var t=e.height,r=e.data,i=3;i0;i-=4)if(r[i]!==0)return Math.floor((i-3)*.25/t)}});var AXe=W((LYr,TXe)=>{"use strict";var Z4=RYe(),Bur=N1(),qur=zee(),Our=NYe(),Nur=xee(),Vee=ME(),Uur=VYe(),z2=sXe(),Vur=q4(),Gur=uXe(),Hur=Nee(),jur=dXe(),$ur=gXe(),Wur=qu(),Yur=_Xe(),Xur=Sb(),Zur=qee(),bXe=Zur.nextPow2,wXe=new Nur,NR=!1;document.body&&(OR=document.body.appendChild(document.createElement("div")),OR.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(OR).fontStretch&&(NR=!0),document.body.removeChild(OR));var OR,Xo=function(t){Kur(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=Our(t),this.shader=wXe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||qur({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(),wXe.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(Gur(t)?t:{})};Xo.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(n,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(n,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(n,a){return a.atlas.texture},charStep:function(n,a){return a.atlas.step},em:function(n,a){return a.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; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),i={};return{regl:t,draw:r,atlas:i}};Xo.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=Bur(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(K){return parseFloat(K)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=Vur(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=Xur(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=Xo.baseFontSize+"px sans-serif");var i=!1,n=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(K,j){if(typeof K=="string")try{K=Z4.parse(K)}catch(ce){K=Z4.parse(Xo.baseFontSize+"px "+K)}else{var q=K.style,J=K.weight,U=K.stretch,V=K.variant;K=Z4.parse(Z4.stringify(K)),q&&(K.style=q),J&&(K.weight=J),U&&(K.stretch=U),V&&(K.variant=V)}var X=Z4.stringify({size:Xo.baseFontSize,family:K.family,stretch:NR?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style}),H=Hur(K.size),G=Math.round(H[0]*jur(H[1]));if(G!==r.fontSize[j]&&(n=!0,r.fontSize[j]=G),(!r.font[j]||X!=r.font[j].baseString)&&(i=!0,r.font[j]=Xo.fonts[X],!r.font[j])){var Q=K.family.join(", "),te=[K.style];K.style!=K.variant&&te.push(K.variant),K.variant!=K.weight&&te.push(K.weight),NR&&K.weight!=K.stretch&&te.push(K.stretch),r.font[j]={baseString:X,family:Q,weight:K.weight,stretch:K.stretch,style:K.style,variant:K.variant,width:{},kerning:{},metrics:Yur(Q,{origin:"top",fontSize:Xo.baseFontSize,fontStyle:te.join(" ")})},Xo.fonts[X]=r.font[j]}}),(i||n)&&this.font.forEach(function(K,j){var q=Z4.stringify({size:r.fontSize[j],family:K.family,stretch:NR?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style});if(r.fontAtlas[j]=r.shader.atlas[q],!r.fontAtlas[j]){var J=K.metrics;r.shader.atlas[q]=r.fontAtlas[j]={fontString:q,step:Math.ceil(r.fontSize[j]*J.bottom*.5)*2,em:r.fontSize[j],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 a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=z2.mallocFloat(this.count*2),f=0,h=0;f1?r.align[j]:r.align[0]:r.align;if(typeof q=="number")return q;switch(q){case"right":case"end":return-K;case"center":case"centre":case"middle":return-K*.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(K,j){var q=(r.font[j]||r.font[0]).metrics,J=0;return J+=q.bottom*.5,typeof K=="number"?J+=K-q.baseline:J+=-q[K],J*=-1,J})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=Vee(t.color,"uint8");else{var F;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var P=t.color.length;F=z2.mallocUint8(P);for(var R=(t.color.subarray||t.color.slice).bind(t.color),L=0;L4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(O){var $=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($);for(var Y=0;Y1?this.counts[Y]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Y]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Y*4,Y*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Y]:this.opacity,baseline:this.baselineOffset[Y]!=null?this.baselineOffset[Y]:this.baselineOffset[0],align:this.align?this.alignOffset[Y]!=null?this.alignOffset[Y]:this.alignOffset[0]:0,atlas:this.fontAtlas[Y]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Y*2,Y*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=[]}};Xo.prototype.destroy=function(){};Xo.prototype.kerning=!0;Xo.prototype.position={constant:new Float32Array(2)};Xo.prototype.translate=null;Xo.prototype.scale=null;Xo.prototype.font=null;Xo.prototype.text="";Xo.prototype.positionOffset=[0,0];Xo.prototype.opacity=1;Xo.prototype.color=new Uint8Array([0,0,0,255]);Xo.prototype.alignOffset=[0,0];Xo.maxAtlasSize=1024;Xo.atlasCanvas=document.createElement("canvas");Xo.atlasContext=Xo.atlasCanvas.getContext("2d",{alpha:!1});Xo.baseFontSize=64;Xo.fonts={};function Kur(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}TXe.exports=Xo});var UR=W((PYr,MXe)=>{"use strict";var Jur=JK(),Qur=zee();MXe.exports=function(t,r,i){var n=t._fullLayout,a=!0;return n._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(i);return}if(!(o.pick&&!n._has("parcoords"))){try{o.regl=Qur({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:i||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||Jur({container:n._glcontainer.node()}),a}});var Hee=W((Gee,FXe)=>{"use strict";var SXe=HQ(),EXe=wee(),ecr=gYe(),kXe=AXe(),CXe=it(),tcr=u1().selectMode,rcr=UR(),icr=$o(),ncr=jj(),acr=UQ().styleTextSelection,DXe={};function ocr(e,t,r,i){var n=e._size,a=e.width*i,o=e.height*i,s=n.l*i,l=n.b*i,u=n.r*i,c=n.t*i,f=n.w*i,h=n.h*i;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var Gee=FXe.exports=function(t,r,i){if(i.length){var n=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=rcr(t,["ANGLE_instanced_arrays","OES_element_index_uint"],DXe);if(!c){a.init();return}var f=a.count,h=n._glcanvas.data()[0].regl;if(ncr(t,r,i),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=ecr(h)),a.line2d===!0&&(a.line2d=EXe(h)),a.scatter2d===!0&&(a.scatter2d=SXe(h)),a.fill2d===!0&&(a.fill2d=EXe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lB&&(isNaN(I[O])||isNaN(I[O+1]));)O-=2;L.positions=I.slice(B,O+2)}return L}),a.line2d.update(a.lineOptions)),a.error2d){var m=(a.errorXOptions||[]).concat(a.errorYOptions||[]).map(function(L){return L||{positions:[],errors:[]}});a.error2d.update(m)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=CXe.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(L,I){var B=i[I];if(!(!L||!B||!B[0]||!B[0].trace)){var O=B[0],$=O.trace,Y=O.t,K=a.lineOptions[I],j,q,J=[];$._ownfill&&J.push(I),$._nexttrace&&J.push(I+1),J.length&&(a.fillOrder[I]=J);var U=[],V=K&&K.positions||Y.positions,X,H;if($.fill==="tozeroy"){for(X=0;XX&&isNaN(V[H+1]);)H-=2;V[X+1]!==0&&(U=[V[X],0]),U=U.concat(V.slice(X,H+2)),V[H+1]!==0&&(U=U.concat([V[H],0]))}else if($.fill==="tozerox"){for(X=0;XX&&isNaN(V[H]);)H-=2;V[X]!==0&&(U=[0,V[X+1]]),U=U.concat(V.slice(X,H+2)),V[H]!==0&&(U=U.concat([0,V[H+1]]))}else if($.fill==="toself"||$.fill==="tonext"){for(U=[],j=0,L.splitNull=!0,q=0;q-1;for(let[L]of i)if(L){var _=L.trace,M=L.t,x=M.index,T=_._length,A=M.x,y=M.y;if(_.selectedpoints||w||b){if(w||(w=!0),_.selectedpoints){var E=a.selectBatch[x]=_.selectedpoints,S={};for(u=0;u{"use strict";var LXe=$He();LXe.plot=Hee();PXe.exports=LXe});var zXe=W((RYr,RXe)=>{"use strict";RXe.exports=IXe()});var jee=W((zYr,NXe)=>{"use strict";var scr=Ns(),OXe=Eo(),BXe=_s().axisHoverFormat,{hovertemplateAttrs:lcr,templatefallbackAttrs:ucr}=Ga(),UE=_E(),ccr=Gl().idRegex,fcr=Da().templatedArray,K4=tn().extendFlat,vm=scr.marker,hcr=vm.line,dcr=K4(OXe("marker.line",{editTypeOverride:"calc"}),{width:K4({},hcr.width,{editType:"calc"}),editType:"calc"}),VR=K4(OXe("marker"),{symbol:vm.symbol,angle:vm.angle,size:K4({},vm.size,{editType:"markerSize"}),sizeref:vm.sizeref,sizemin:vm.sizemin,sizemode:vm.sizemode,opacity:vm.opacity,colorbar:vm.colorbar,line:dcr,editType:"calc"});VR.color.editType=VR.cmin.editType=VR.cmax.editType="style";function qXe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:ccr[e],editType:"plot"}}}NXe.exports={dimensions:fcr("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:K4({},UE.text,{}),hovertext:K4({},UE.hovertext,{}),hovertemplate:lcr(),hovertemplatefallback:ucr(),xhoverformat:BXe("x"),yhoverformat:BXe("y"),marker:VR,xaxes:qXe("x"),yaxes:qXe("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:UE.selected.marker,editType:"calc"},unselected:{marker:UE.unselected.marker,editType:"calc"},opacity:UE.opacity}});var GR=W((BYr,UXe)=>{"use strict";UXe.exports=function(e,t,r,i){i||(i=1/0);var n,a;for(n=0;n{"use strict";var $ee=it(),pcr=Xc(),VXe=jee(),vcr=$o(),gcr=bd(),mcr=GR(),ycr=aR().isOpenSymbol;GXe.exports=function(t,r,i,n){function a(d,p){return $ee.coerce(t,r,VXe,d,p)}var o=pcr(t,r,{name:"dimensions",handleItemDefaults:xcr}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=mcr(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),gcr(t,r,i,n,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=ycr(r.marker.symbol),h=vcr.isBubble(r);a("marker.line.width",f||h?1:0),_cr(t,r,n,a),$ee.coerceSelectionMarkerOpacity(r,a)};function xcr(e,t){function r(n,a){return $ee.coerce(e,t,VXe.dimensions,n,a)}r("label");var i=r("values");i&&i.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function _cr(e,t,r,i){var n=t.dimensions,a=n.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var jXe=it();$Xe.exports=function(t,r){var i=t._fullLayout,n=r.uid,a=i._splomScenes;a||(a=i._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[n]=jXe.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||jXe.extendFlat(l,o),l}});var ZXe=W((NYr,XXe)=>{"use strict";var Wee=it(),HR=Cs(),bcr=Td().calcMarkerSize,wcr=Td().calcAxisExpansion,Tcr=wd(),YXe=kb().markerSelection,Acr=kb().markerStyle,Mcr=WXe(),Scr=Kn().BADNUM,Ecr=C2().TOO_MANY_POINTS;XXe.exports=function(t,r){var i=r.dimensions,n=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function p(b,_){for(var M=b.makeCalcdata({v:_.values,vcalendar:r.calendar},"v"),x=0;xEcr,g;for(m?g=a.sizeAvg||Math.max(a.size,3):g=bcr(r,n),c=0;c{(function(){var e,t,r,i,n,a;typeof performance!="undefined"&&performance!==null&&performance.now?VE.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(VE.exports=function(){return(e()-n)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},i=e(),a=process.uptime()*1e9,n=i-a):Date.now?(VE.exports=function(){return Date.now()-r},r=Date.now()):(VE.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(KXe)});var eZe=W((UYr,WR)=>{var kcr=JXe(),gm=window,jR=["moz","webkit"],Q4="AnimationFrame",eT=gm["request"+Q4],GE=gm["cancel"+Q4]||gm["cancelRequest"+Q4];for(J4=0;!eT&&J4{tZe.exports=function(t,r){var i=typeof t=="number",n=typeof r=="number";i&&!n?(r=t,t=0):!i&&!n&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var Ccr=HQ(),Dcr=N1(),Fcr=Mb(),iZe=eZe(),Lcr=rZe(),Xee=q4(),Pcr=Sb();aZe.exports=q2;function q2(e,t){if(!(this instanceof q2))return new q2(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Ccr(e),this.canvas=this.scatter.canvas}q2.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=iZe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,iZe(()=>{this.dirty=!1})),this)};q2.prototype.update=function(...e){if(!e.length)return;for(let i=0;im||!n.lower&&v{t[a+s]=i})}this.scatter.draw(...t)}return this};q2.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 Icr(e,t,r){let i=e.id!=null?e.id:e,n=t,a=r;return i<<16|(n&255)<<8|a&255}function YR(e,t,r){let i,n,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(i=f[0],a=f[2],n=f[1],o=f[3]):f.length?(i=n=f[0],a=o=f[1]):(i=f.x,n=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,n,u,o]}function nZe(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=Xee(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var lZe=W((HYr,sZe)=>{"use strict";var Rcr=oZe(),Zee=it(),XR=Cs(),zcr=u1().selectMode;sZe.exports=function(t,r,i){if(i.length)for(var n=0;n-1,S=zcr(c)||!!n.selectedpoints||E,C=!0;if(S){var k=n._length;if(n.selectedpoints){o.selectBatch=n.selectedpoints;var D=n.selectedpoints,F={};for(d=0;d{"use strict";uZe.getDimIndex=function(t,r){for(var i=r._id,n=i.charAt(0),a={x:0,y:1}[n],o=t._visibleDims,s=0;s{"use strict";var cZe=Kee(),qcr=nR().calcHover,fZe=ji().getFromId,Ocr=tn().extendFlat;function Ncr(e,t,r,i,n){n||(n={});var a=(i||"").charAt(0)==="x",o=(i||"").charAt(0)==="y",s=hZe(e,t,r);if((a||o)&&n.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=n.gd,c=Ocr({},e),f=0;f{"use strict";var yZe=it(),vZe=yZe.pushUnique,gZe=$o(),mZe=Kee();xZe.exports=function(t,r){var i=t.cd,n=i[0].trace,a=i[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!gZe.hasMarkers(n)&&!gZe.hasText(n);if(n.visible!==!0||f)return c;var h=mZe.getDimIndex(n,l),d=mZe.getDimIndex(n,u);if(h===!1||d===!1)return c;var p=a.xpx[h],v=a.ypx[d],m=s[h],g=s[d],w=(t.scene.selectBatch||[]).slice(),b=[];if(r!==!1&&!r.degenerate)for(var _=0;_{"use strict";var bZe=it(),Ucr=wd(),Vcr=kb().markerStyle;wZe.exports=function(t,r){var i=r.trace,n=t._fullLayout._splomScenes[i.uid];if(n){Ucr(t,i),bZe.extendFlat(n.matrixOptions,Vcr(t,i));var a=bZe.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(a,null)}}});var MZe=W((XYr,AZe)=>{"use strict";var Gcr=yi(),Hcr=q$();AZe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:jee(),supplyDefaults:HXe(),colorbar:Ac(),calc:ZXe(),plot:lZe(),hoverPoints:pZe().hoverPoints,selectPoints:_Ze(),editStyle:TZe(),meta:{}};Gcr.register(Hcr)});var FZe=W((ZYr,DZe)=>{"use strict";var jcr=wee(),$cr=yi(),Wcr=UR(),Ycr=_c().getModuleCalcData,O2=dl(),SZe=Cs().getFromId,EZe=ji().shouldShowZeroLine,kZe="splom",CZe={};function Xcr(e){var t=e._fullLayout,r=$cr.getModule(kZe),i=Ycr(e.calcdata,r)[0],n=Wcr(e,["ANGLE_instanced_arrays","OES_element_index_uint"],CZe);n&&(t._hasOnlyLargeSploms&&Jee(e),r.plot(e,{},i))}function Zcr(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&Jee(e);for(var i=0;i{"use strict";var LZe=MZe();LZe.basePlotModule=FZe(),PZe.exports=LZe});var zZe=W((JYr,RZe)=>{"use strict";RZe.exports=IZe()});var tte=W((QYr,BZe)=>{"use strict";var efr=Eo(),Qee=ec(),ete=Ho(),tfr=us().attributes,ZR=tn().extendFlat,rfr=Da().templatedArray;BZe.exports={domain:tfr({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:ete({editType:"plot"}),tickfont:ete({autoShadowDflt:!0,editType:"plot"}),rangefont:ete({editType:"plot"}),dimensions:rfr("dimension",{label:{valType:"string",editType:"plot"},tickvals:ZR({},Qee.tickvals,{editType:"plot"}),ticktext:ZR({},Qee.ticktext,{editType:"plot"}),tickformat:ZR({},Qee.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:ZR({editType:"calc"},efr("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 HE=W((eXr,qZe)=>{"use strict";qZe.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 G1=W((tXr,NZe)=>{"use strict";var ifr=tA();function OZe(e){return[e]}NZe.exports={keyFun:function(e){return e.key},repeat:OZe,descend:ifr,wrap:OZe,unwrap:function(e){return e[0]}}});var nte=W((rXr,KZe)=>{"use strict";var Bl=HE(),gv=vi(),nfr=G1().keyFun,KR=G1().repeat,tT=it().sorterAsc,afr=it().strTranslate,UZe=Bl.bar.snapRatio;function VZe(e,t){return e*(1-UZe)+t*UZe}var GZe=Bl.bar.snapClose;function ofr(e,t){return e*(1-GZe)+t*GZe}function QR(e,t,r,i){if(sfr(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 l=t[a],u=l,c=a;n*c=t[r][0]&&e<=t[r][1])return!0;return!1}function lfr(e){e.attr("x",-Bl.bar.captureWidth/2).attr("width",Bl.bar.captureWidth)}function ufr(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function cfr(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=HZe(e.brush.filter.getConsolidated(),e.height),r=[0],i,n,a,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 jZe(){gv.select(document.body).style("cursor",null)}function ite(e){e.attr("stroke-dasharray",cfr)}function JR(e,t){var r=gv.select(e).selectAll(".highlight, .highlight-shadow"),i=t?r.transition().duration(Bl.bar.snapDuration).each("end",t):r;ite(i)}function $Ze(e,t){var r=e.brush,i=r.filterSpecified,n=NaN,a={},o;if(i){var s=e.height,l=r.filter.getConsolidated(),u=HZe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(n=c,isNaN(n)&&(isNaN(f)||isNaN(h)?n=isNaN(f)?h:f:n=t-u[f][1]=w[0]&&g<=w[1]){a.clickableOrdinalRange=w;break}}}return a}function hfr(e,t){gv.event.sourceEvent.stopPropagation();var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=t.unitToPaddedPx.invert(r),n=t.brush,a=$Ze(t,r),o=a.interval,s=n.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Bl.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&n.filterSpecified?n.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:i,t.parent.inBrushDrag=!0,s.brushStartCallback()}function WZe(e,t){gv.event.sourceEvent.stopPropagation();var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=t.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(t.unitToPaddedPx.invert):i.newExtent=[i.startExtent,t.unitToPaddedPx.invert(r)].sort(tT),t.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(t),JR(e.parentNode)}function dfr(e,t){var r=t.brush,i=r.filter,n=r.svgBrush;n._dragging||(YZe(e,t),WZe(e,t),t.brush.svgBrush.wasDragged=!1),n._dragging=!1;var a=gv.event;a.sourceEvent.stopPropagation();var o=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,jZe(),!n.wasDragged){n.wasDragged=void 0,n.clickableOrdinalRange?r.filterSpecified&&t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],r.filterSpecified=!0):o?(n.extent=n.stayingIntervals,n.extent.length===0&&rte(r)):rte(r),n.brushCallback(t),JR(e.parentNode),n.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);return}var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]n.newExtent[0];n.extent=n.stayingIntervals.concat(u?[n.newExtent]:[]),n.extent.length||rte(r),n.brushCallback(t),u?JR(e.parentNode,s):(s(),JR(e.parentNode))}else s();n.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}function YZe(e,t){var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=$Ze(t,r),n="crosshair";i.clickableOrdinalRange?n="pointer":i.region&&(n=i.region+"-resize"),gv.select(document.body).style("cursor",n)}function pfr(e){e.on("mousemove",function(t){gv.event.preventDefault(),t.parent.inBrushDrag||YZe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||jZe()}).call(gv.behavior.drag().on("dragstart",function(t){hfr(this,t)}).on("drag",function(t){WZe(this,t)}).on("dragend",function(t){dfr(this,t)}))}function XZe(e,t){return e[0]-t[0]}function vfr(e,t,r){var i=r._context.staticPlot,n=e.selectAll(".background").data(KR);n.enter().append("rect").classed("background",!0).call(lfr).call(ufr).style("pointer-events",i?"none":"auto").attr("transform",afr(0,Bl.verticalPadding)),n.call(pfr).attr("height",function(s){return s.height-Bl.verticalPadding});var a=e.selectAll(".highlight-shadow").data(KR);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Bl.bar.width/2).attr("stroke-width",Bl.bar.width+Bl.bar.strokeWidth).attr("stroke",t).attr("opacity",Bl.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(ite);var o=e.selectAll(".highlight").data(KR);o.enter().append("line").classed("highlight",!0).attr("x",-Bl.bar.width/2).attr("stroke-width",Bl.bar.width-Bl.bar.strokeWidth).attr("stroke",Bl.bar.fillColor).attr("opacity",Bl.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(ite)}function gfr(e,t,r){var i=e.selectAll("."+Bl.cn.axisBrush).data(KR,nfr);i.enter().append("g").classed(Bl.cn.axisBrush,!0),vfr(i,t,r)}function mfr(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function rte(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function yfr(e){return function(r){var i=r.brush,n=mfr(i),a=n.slice();i.filter.set(a),e()}}function ZZe(e){for(var t=e.slice(),r=[],i,n=t.shift();n;){for(i=n.slice();(n=t.shift())&&n[0]<=i[1];)i[1]=Math.max(i[1],n[1]);r.push(i)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function xfr(){var e=[],t,r;return{set:function(i){e=i.map(function(n){return n.slice().sort(tT)}).sort(XZe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=ZZe(e),r=e.reduce(function(n,a){return[Math.min(n[0],a[0]),Math.max(n[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function _fr(e,t,r,i,n,a){var o=xfr();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:yfr(n),brushEndCallback:a}}}function bfr(e,t){if(Array.isArray(e[0])?(e=e.map(function(i){return i.sort(tT)}),t.multiselect?e=ZZe(e.sort(XZe)):e=[e[0]]):e=[e.sort(tT)],t.tickvals){var r=t.tickvals.slice().sort(tT);if(e=e.map(function(i){var n=[QR(0,r,i[0],[]),QR(1,r,i[1],[])];if(n[1]>n[0])return n}).filter(function(i){return i}),!e.length)return}return e.length>1?e:e[0]}KZe.exports={makeBrush:_fr,ensureAxisBrush:gfr,cleanRanges:bfr}});var eKe=W((iXr,QZe)=>{"use strict";var N2=it(),wfr=bc().hasColorscale,Tfr=Fu(),Afr=us().defaults,Mfr=Xc(),Sfr=ji(),JZe=tte(),Efr=nte(),ate=HE().maxDimensionCount,kfr=GR();function Cfr(e,t,r,i,n){var a=n("line.color",r);if(wfr(e,"line")&&N2.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),Tfr(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function Dfr(e,t,r,i){function n(u,c){return N2.coerce(e,t,JZe.dimensions,u,c)}var a=n("values"),o=n("visible");if(a&&a.length||(o=t.visible=!1),o){n("label"),n("tickvals"),n("ticktext"),n("tickformat");var s=n("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},Sfr.setConvert(t._ax,i.layout),n("multiselect");var l=n("constraintrange");l&&(t.constraintrange=Efr.cleanRanges(l,t))}}QZe.exports=function(t,r,i,n){function a(c,f){return N2.coerce(t,r,JZe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>ate&&(N2.log("parcoords traces support up to "+ate+" dimensions at the moment"),o.splice(ate));var s=Mfr(t,r,{name:"dimensions",layout:n,handleItemDefaults:Dfr}),l=Cfr(t,r,i,n,a);Afr(r,n,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),kfr(r,s,"values",l);var u=N2.extendFlat({},n.font,{size:Math.round(n.font.size/1.2)});N2.coerceFont(a,"labelfont",u),N2.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),N2.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var rKe=W((nXr,tKe)=>{"use strict";var Ffr=it().isArrayOrTypedArray,ote=Jo(),Lfr=G1().wrap;tKe.exports=function(t,r){var i,n;return ote.hasColorscale(r,"line")&&Ffr(r.line.color)?(i=r.line.color,n=ote.extractOpts(r.line).colorscale,ote.calc(t,r,{vals:i,containerStr:"line",cLetter:"c"})):(i=Pfr(r._length),n=[[0,r.line.color],[1,r.line.color]]),Lfr({lineColor:i,cscale:n})};function Pfr(e){for(var t=new Array(e),r=0;r{"use strict";var Ifr=it().isTypedArray;ez.convertTypedArray=function(e){return Ifr(e)?Array.prototype.slice.call(e):e};ez.isOrdinal=function(e){return!!e.tickvals};ez.isVisible=function(e){return e.visible||!("visible"in e)}});var hKe=W((oXr,fKe)=>{"use strict";var Rfr=["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(` `),zfr=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),jE=HE().maxDimensionCount,lKe=it(),iKe=1e-6,tz=2048,Bfr=new Uint8Array(4),nKe=new Uint8Array(4),aKe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function qfr(e){e.read({x:0,y:0,width:1,height:1,data:Bfr})}function uKe(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 Ofr(e,t,r,i,n,a){var o=a.key;function s(l){var u=Math.min(i,n-l*i);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],uKe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*i,t(a),l*i+u>>8*t)%256/255}function Vfr(e,t,r){for(var i=new Array(e*(jE+4)),n=0,a=0;aP&&(P=A[C].dim1.canvasX,D=C);S===0&&uKe(n,0,0,u.canvasWidth,u.canvasHeight);var R=b(r);for(C=0;C{"use strict";var oc=vi(),mm=it(),ute=mm.isArrayOrTypedArray,yKe=mm.numberFormat,xKe=ni(),_Ke=ji(),Wfr=mm.strRotate,H1=mm.strTranslate,Yfr=uo(),rz=Ji(),dKe=Jo(),hte=G1(),Vd=hte.keyFun,j1=hte.repeat,bKe=hte.unwrap,rT=ste(),Ra=HE(),wKe=nte(),Xfr=hKe();function pKe(e,t,r){return mm.aggNums(e,null,t,r)}function TKe(e,t){return dte(pKe(Math.min,e,t),pKe(Math.max,e,t))}function iz(e){var t=e.range;return t?dte(t[0],t[1]):TKe(e.values,e._length)}function dte(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 Zfr(e,t){return t?function(r,i){var n=t[i];return n==null?e(r):n}:e}function Kfr(e,t,r,i,n){var a=iz(r);return i?oc.scale.ordinal().domain(i.map(Zfr(yKe(r.tickformat),n))).range(i.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):oc.scale.linear().domain(a).range([e-t,t])}function Jfr(e,t){return oc.scale.linear().range([t,e-t])}function Qfr(e,t){return oc.scale.linear().domain(iz(e)).range([t,1-t])}function ehr(e){if(e.tickvals){var t=iz(e);return oc.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function thr(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){let[o,s,l]=xKe.rgbaArray(a[1]);return oc.rgb(o,s,l)}),i=function(a){return function(o){return o[a]}},n="rgb".split("").map(function(a){return oc.scale.linear().clamp(!0).domain(t).range(r.map(i(a)))});return function(a){return n.map(function(o){return o(a)})}}function fte(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function rhr(e,t,r){var i=bKe(t),n=i.trace,a=rT.convertTypedArray(i.lineColor),o=n.line,s={color:xKe.normalize(n.unselected.line.color),opacity:n.unselected.line.opacity},l=dKe.extractOpts(o),u=l.reversescale?dKe.flipScale(i.cscale):i.cscale,c=n.domain,f=n.dimensions,h=e.width,d=n.labelangle,p=n.labelside,v=n.labelfont,m=n.tickfont,g=n.rangefont,w=mm.extendDeepNoArrays({},o,{color:a.map(oc.scale.linear().domain(iz({values:a,range:[l.min,l.max],_length:n._length}))),blockLineCount:Ra.blockLineCount,canvasOverdrag:Ra.overdrag*Ra.canvasPixelRatio}),b=Math.floor(h*(c.x[1]-c.x[0])),_=Math.floor(e.height*(c.y[1]-c.y[0])),M=e.margin||{l:80,r:80,t:100,b:80},x=b,T=_;return{key:r,colCount:f.filter(rT.isVisible).length,dimensions:f,tickDistance:Ra.tickDistance,unitToColor:thr(u),lines:w,deselectedLines:s,labelAngle:d,labelSide:p,labelFont:v,tickFont:m,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:M,canvasWidth:x*Ra.canvasPixelRatio+2*w.canvasOverdrag,canvasHeight:T*Ra.canvasPixelRatio,width:x,height:T,canvasPixelRatio:Ra.canvasPixelRatio}}function ihr(e,t,r){var i=r.width,n=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return i*h/Math.max(1,r.colCount-1)},l=Ra.verticalPadding/n,u=Jfr(n,Ra.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(rT.isVisible).map(function(h,d){var p=Qfr(h,l),v=f[h.label];f[h.label]=(v||0)+1;var m=h.label+(v?"__"+v:""),g=h.constraintrange,w=g&&g.length;w&&!ute(g[0])&&(g=[g]);var b=w?g.map(function(k){return k.map(p)}):[[-1/0,1/0]],_=function(){var k=c;k.focusLayer&&k.focusLayer.render(k.panels,!0);var D=fte(k);!e.contextShown()&&D?(k.contextLayer&&k.contextLayer.render(k.panels,!0),e.contextShown(!0)):e.contextShown()&&!D&&(k.contextLayer&&k.contextLayer.render(k.panels,!0,!0),e.contextShown(!1))},M=h.values;M.length>h._length&&(M=M.slice(0,h._length));var x=h.tickvals,T;function A(k,D){return{val:k,text:T[D]}}function y(k,D){return k.val-D.val}if(ute(x)&&x.length){mm.isTypedArray(x)&&(x=Array.from(x)),T=h.ticktext,!ute(T)||!T.length?T=x.map(yKe(h.tickformat)):T.length>x.length?T=T.slice(0,x.length):x.length>T.length&&(x=x.slice(0,T.length));for(var E=1;E=D||L>=F)return;var I=C.lineLayer.readPixel(R,F-1-L),B=I[3]!==0,O=B?I[2]+256*(I[1]+256*I[0]):null,$={x:R,y:L,clientX:k.clientX,clientY:k.clientY,dataIndex:C.model.key,curveNumber:O};O!==p&&(B?n.hover($):n.unhover&&n.unhover($),p=O)}}),d.style("opacity",function(C){return C.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var m=s.selectAll("."+Ra.cn.parcoords).data(h,Vd);m.exit().remove(),m.enter().append("g").classed(Ra.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),m.attr("transform",function(C){return H1(C.model.translateX,C.model.translateY)});var g=m.selectAll("."+Ra.cn.parcoordsControlView).data(j1,Vd);g.enter().append("g").classed(Ra.cn.parcoordsControlView,!0),g.attr("transform",function(C){return H1(C.model.pad.l,C.model.pad.t)});var w=g.selectAll("."+Ra.cn.yAxis).data(function(C){return C.dimensions},Vd);w.enter().append("g").classed(Ra.cn.yAxis,!0),g.each(function(C){cte(w,C,u)}),d.each(function(C){if(C.viewModel){!C.lineLayer||n?C.lineLayer=Xfr(this,C):C.lineLayer.update(C),(C.key||C.key===0)&&(C.viewModel[C.key]=C.lineLayer);var k=!C.context||n;C.lineLayer.render(C.viewModel.panels,k)}}),w.attr("transform",function(C){return H1(C.xScale(C.xIndex),0)}),w.call(oc.behavior.drag().origin(function(C){return C}).on("drag",function(C){var k=C.parent;f.linePickActive(!1),C.x=Math.max(-Ra.overdrag,Math.min(C.model.width+Ra.overdrag,oc.event.x)),C.canvasX=C.x*C.model.canvasPixelRatio,w.sort(function(D,F){return D.x-F.x}).each(function(D,F){D.xIndex=F,D.x=C===D?D.x:D.xScale(D.xIndex),D.canvasX=D.x*D.model.canvasPixelRatio}),cte(w,k,u),w.filter(function(D){return Math.abs(C.xIndex-D.xIndex)!==0}).attr("transform",function(D){return H1(D.xScale(D.xIndex),0)}),oc.select(this).attr("transform",H1(C.x,0)),w.each(function(D,F,P){P===C.parent.key&&(k.dimensions[F]=D)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!fte(k)),k.focusLayer.render&&k.focusLayer.render(k.panels)}).on("dragend",function(C){var k=C.parent;C.x=C.xScale(C.xIndex),C.canvasX=C.x*C.model.canvasPixelRatio,cte(w,k,u),oc.select(this).attr("transform",function(D){return H1(D.x,0)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!fte(k)),k.focusLayer&&k.focusLayer.render(k.panels),k.pickLayer&&k.pickLayer.render(k.panels,!0),f.linePickActive(!0),n&&n.axesMoved&&n.axesMoved(k.key,k.dimensions.map(function(D){return D.crossfilterDimensionIndex}))})),w.exit().remove();var b=w.selectAll("."+Ra.cn.axisOverlays).data(j1,Vd);b.enter().append("g").classed(Ra.cn.axisOverlays,!0),b.selectAll("."+Ra.cn.axis).remove();var _=b.selectAll("."+Ra.cn.axis).data(j1,Vd);_.enter().append("g").classed(Ra.cn.axis,!0),_.each(function(C){var k=C.model.height/C.model.tickDistance,D=C.domainScale,F=D.domain();oc.select(this).call(oc.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(k,C.tickFormat).tickValues(C.ordinal?F:null).tickFormat(function(P){return rT.isOrdinal(C)?P:AKe(C.model.dimensions[C.visibleIndex],P)}).scale(D)),rz.font(_.selectAll("text"),C.model.tickFont)}),_.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),_.selectAll("text").style("cursor","default");var M=b.selectAll("."+Ra.cn.axisHeading).data(j1,Vd);M.enter().append("g").classed(Ra.cn.axisHeading,!0);var x=M.selectAll("."+Ra.cn.axisTitle).data(j1,Vd);x.enter().append("text").classed(Ra.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(C){return C.label}).each(function(C){var k=oc.select(this);rz.font(k,C.model.labelFont),Yfr.convertToTspans(k,t)}).attr("transform",function(C){var k=gKe(C.model.labelAngle,C.model.labelSide),D=Ra.axisTitleOffset;return(k.dir>0?"":H1(0,2*D+C.model.height))+Wfr(k.degrees)+H1(-D*k.dx,-D*k.dy)}).attr("text-anchor",function(C){var k=gKe(C.model.labelAngle,C.model.labelSide),D=Math.abs(k.dx),F=Math.abs(k.dy);return 2*D>F?k.dir*k.dx<0?"start":"end":"middle"});var T=b.selectAll("."+Ra.cn.axisExtent).data(j1,Vd);T.enter().append("g").classed(Ra.cn.axisExtent,!0);var A=T.selectAll("."+Ra.cn.axisExtentTop).data(j1,Vd);A.enter().append("g").classed(Ra.cn.axisExtentTop,!0),A.attr("transform",H1(0,-Ra.axisExtentOffset));var y=A.selectAll("."+Ra.cn.axisExtentTopText).data(j1,Vd);y.enter().append("text").classed(Ra.cn.axisExtentTopText,!0).call(vKe),y.text(function(C){return mKe(C,!0)}).each(function(C){rz.font(oc.select(this),C.model.rangeFont)});var E=T.selectAll("."+Ra.cn.axisExtentBottom).data(j1,Vd);E.enter().append("g").classed(Ra.cn.axisExtentBottom,!0),E.attr("transform",function(C){return H1(0,C.model.height+Ra.axisExtentOffset)});var S=E.selectAll("."+Ra.cn.axisExtentBottomText).data(j1,Vd);S.enter().append("text").classed(Ra.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(vKe),S.text(function(C){return mKe(C,!1)}).each(function(C){rz.font(oc.select(this),C.model.rangeFont)}),wKe.ensureAxisBrush(b,c,t)}});var vte=W((pte,DKe)=>{"use strict";var ohr=SKe(),shr=UR(),EKe=ste().isVisible,CKe={};function kKe(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return n===-1&&(n+=t.length),n}function lhr(e,t){return function(i,n){return kKe(e,t,i)-kKe(e,t,n)}}var pte=DKe.exports=function(t,r){var i=t._fullLayout,n=shr(t,[],CKe);if(n){var a={},o={},s={},l=i._size;r.forEach(function(d,p){var v=d[0].trace,m=s[p]=v.index;a[p]=t.data[m].dimensions,o[p]=t.data[m].dimensions.slice()});var u=function(d,p,v){var m=o[d][p],g=v.map(function(T){return T.slice()}),w="dimensions["+p+"].constraintrange",b=i._tracePreGUI[t._fullData[s[d]].uid];if(b[w]===void 0){var _=m.constraintrange;b[w]=_||null}var M=t._fullData[s[d]].dimensions[p];g.length?(g.length===1&&(g=g[0]),m.constraintrange=g,M.constraintrange=g.slice(),g=[g]):(delete m.constraintrange,delete M.constraintrange,g=null);var x={};x[w]=g,t.emit("plotly_restyle",[x,[s[d]]])},c=function(d){t.emit("plotly_hover",d)},f=function(d){t.emit("plotly_unhover",d)},h=function(d,p){var v=lhr(p,o[d].filter(EKe));a[d].sort(v),o[d].filter(function(m){return!EKe(m)}).sort(function(m){return o[d].indexOf(m)}).forEach(function(m){a[d].splice(a[d].indexOf(m),1),a[d].splice(o[d].indexOf(m),0,m)}),t.emit("plotly_restyle",[{dimensions:[a[d]]},[s[d]]])};ohr(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:h})}};pte.reglPrecompiled=CKe});var LKe=W($E=>{"use strict";var FKe=vi(),uhr=_c().getModuleCalcData,chr=vte(),fhr=sd();$E.name="parcoords";$E.plot=function(e){var t=uhr(e.calcdata,"parcoords")[0];t.length&&chr(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 t=e._fullLayout._glimages,r=FKe.select(e).selectAll(".svg-container"),i=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:fhr.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}i.each(n),window.setTimeout(function(){FKe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var IKe=W((uXr,PKe)=>{"use strict";PKe.exports={attributes:tte(),supplyDefaults:eKe(),calc:rKe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:LKe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var BKe=W((cXr,zKe)=>{"use strict";var RKe=IKe();RKe.plot=vte();zKe.exports=RKe});var OKe=W((fXr,qKe)=>{"use strict";qKe.exports=BKe()});var gte=W((hXr,HKe)=>{"use strict";var UKe=tn().extendFlat,hhr=Wa(),NKe=Ho(),dhr=Eo(),{hovertemplateAttrs:VKe,templatefallbackAttrs:GKe}=Ga(),phr=us().attributes,vhr=UKe({editType:"calc"},dhr("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:VKe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:GKe({editType:"plot"})});HKe.exports={domain:phr({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:UKe({},hhr.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:VKe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:GKe({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:NKe({editType:"calc"}),tickfont:NKe({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:vhr,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 WKe=W((dXr,$Ke)=>{"use strict";var iT=it(),ghr=bc().hasColorscale,mhr=Fu(),yhr=us().defaults,xhr=Xc(),jKe=gte(),_hr=GR(),bhr=yc().isTypedArraySpec;function whr(e,t,r,i,n){n("line.shape"),n("line.hovertemplate"),n("line.hovertemplatefallback");var a=n("line.color",i.colorway[0]);if(ghr(e,"line")&&iT.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),mhr(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function Thr(e,t){function r(u,c){return iT.coerce(e,t,jKe.dimensions,u,c)}var i=r("values"),n=r("visible");if(i&&i.length||(n=t.visible=!1),n){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=iT.isArrayOrTypedArray(a)&&a.length>0||bhr(a),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")}}$Ke.exports=function(t,r,i,n){function a(u,c){return iT.coerce(t,r,jKe,u,c)}var o=xhr(t,r,{name:"dimensions",handleItemDefaults:Thr}),s=whr(t,r,i,n,a);yhr(r,n,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),_hr(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=n.font;iT.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),iT.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var XKe=W((pXr,YKe)=>{"use strict";var Ahr=G1().wrap,Mhr=bc().hasColorscale,Shr=Zc(),Ehr=mV(),khr=Ji(),WE=it(),Chr=sn();YKe.exports=function(t,r){var i=WE.filterVisible(r.dimensions);if(i.length===0)return[];var n=i.map(function(y){var E;if(y.categoryorder==="trace")E=null;else if(y.categoryorder==="array")E=y.categoryarray;else{E=Ehr(y.values);for(var S=!0,C=0;C=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var nJe=W((vXr,iJe)=>{"use strict";var za=vi(),Nhr=(db(),Go(hb)).interpolateNumber,Uhr=rF(),mte=ni(),ZE=Ds(),U2=it(),YE=U2.strTranslate,ZKe=Ji(),Vhr=uo();function Ghr(e,t,r,i){var n=t._context.staticPlot,a=e.map(a0r.bind(0,t,r)),o=i.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",n?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,ym),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(w){return YE(w.x,w.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(w){return w.paths},ym);c.attr("fill",function(w){return w.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(w){return w.model.color}).attr("fill-opacity",0);_te(f),c.attr("d",function(w){return w.svgD}),f.empty()||c.sort(yte),c.exit().remove(),c.on("mouseover",jhr).on("mouseout",$hr).on("click",Whr),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(w){return w.dimensions},ym);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(w){return YE(w.x,0)}),d.exit().remove();var p=d.selectAll("g.category").data(function(w){return w.categories},ym),v=p.enter().append("g").attr("class","category");p.attr("transform",function(w){return YE(0,w.y)}),v.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),JKe(v);var m=p.selectAll("rect.bandrect").data(function(w){return w.bands},ym);m.each(function(){U2.raiseToTop(this)}),m.attr("fill",function(w){return w.color});var g=m.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(w){return w.color}).attr("fill-opacity",0);m.attr("fill",function(w){return w.color}).attr("width",function(w){return w.width}).attr("height",function(w){return w.height}).attr("y",function(w){return w.y}).attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":w.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),wte(g),m.exit().remove(),v.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(w){return XE(w)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(w){return XE(w)?w.width+5:-5}).attr("y",function(w){return w.height/2}).text(function(w){return w.model.categoryLabel}).each(function(w){ZKe.font(za.select(this),w.parcatsViewModel.categorylabelfont),Vhr.convertToTspans(za.select(this),t)}),v.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(w){return w.width/2}).attr("y",-5).text(function(w,b){return b===0?w.parcatsViewModel.model.dimensions[w.model.dimensionInd].dimensionLabel:null}).each(function(w){ZKe.font(za.select(this),w.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",e0r).on("mouseout",t0r),p.exit().remove(),d.call(za.behavior.drag().origin(function(w){return{x:w.x,y:0}}).on("dragstart",r0r).on("drag",i0r).on("dragend",n0r)),s.each(function(w){w.traceSelection=za.select(this),w.pathSelection=za.select(this).selectAll("g.paths").selectAll("path.path"),w.dimensionSelection=za.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}iJe.exports=function(e,t,r,i){Ghr(r,e,i,t)};function ym(e){return e.key}function XE(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function yte(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColorn)return 1;if(i!==n){var a=isNaN(i),o=isNaN(n);if(a!==o)return a?1:-1}}return e.length-t.length}function jhr(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){U2.raiseToTop(this),bte(za.select(this));var t=KE(e),r=xte(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:za.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var i=za.mouse(this)[0],n=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=n._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),x=za.mouse(n)[0];ZE.loneHover({trace:a,x:p-s.left+l.left,y:v-s.top+l.top,text:M,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:m,idealAlign:xmte.mostReadable(t.model.color)).attr("stroke-width",.3)}function Yhr(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function JKe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Xhr(e){e.attr("stroke","black").attr("stroke-width",1.5)}function wte(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function nz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(n){return n.model.categoryInds[r]===i&&n.model.color===e.color})}function Zhr(e){var t=za.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var i=nz(r);bte(i),i.each(function(){U2.raiseToTop(this)})}),Yhr(za.select(e.parentNode))}function Khr(e){var t=za.select(e).datum(),r=nz(t);bte(r),r.each(function(){U2.raiseToTop(this)}),za.select(e.parentNode).selectAll("rect.bandrect").filter(function(i){return i.color===t.color}).each(function(){U2.raiseToTop(this),Xhr(za.select(this))})}function Tte(e,t,r){var i=za.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=za.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=nz(u);c.each(function(f){Array.prototype.push.apply(s,KE(f))})});var l={};l[n.dimensionInd]=n.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function Ate(e,t,r){var i=za.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=nz(i),s=[];o.each(function(u){Array.prototype.push.apply(s,KE(u))});var l={};l[n.dimensionInd]=n.categoryValue,i.rawColor!==void 0&&(l.color=i.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function QKe(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=za.select(r.parentNode).select("rect.catrect"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var p=s.model.count,v=s.model.categoryLabel,m=p/s.parcatsViewModel.model.count,g={countLabel:p,categoryLabel:v,probabilityLabel:m.toFixed(3)},w=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&w.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&w.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var b=w.join("
");return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:p,category:v,probability:m}]}}function Jhr(e,t,r){var i=[];return za.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var n=this;i.push(QKe(e,t,n))}),i}function Qhr(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=za.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var p=s.model.categoryLabel,v=o.parcatsViewModel.model.count,m=0;o.categoryViewModel.bands.forEach(function(E){E.color===o.color&&(m+=E.count)});var g=s.model.count,w=0;l.pathSelection.each(function(E){E.model.color===o.color&&(w+=E.model.count)});var b=m/v,_=m/w,M=m/g,x={countLabel:m,categoryLabel:p,probabilityLabel:b.toFixed(3)},T=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&T.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(T.push("P(color \u2229 "+p+"): "+x.probabilityLabel),T.push("P("+p+" | color): "+_.toFixed(3)),T.push("P(color | "+p+"): "+M.toFixed(3)));var A=T.join("
"),y=mte.mostReadable(o.color);return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:A,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:y,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:p,count:v,probability:b,categorycount:g,colorcount:w,bandcolorcount:m}]}}function e0r(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=za.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,i=r._fullLayout,n=i._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(Khr(o),Ate(o,"plotly_hover",za.event)):(Zhr(o),Tte(o,"plotly_hover",za.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=QKe(r,n,o):a==="color"?s=Qhr(r,n,o):a==="dimension"&&(s=Jhr(r,n,o)),s&&ZE.loneHover(s,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}}function t0r(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(_te(t.pathSelection),JKe(t.dimensionSelection.selectAll("g.category")),wte(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),ZE.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(yte),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,i=this;r==="color"?Ate(i,"plotly_unhover",za.event):Tte(i,"plotly_unhover",za.event)}}function r0r(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,za.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=za.mouse(this)[0],i=za.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(n){return n.displayInd}),t.model.dragY=t.y,U2.raiseToTop(this.parentNode),za.select(this.parentNode).selectAll("rect.bandrect").each(function(n){n.yc.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){n.model.dragX=za.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];f!==void 0&&n.model.dragXh.x&&(n.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=n.model.displayInd}Ste(e.parcatsViewModel),Mte(e.parcatsViewModel),rJe(e.parcatsViewModel),tJe(e.parcatsViewModel)}}function n0r(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){za.select(this).selectAll("text").attr("font-weight","normal");var t={},r=eJe(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),n=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==i[d]});n&&i.forEach(function(h,d){var p=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+p+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.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"?Ate(e.potentialClickBand,"plotly_click",za.event.sourceEvent):Tte(e.potentialClickBand,"plotly_click",za.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,Ste(e.parcatsViewModel),Mte(e.parcatsViewModel);var f=za.transition().duration(300).ease("cubic-in-out");f.each(function(){rJe(e.parcatsViewModel,!0),tJe(e.parcatsViewModel,!0)}).each("end",function(){(n||a)&&Uhr.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function eJe(e){for(var t,r=e.graphDiv._fullData,i=0;i=0;l--)u+="C"+o[l]+","+(t[l+1]+i)+" "+a[l]+","+(t[l]+i)+" "+(e[l]+r[l])+","+(t[l]+i),u+="l-"+r[l]+",0 ";return u+="Z",u}function Mte(e){var t=e.dimensions,r=e.model,i=t.map(function(k){return k.categories.map(function(D){return D.y})}),n=e.model.dimensions.map(function(k){return k.categories.map(function(D){return D.displayInd})}),a=e.model.dimensions.map(function(k){return k.displayInd}),o=e.dimensions.map(function(k){return k.model.dimensionInd}),s=t.map(function(k){return k.x}),l=t.map(function(k){return k.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(k){var D=k.categoryInds.map(function(P,R){return n[R][P]}),F=o.map(function(P){return D[P]});return F}u.sort(function(k,D){var F=f(k),P=f(D);return e.sortpaths==="backward"&&(F.reverse(),P.reverse()),F.push(k.valueInds[0]),P.push(D.valueInds[0]),e.bundlecolors&&(F.unshift(k.rawColor),P.unshift(D.rawColor)),Hhr(F,P)});for(var h=new Array(u.length),d=t[0].model.count,p=t[0].categories.map(function(k){return k.height}).reduce(function(k,D){return k+D}),v=0;v0?g=p*(m.count/d):g=0;for(var w=new Array(i.length),b=0;b1?o=(e.width-2*r-i)/(n-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,p=e.height-h*(c-1),v,m,g,w,b,_=(c-f)*h/2,M=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(M.sort(function(x,T){return x.displayInd-T.displayInd}),b=0;b0?v=m.count/d*p:v=0,g={key:m.valueInds[0],model:m,width:i,height:v,y:m.dragY!==null?m.dragY:_,bands:[],parcatsViewModel:e},_=_+v+h,u.push(g);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:i,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var Ete=W((gXr,aJe)=>{"use strict";var s0r=nJe();aJe.exports=function(t,r,i,n){var a=t._fullLayout,o=a._paper,s=a._size;s0r(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}});var sJe=W(az=>{"use strict";var l0r=_c().getModuleCalcData,u0r=Ete(),oJe="parcats";az.name=oJe;az.plot=function(e,t,r,i){var n=l0r(e.calcdata,oJe);if(n.length){var a=n[0];u0r(e,a,r,i)}};az.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()}});var uJe=W((yXr,lJe)=>{"use strict";lJe.exports={attributes:gte(),supplyDefaults:WKe(),calc:XKe(),plot:Ete(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:sJe(),categories:["noOpacity"],meta:{}}});var fJe=W((xXr,cJe)=>{"use strict";cJe.exports=uJe()});var dJe=W((_Xr,hJe)=>{"use strict";hJe.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} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} {name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var vJe=W((bXr,pJe)=>{"use strict";pJe.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 V2=W((wXr,_Je)=>{"use strict";var c0r=(qx(),Go(Bx)).default,f0r=dJe(),h0r=vJe(),d0r='\xA9 OpenStreetMap contributors',gJe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",mJe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",oz="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",p0r="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",v0r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",g0r="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",xJe={basic:oz,streets:oz,outdoors:oz,light:gJe,dark:mJe,satellite:h0r,"satellite-streets":f0r,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:d0r,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":gJe,"carto-darkmatter":mJe,"carto-voyager":oz,"carto-positron-nolabels":p0r,"carto-darkmatter-nolabels":v0r,"carto-voyager-nolabels":g0r},yJe=c0r(xJe);_Je.exports={styleValueDflt:"basic",stylesMap:xJe,styleValuesMap:yJe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",yJe.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var JE=W((TXr,MJe)=>{"use strict";var bJe=it(),wJe=ni().defaultLine,m0r=us().attributes,y0r=Ho(),x0r=Ns().textposition,_0r=ls().overrideAll,b0r=Da().templatedArray,TJe=V2(),AJe=y0r({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});AJe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var w0r=MJe.exports=_0r({_arrayAttrRegexps:[bJe.counterRegex("map",".layers",!0)],domain:m0r({name:"map"}),style:{valType:"any",values:TJe.styleValuesMap,dflt:TJe.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:b0r("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:wJe},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:wJe}},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:AJe,textposition:bJe.extendFlat({},x0r,{arrayOk:!1})}})},"plot","from-root");w0r.uirevision={valType:"any",editType:"none"}});var sz=W((AXr,CJe)=>{"use strict";var{hovertemplateAttrs:T0r,texttemplateAttrs:A0r,templatefallbackAttrs:SJe}=Ga(),M0r=g1(),QE=I4(),nT=Ns(),EJe=JE(),S0r=Wa(),E0r=Eo(),Lb=tn().extendFlat,k0r=ls().overrideAll,C0r=JE(),kJe=QE.line,aT=QE.marker;CJe.exports=k0r({lon:QE.lon,lat:QE.lat,cluster:{enabled:{valType:"boolean"},maxzoom:Lb({},C0r.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:Lb({},aT.opacity,{dflt:1})},mode:Lb({},nT.mode,{dflt:"markers"}),text:Lb({},nT.text,{}),texttemplate:A0r({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:SJe({editType:"plot"}),hovertext:Lb({},nT.hovertext,{}),line:{color:kJe.color,width:kJe.width},connectgaps:nT.connectgaps,marker:Lb({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:aT.opacity,size:aT.size,sizeref:aT.sizeref,sizemin:aT.sizemin,sizemode:aT.sizemode},E0r("marker")),fill:QE.fill,fillcolor:M0r(),textfont:EJe.layers.symbol.textfont,textposition:EJe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:nT.selected.marker},unselected:{marker:nT.unselected.marker},hoverinfo:Lb({},S0r.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:T0r(),hovertemplatefallback:SJe()},"calc","nested")});var kte=W((MXr,DJe)=>{"use strict";var D0r=["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"];DJe.exports={isSupportedFont:function(e){return D0r.indexOf(e)!==-1}}});var PJe=W((SXr,LJe)=>{"use strict";var ek=it(),Cte=$o(),F0r=bd(),L0r=jp(),P0r=$p(),I0r=y1(),FJe=sz(),R0r=kte().isSupportedFont;LJe.exports=function(t,r,i,n){function a(g,w){return ek.coerce(t,r,FJe,g,w)}function o(g,w){return ek.coerce2(t,r,FJe,g,w)}var s=z0r(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),Cte.hasMarkers(r)){F0r(t,r,i,n,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(ek.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),ek.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}Cte.hasLines(r)&&(L0r(t,r,i,n,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||i),h=o("cluster.size"),d=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,v=a("cluster.enabled",p);if(v||Cte.hasText(r)){var m=n.font.family;P0r(t,r,n,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:R0r(m)?m:"Open Sans Regular",weight:n.font.weight,style:n.font.style,size:n.font.size,color:n.font.color}})}a("fill"),r.fill!=="none"&&I0r(t,r,i,a),ek.coerceSelectionMarkerOpacity(r,a)};function z0r(e,t,r){var i=r("lon")||[],n=r("lat")||[],a=Math.min(i.length,n.length);return t._length=a,a}});var Dte=W((EXr,RJe)=>{"use strict";var IJe=ji();RJe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=IJe.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=IJe.tickText(o,o.c2l(s[1]),!0).text,n}});var Fte=W((kXr,BJe)=>{"use strict";var zJe=it();BJe.exports=function(t,r){var i=t.split(" "),n=i[0],a=i[1],o=zJe.isArrayOrTypedArray(r)?zJe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(n){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){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 GJe=W((CXr,VJe)=>{"use strict";var NJe=sn(),Lc=it(),B0r=Kn().BADNUM,uz=dE(),qJe=Jo(),q0r=Ji(),O0r=fA(),cz=$o(),N0r=kte().isSupportedFont,U0r=Fte(),V0r=Kf().appendArrayPointValue,G0r=uo().NEWLINES,H0r=uo().BR_TAG_ALL;VJe.exports=function(t,r){var i=r[0].trace,n=i.visible===!0&&i._length!==0,a=i.fill!=="none",o=cz.hasLines(i),s=cz.hasMarkers(i),l=cz.hasText(i),u=s&&i.marker.symbol==="circle",c=s&&i.marker.symbol!=="circle",f=i.cluster&&i.cluster.enabled,h=lz("fill"),d=lz("line"),p=lz("circle"),v=lz("symbol"),m={fill:h,line:d,circle:p,symbol:v};if(!n)return m;var g;if((a||o)&&(g=uz.calcTraceToLineCoords(r)),a&&(h.geojson=uz.makePolygon(g),h.layout.visibility="visible",Lc.extendFlat(h.paint,{"fill-color":i.fillcolor})),o&&(d.geojson=uz.makeLine(g),d.layout.visibility="visible",Lc.extendFlat(d.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),u){var w=j0r(r);p.geojson=w.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],m.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":Pte(i.cluster.color,i.cluster.step),"circle-radius":Pte(i.cluster.size,i.cluster.step),"circle-opacity":Pte(i.cluster.opacity,i.cluster.step)}},m.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":OJe(i),"text-size":12}}),Lc.extendFlat(p.paint,{"circle-color":w.mcc,"circle-radius":w.mrc,"circle-opacity":w.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(v.geojson=$0r(r,t),Lc.extendFlat(v.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(Lc.extendFlat(v.layout,{"icon-size":i.marker.size/10}),"angle"in i.marker&&i.marker.angle!=="auto"&&Lc.extendFlat(v.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),v.layout["icon-allow-overlap"]=i.marker.allowoverlap,Lc.extendFlat(v.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color,"icon-halo-color":i.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var b=(i.marker||{}).size,_=U0r(i.textposition,b);Lc.extendFlat(v.layout,{"text-size":i.textfont.size,"text-anchor":_.anchor,"text-offset":_.offset,"text-font":OJe(i)}),Lc.extendFlat(v.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return m};function lz(e){return{type:e,geojson:uz.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function j0r(e){var t=e[0].trace,r=t.marker,i=t.selectedpoints,n=Lc.isArrayOrTypedArray(r.color),a=Lc.isArrayOrTypedArray(r.size),o=Lc.isArrayOrTypedArray(r.opacity),s;function l(b){return t.opacity*b}function u(b){return b/2}var c;n&&(qJe.hasColorscale(t,"marker")?c=qJe.makeColorScaleFuncFromTrace(r):c=Lc.identity);var f;a&&(f=O0r(t));var h;o&&(h=function(b){var _=NJe(b)?+Lc.constrain(b,0,1):0;return l(_)});var d=[];for(s=0;s850?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"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=n>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"),N0r(s)||(s=r);var l=s.split(", ");return l}});var WJe=W((DXr,$Je)=>{"use strict";var W0r=it(),HJe=GJe(),oT=V2().traceLayerPrefix,Gd={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function jJe(e,t,r,i){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=i,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:oT+t+"-fill",line:oT+t+"-line",circle:oT+t+"-circle",symbol:oT+t+"-symbol",cluster:oT+t+"-cluster",clusterCount:oT+t+"-cluster-count"},this.below=null}var tk=jJe.prototype;tk.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&W0r.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[e]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)};tk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};tk.addLayer=function(e,t,r){var i={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(i.filter=t.filter);for(var n=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;M--){var x=_[M];n.removeLayer(u.layerIds[x])}b||n.removeSource(u.sourceIds.circle)}function h(b){for(var _=Gd.nonCluster,M=0;M<_.length;M++){var x=_[M],T=a[x];b||u.addSource(x,T),u.addLayer(x,T,o)}}function d(b){for(var _=Gd.nonCluster,M=_.length-1;M>=0;M--){var x=_[M];n.removeLayer(u.layerIds[x]),b||n.removeSource(u.sourceIds[x])}}function p(b){l?f(b):d(b)}function v(b){s?c(b):h(b)}function m(){for(var b=s?Gd.cluster:Gd.nonCluster,_=0;_=0;i--){var n=r[i];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}};$Je.exports=function(t,r){var i=r[0].trace,n=i.cluster&&i.cluster.enabled,a=i.visible!==!0,o=new jJe(t,i.uid,n,a),s=HJe(t.gd,r),l=o.below=t.belowLookup["trace-"+i.uid],u,c,f;if(n)for(o.addSource("circle",s.circle,i.cluster),u=0;u{"use strict";var Y0r=Ds(),Ite=it(),X0r=Xw(),Z0r=Ite.fillText,K0r=Kn().BADNUM,J0r=V2().traceLayerPrefix;function Q0r(e,t,r){var i=e.cd,n=i[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=J0r+n.uid+"-circle",c=n.cluster&&n.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(A){return A.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function v(A){var y=A.lonlat;if(y[0]===K0r||c&&l.indexOf(A.i+1)===-1)return 1/0;var E=Ite.modHalf(y[0],360),S=y[1],C=s.project([E,S]),k=C.x-a.c2p([p,S]),D=C.y-o.c2p([E,r]),F=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(k*k+D*D)-F,1-3/F)}if(Y0r.getClosest(i,v,e),e.index!==!1){var m=i[e.index],g=m.lonlat,w=[Ite.modHalf(g[0],360)+d,g[1]],b=a.c2p(w),_=o.c2p(w),M=m.mrc||1;e.x0=b-M,e.x1=b+M,e.y0=_-M,e.y1=_+M;var x={};x[n.subplot]={_subplot:s};var T=n._module.formatLabels(m,n,x);return e.lonLabel=T.lonLabel,e.latLabel=T.latLabel,e.color=X0r(n,m),e.extraText=YJe(n,m,i[0].t.labels),e.hovertemplate=n.hovertemplate,[e]}}function YJe(e,t,r){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,n=i.split("+"),a=n.indexOf("all")!==-1,o=n.indexOf("lon")!==-1,s=n.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||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])),(a||n.indexOf("text")!==-1)&&Z0r(t,e,u),u.join("
")}XJe.exports={hoverPoints:Q0r,getExtraText:YJe}});var KJe=W((LXr,ZJe)=>{"use strict";ZJe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var QJe=W((PXr,JJe)=>{"use strict";var edr=it(),tdr=$o(),{BADNUM:rdr}=Kn(),dz=360,Rte=.001,pz=(e,t,r,i)=>[e.c2p([r,i]),t.c2p([r,i])];function idr(e,t,r,i,n){let a=pz(e,t,r+dz,i),o=pz(e,t,r-dz,i),s=a[0]-n[0],l=a[1]-n[1],u=Math.abs(s-(n[0]-o[0])){if(Math.abs(o)n?null:[Math.floor(i)-1,Math.ceil(n)+1]}JJe.exports=function(t,r){var c;let{cd:i,xaxis:n,yaxis:a}=t,{trace:o}=i[0];if(!tdr.hasMarkers(o))return[];if(r===!1){for(let f of i)f.selected=0;return[]}let s=(c=n._subplot)==null?void 0:c.map,l=!!(s!=null&&s.getRenderWorldCopies())&&r.xmax>r.xmin,u=[];for(let f=0;f=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+l)*h+s)*h}}function nB(){return vz!=null||(vz=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),vz}function fie(){if(gz==null&&(gz=!1,nB())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let r=0;r<25;r++){let i=r*4;e.fillStyle=`rgb(${i},${i+1},${i+2})`,e.fillRect(r%5,Math.floor(r/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&t[r]!==r){gz=!0;break}}}return gz||!1}function hie(){var e=new Nu(9);return Nu!=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 hdr(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*(u*a-o*l)+r*(-u*n+o*s)+i*(l*n-a*s)}function Det(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}function ddr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,d=n*s,p=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[3]=c-g,e[6]=h+m,e[1]=c+g,e[4]=1-u-p,e[7]=d-v,e[2]=h-m,e[5]=d+v,e[8]=1-u-f,e}function Em(){var e=new Nu(16);return Nu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function aB(e){var t=new Nu(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}function Fet(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}function Qd(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 Bk(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,b=r*l-n*o,_=r*u-a*o,M=i*l-n*s,x=i*u-a*s,T=n*u-a*l,A=c*v-f*p,y=c*m-h*p,E=c*g-d*p,S=f*m-h*v,C=f*g-d*v,k=h*g-d*m,D=w*k-b*C+_*S+M*E-x*y+T*A;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*T-m*x+g*M)*D,e[3]=(h*x-f*T-d*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*_-p*T-g*b)*D,e[7]=(c*T-h*_+d*b)*D,e[8]=(o*C-s*E+u*A)*D,e[9]=(i*E-r*C-a*A)*D,e[10]=(p*x-v*_+g*w)*D,e[11]=(f*_-c*x-d*w)*D,e[12]=(s*y-o*S-l*A)*D,e[13]=(r*S-i*y+n*A)*D,e[14]=(v*b-p*M-m*w)*D,e[15]=(c*M-f*b+h*w)*D,e):null}function Yb(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],v=t[12],m=t[13],g=t[14],w=t[15],b=r[0],_=r[1],M=r[2],x=r[3];return e[0]=b*i+_*s+M*f+x*v,e[1]=b*n+_*l+M*h+x*m,e[2]=b*a+_*u+M*d+x*g,e[3]=b*o+_*c+M*p+x*w,b=r[4],_=r[5],M=r[6],x=r[7],e[4]=b*i+_*s+M*f+x*v,e[5]=b*n+_*l+M*h+x*m,e[6]=b*a+_*u+M*d+x*g,e[7]=b*o+_*c+M*p+x*w,b=r[8],_=r[9],M=r[10],x=r[11],e[8]=b*i+_*s+M*f+x*v,e[9]=b*n+_*l+M*h+x*m,e[10]=b*a+_*u+M*d+x*g,e[11]=b*o+_*c+M*p+x*w,b=r[12],_=r[13],M=r[14],x=r[15],e[12]=b*i+_*s+M*f+x*v,e[13]=b*n+_*l+M*h+x*m,e[14]=b*a+_*u+M*d+x*g,e[15]=b*o+_*c+M*p+x*w,e}function eu(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,d,p,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],p=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+p*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+d*n+g*a+t[15]),e}function Rc(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}function Xb(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=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+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}function die(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=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-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}function km(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=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+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}function Let(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}function pdr(e,t,r,i,n){var a=1/Math.tan(t/2);if(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[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0){var o=1/(i-n);e[10]=(n+i)*o,e[14]=2*n*i*o}else e[10]=-1,e[14]=-2*i;return e}function vdr(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=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*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}function Pet(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]}function Iet(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15],w=t[0],b=t[1],_=t[2],M=t[3],x=t[4],T=t[5],A=t[6],y=t[7],E=t[8],S=t[9],C=t[10],k=t[11],D=t[12],F=t[13],P=t[14],R=t[15];return Math.abs(r-w)<=1e-6*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(i-b)<=1e-6*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(n-_)<=1e-6*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(a-M)<=1e-6*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-x)<=1e-6*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(s-T)<=1e-6*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-A)<=1e-6*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-y)<=1e-6*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-E)<=1e-6*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(f-S)<=1e-6*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-C)<=1e-6*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(d-k)<=1e-6*Math.max(1,Math.abs(d),Math.abs(k))&&Math.abs(p-D)<=1e-6*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(v-F)<=1e-6*Math.max(1,Math.abs(v),Math.abs(F))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-R)<=1e-6*Math.max(1,Math.abs(g),Math.abs(R))}function Ret(){var e=new Nu(3);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function sB(e){var t=new Nu(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function K1(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function eQe(e,t,r){var i=new Nu(3);return i[0]=e,i[1]=t,i[2]=r,i}function R0(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function pie(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function Ps(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function qk(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}function zet(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)}function Bet(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Pf(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}function gu(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function uh(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 qet(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}function Oet(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}function lB(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],u=t[2],c=n*u-a*l,f=a*s-i*u,h=i*l-n*s;return c+=c,f+=f,h+=h,e[0]=s+o*c+n*h-a*f,e[1]=l+o*f+a*c-i*h,e[2]=u+o*h+i*f-n*c,e}function PT(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}function Zb(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}function uB(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}function Net(e){return e[0]=0,e[1]=0,e[2]=0,e}function gdr(){var e=new Nu(4);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function mdr(e,t,r,i){var n=new Nu(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function ydr(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}function Uet(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}function xdr(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}function Uu(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 tQe(){var e=new Nu(4);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _dr(e,t,r){r*=.5;var i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function Get(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+o*s+n*u-a*l,e[1]=n*c+o*l+a*s-i*u,e[2]=a*c+o*u+i*l-n*s,e[3]=o*c-i*s-n*l-a*u,e}function vk(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3],l=r[0],u=r[1],c=r[2],f=r[3],h,d=n*l+a*u+o*c+s*f,p,v,m;return d<0&&(d=-d,l=-l,u=-u,c=-c,f=-f),1-d>1e-6?(h=Math.acos(d),p=Math.sin(h),v=Math.sin((1-i)*h)/p,m=Math.sin(i*h)/p):(v=1-i,m=i),e[0]=v*n+m*l,e[1]=v*a+m*u,e[2]=v*o+m*c,e[3]=v*s+m*f,e}function bdr(e,t){var r=t[0]+t[4]+t[8],i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var n=0;t[4]>t[0]&&(n=1),t[8]>t[n*3+n]&&(n=2);var a=(n+1)%3,o=(n+2)%3;i=Math.sqrt(t[n*3+n]-t[a*3+a]-t[o*3+o]+1),e[n]=.5*i,i=.5/i,e[3]=(t[a*3+o]-t[o*3+a])*i,e[a]=(t[a*3+n]+t[n*3+a])*i,e[o]=(t[o*3+n]+t[n*3+o])*i}return e}function cB(e,t,r,i){var n=arguments.length>4&&arguments[4]!==void 0?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),u=Math.cos(r),c=Math.sin(i),f=Math.cos(i);switch(n){case"xyz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"xzy":e[0]=o*u*f-s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f+o*l*c;break;case"yxz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;case"yzx":e[0]=o*u*f+s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f-o*l*c;break;case"zxy":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"zyx":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;default:throw Error("Unknown angle order "+n)}return e}function fB(){var e=new Nu(2);return Nu!=Float32Array&&(e[0]=0,e[1]=0),e}function iQe(e,t){var r=new Nu(2);return r[0]=e,r[1]=t,r}function gie(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function mie(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function wdr(e){var t=e[0],r=e[1];return t*t+r*r}function Tdr(e,t){return e[0]*t[0]+e[1]*t[1]}function yie(e){return e[0]=0,e[1]=0,e}function Zh(e,t,r){return t*(zr/(e.tileSize*2**(r-e.tileID.overscaledZ)))}function Ic(e){return e instanceof Error?e:Error(typeof e=="string"?e:String(e))}function Cm(){return new Float64Array(4)}function Do(){return new Float64Array(3)}function Q2(){return new Float64Array(16)}function Nk(){let e=new Float64Array(16);return Qd(e),e}function xie(){let e=new Float32Array(16);return Qd(e),e}function Dm(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?i==="map"?-e.bearingInRadians:0:i==="viewport"?e.bearingInRadians:0;if(a){let o=Math.sin(a),s=Math.cos(a);r=[r[0]*s-r[1]*o,r[0]*o+r[1]*s]}return[n?r[0]:Zh(t,r[0],e.zoom),n?r[1]:Zh(t,r[1],e.zoom)]}function hB(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}function z0(e,t,r){let i=hdr([e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]]);if(i===0)return null;let n=uh([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),a=uh([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),o=uh([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),s=Ps([],n,-e[3]);return R0(s,s,Ps([],a,-t[3])),R0(s,s,Ps([],o,-r[3])),Ps(s,s,1/i),s}function jet(e,t,r){let i=e[0]*r[0]+e[1]*r[1]+e[2]*r[2],n=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return n===0?null:(-i-r[3])/n}function Uk(e,t,r,i){let n=Math.sqrt(e*e+t*t),a=Math.sqrt(r*r+i*i);e/=n,t/=n,r/=a,i/=a;let o=e*r+t*i,s=Math.acos(o);return-t*r+e*i>0?s:-s}function Kh(e,t){let r=K2(e,360),i=K2(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)l.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let l of e){let{x:u,y:c,z:f}=l.canonical,h=2**(t-f),d=u*h,p=c*h;o.push({id:l,x:d,y:p}),di&&(i=d),pa&&(a=p)}let s=new Set;for(let l of o)(l.x===r||l.x===i||l.y===n||l.y===a)&&s.add(l.id);return s}function Adr(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 dB(e,t,r,i){return fdr(e,t,r,i)}function Jn(e,t,r){return Math.min(r,Math.max(t,e))}function B0(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function ln(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function IT(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r}function _ie(){return Mdr++}function Sdr(e){return Math.log(e)/Math.LN2%1==0}function Yet(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function If(e){return 2**e}function zc(e){return Math.log(e)/Math.LN2}function Jh(e,t,r){if(t<=0)return e;let i=1/t;return r===void 0||Math.abs(r)<1e-10?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i}function vB(e,t,r){let i={};for(let n in e)i[n]=t.call(r||this,e[n],n,e);return i}function bie(e,t,r){let i={};for(let n in e)t.call(r||this,e[n],n,e)&&(i[n]=e[n]);return i}function _v(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r(t.y-e.y)*(r.x-e.x)}function Xet(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(l===0)return null;let u=e.y-r.y,c=e.x-r.x,f=(s*u-o*c)/l;return new tr(e.x+f*a,e.y+f*n)}function Zet([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,[e*Math.cos(t)*Math.sin(r),e*Math.sin(t)*Math.sin(r),e*Math.cos(r)]}function Hb(e){return typeof WorkerGlobalScope<"u"&&e!==void 0&&e instanceof WorkerGlobalScope}function Ket(e){let t=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(i,n,a,o)=>{let s=a||o;return r[n]=!s||s.toLowerCase(),""}),r["max-age"]){let i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}function Jet(e){if(zte==null){let t=e.navigator?e.navigator.userAgent:null;zte=!!e.safari||!!(t&&(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return zte}function ex(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function Edr(e,t,r,i,n){let a=Math.max(-t,0)*4,o=(Math.max(0,r)-r)*i*4+a,s=i*4,l=Math.max(0,t),u=Math.max(0,r),c=Math.min(e.width,t+i),f=Math.min(e.height,r+n);return{rect:{x:l,y:u,width:c-l,height:f-u},layout:[{offset:o,stride:s}]}}function ttt(e,t,r,i,n){return Ki(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o=a==null?void 0:a.format;if(!o||!(o.startsWith("BGR")||o.startsWith("RGB")))throw Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,Edr(e,t,r,i,n)),s)for(let u=0;u{e.removeEventListener(t,r,i)}}}function js(e){return e*Math.PI/180}function yv(e){return e/Math.PI*180}function wie(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing}function rtt(e){let t=new Float64Array(9);ddr(t,e);let r=yv(-Math.asin(Jn(t[2],-1,1))),i,n;return Math.hypot(t[5],t[8])<.001?(i=0,n=-yv(Math.atan2(t[3],t[4]))):(i=yv(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),n=yv(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:i,pitch:r+90,bearing:n}}function Tie(e,t,r){let i=iQe(t.x-r.x,t.y-r.y),n=iQe(e.x-r.x,e.y-r.y),a=i[0]*n[1]-i[1]*n[0];return yv(Math.atan2(a,Tdr(i,n)))}function Aie(e,t,r){let i=new Float64Array(4);return cB(i,e,t-90,r),i}function att(e,t){return itt[t]&&"touches"in e}function ott(e,t){var n,a;if(!ntt[t])return!1;let r=e,i=((a=(n=r==null?void 0:r.target)==null?void 0:n.ownerDocument)==null?void 0:a.defaultView)||window;return r instanceof i.MouseEvent||r instanceof i.WheelEvent}function stt(e){return itt[e]||ntt[e]}function Fm(e){return e instanceof Error&&e.name==="AbortError"}function gB(e){if(e.aborted)throw new RT(e.reason)}function Mie(e){return Qh.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function ltt(e,t){Qh.REGISTERED_PROTOCOLS[e]=t}function utt(e){delete Qh.REGISTERED_PROTOCOLS[e]}function mB(){var e;if(Hb(self))return(e=self.worker)==null?void 0:e.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(t){}return window.location.href}function Cdr(e,t){return Ki(this,null,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:mB(),referrerPolicy:e.referrerPolicy,signal:t.signal});e.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(o){throw Fm(o)?o:new TT(0,Ic(o).message,e.url,new Blob)}if(!i.ok){let o=yield i.blob();throw new TT(i.status,i.statusText,e.url,o)}let n;n=e.type==="arrayBuffer"||e.type==="image"?i.arrayBuffer():e.type==="json"?i.json():i.text();let a=yield n;return gB(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function Ddr(e,t){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(e.method||"GET",e.url,!0),(e.type==="arrayBuffer"||e.type==="image")&&(n.responseType="arraybuffer");for(let o in e.headers)n.setRequestHeader(o,e.headers[o]);e.type==="json"&&(n.responseType="text",(a=e.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=e.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!t.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let o=n.response;if(e.type==="json")try{o=JSON.parse(n.response)}catch(s){i(s);return}r({data:o,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let o=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new TT(n.status,n.statusText,e.url,o))}},t.signal.addEventListener("abort",()=>{n.abort(),i(new RT(t.signal.reason))}),n.send(e.body)})}function Eie(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5),e.startsWith("null")))return!1;if(e.indexOf("://")<=0)return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function oQe(e,t,r){var i;(i=r[e])!=null&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function Bte(e,t,r){if(r!=null&&r[e]){let i=r[e].indexOf(t);i!==-1&&r[e].splice(i,1)}}function Lf(e,t){return{kind:"array",itemType:e,N:t}}function ml(e){if(e.kind==="array"){let t=ml(e.itemType);return typeof e.N=="number"?`array<${t}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${t}>`}return e.kind}function Tk(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Tk(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(let r of Ldr)if(!Tk(r,t))return null}}return`Expected ${ml(e)} but found ${ml(t)} instead.`}function kie(e,t){return t.some(r=>r.kind===e.kind)}function Ub(e,t){return t.some(r=>r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e)}function G2(e,t){return e.kind==="array"&&t.kind==="array"?e.itemType.kind===t.itemType.kind&&typeof e.N=="number":e.kind===t.kind}function mtt(e){return e%=360,e<0&&(e+=360),e}function ytt([e,t,r,i]){e=qte(e),t=qte(t),r=qte(r);let n,a,o=Ote((.2225045*e+.7168786*t+.0606169*r)/1);e===t&&t===r?n=a=o:(n=Ote((.4360747*e+.3850649*t+.1430804*r)/dtt),a=Ote((.0139322*e+.0971045*t+.7141733*r)/ptt));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function qte(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Ote(e){return e>.008856451679035631?e**(1/3):e/gtt+vtt}function xtt([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=1*Ute(n),a=dtt*Ute(a),o=ptt*Ute(o),[Nte(3.1338561*a-1.6168667*n-.4906146*o),Nte(-.9787684*a+1.9161415*n+.033454*o),Nte(.0719453*a-.2289914*n+1.4052427*o),i]}function Nte(e){return e=e<=.00304?12.92*e:1.055*e**(1/2.4)-.055,e<0?0:e>1?1:e}function Ute(e){return e>Qte?e*e*e:gtt*(e-vtt)}function Rdr(e){let[t,r,i,n]=ytt(e),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?mtt(Math.atan2(i,r)*Idr):NaN,a,t,n]}function zdr([e,t,r,i]){return e=isNaN(e)?0:e*Pdr,xtt([r,Math.cos(e)*t,Math.sin(e)*t,i])}function Bdr([e,t,r,i]){e=mtt(e),t/=100,r/=100;function n(a){let o=(a+e/30)%12,s=t*Math.min(r,1-r);return r-s*Math.max(-1,Math.min(o-3,9-o,1))}return[n(0),n(8),n(4),i]}function gk(e,t){return qdr(e,t)?e[t]:void 0}function Odr(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t=gk(Ndr,e);if(t){let[i,n,a]=t;return[i/255,n/255,a/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let i=e.length<6?1:2,n=1;return[mz(e.slice(n,n+=i)),mz(e.slice(n,n+=i)),mz(e.slice(n,n+=i)),mz(e.slice(n,n+i)||"ff")]}if(e.startsWith("rgb")){let i=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){let[n,a,o,s,l,u,c,f,h,d,p,v]=i,m=[s||" ",c||" ",d].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[o,u,h].join(""),w=g==="%%%"?100:g===""?255:0;if(w){let b=[uT(+a/w,0,1),uT(+l/w,0,1),uT(+f/w,0,1),p?sQe(+p,v):1];if(lQe(b))return b}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[i,n,a,o,s,l,u,c,f]=r,h=[a||" ",s||" ",u].join("");if(h===" "||h===" /"||h===",,"||h===",,,"){let d=[+n,uT(+o,0,100),uT(+l,0,100),c?sQe(+c,f):1];if(lQe(d))return Bdr(d)}}}function mz(e){return parseInt(e.padEnd(2,e),16)/255}function sQe(e,t){return uT(t?e/100:e,0,1)}function uT(e,t,r){return Math.min(Math.max(t,e),r)}function lQe(e){return!e.some(Number.isNaN)}function X2(e,t,r){return e+r*(t-e)}function AT(e,t,r){return e.map((i,n)=>X2(i,t[n],r))}function Udr(e){return e==="rgb"||e==="hcl"||e==="lab"}function btt(e,t,r,i){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function MT(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Lm||e instanceof ea||e instanceof Cie||e instanceof Mm||e instanceof Q1||e instanceof eg||e instanceof Xd||e instanceof X1||e instanceof Z1)return!0;if(Array.isArray(e)){for(let t of e)if(!MT(t))return!1;return!0}if(typeof e=="object"){for(let t in e)if(!MT(e[t]))return!1;return!0}return!1}function Ql(e){if(e===null)return $k;if(typeof e=="string")return la;if(typeof e=="boolean")return La;if(typeof e=="number")return Ei;if(e instanceof ea)return xv;if(e instanceof Lm)return yB;if(e instanceof Cie)return xB;if(e instanceof Mm)return Wk;if(e instanceof Q1)return _B;if(e instanceof eg)return bB;if(e instanceof Xd)return wk;if(e instanceof X1)return wB;if(e instanceof Z1)return Yk;if(Array.isArray(e)){let t=e.length,r;for(let i of e){let n=Ql(i);if(!r)r=n;else{if(r===n)continue;r=ha;break}}return Lf(r||ha,t)}return Nb}function mk(e){let t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof ea||e instanceof Lm||e instanceof Mm||e instanceof Q1||e instanceof eg||e instanceof Xd||e instanceof X1||e instanceof Z1?e.toString():JSON.stringify(e)}function TB(e,t,r){let i=e.length-1,n=0,a=i,o=0,s,l;for(;n<=a;)if(o=Math.floor((n+a)/2),s=e[o],l=e[o+1],s<=t){if(o===i||tt)a=o-1;else throw new al("Input is not a number.",r);return 0}function jdr(e,t,r,i){let n=3*e,a=3*(r-e)-n,o=1-n-a,s=3*t,l=3*(i-t)-s,u=1-s-l;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+l)*h+s)*h}}function Vte(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function Ett(e,t,r=0,i=e.length-1,n=$dr){for(;i>r;){if(i-r>600){let l=i-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);Ett(e,t,Math.max(r,Math.floor(t-u*f/l+h)),Math.min(i,Math.floor(t+(l-u)*f/l+h)),n)}let a=e[t],o=r,s=i;for(rk(e,r,t),n(e[i],a)>0&&rk(e,r,i);o0;)s--}n(e[r],a)===0?rk(e,r,s):(s++,rk(e,s,i)),s<=t&&(r=s+1),t<=s&&(i=s-1)}}function rk(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function $dr(e,t){return et)}function AB(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let a of e){let o=Ydr(a);o!==0&&(a.area=Math.abs(o),n===void 0&&(n=o<0),n===o<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),t>1)for(let a=0;ar}function apr(e,t,r){return t<=r}function opr(e,t,r){return t>=r}function Ott(e,t,r,i){return i.compare(t,r)===0}function spr(e,t,r,i){return!Ott(e,t,r,i)}function lpr(e,t,r,i){return i.compare(t,r)<0}function upr(e,t,r,i){return i.compare(t,r)>0}function cpr(e,t,r,i){return i.compare(t,r)<=0}function fpr(e,t,r,i){return i.compare(t,r)>=0}function zT(e,t,r){let i=e!=="=="&&e!=="!=";return class Ntt{constructor(a,o,s,l){this.lhs=a,this.rhs=o,this.key=s,this.collator=l,this.type=La,this.hasUntypedArgument=a.type.kind==="value"||o.type.kind==="value"}static parse(a,o){if(a.length!==3&&a.length!==4)return o.error("Expected two or three arguments.");let s=a[0],l=o.parse(a[1],1,ha);if(!l)return null;if(!cQe(s,l.type))return o.concat(1).error(`"${s}" comparisons are not supported for type '${ml(l.type)}'.`);let u=o.parse(a[2],2,ha);if(!u)return null;if(!cQe(s,u.type))return o.concat(2).error(`"${s}" comparisons are not supported for type '${ml(u.type)}'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error(`Cannot compare types '${ml(l.type)}' and '${ml(u.type)}'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new _m(u.type,[l],o.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new _m(l.type,[u],o.key)));let c=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error("Cannot use collator to compare non-string types.");if(c=o.parse(a[3],3,xB),!c)return null}return new Ntt(l,u,o.key,c)}evaluate(a){let o=this.lhs.evaluate(a),s=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=Ql(o),u=Ql(s);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new al(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=Ql(o),u=Ql(s);if(l.kind!=="string"||u.kind!=="string")return t(a,o,s)}return this.collator?r(a,o,s,this.collator.evaluate(a)):t(a,o,s)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}function bpr(e,t){let r=wpr(e[0]),i=Apr(e[1]),n=2**t.z;return[Math.round(r*n*Y1),Math.round(i*n*Y1)]}function Fie(e,t){let r=2**t.z,i=(e[0]/Y1+t.x)/r,n=(e[1]/Y1+t.y)/r;return[Tpr(i),Mpr(n)]}function wpr(e){return(180+e)/360}function Tpr(e){return e*360-180}function Apr(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Mpr(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function Xk(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 Ak(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Spr(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Epr(e,t,r){let i=e[0]-t[0],n=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return i*o-a*n===0&&i*a<=0&&n*o<=0}function MB(e,t,r,i){let n=[t[0]-e[0],t[1]-e[1]];return Fpr([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(fQe(e,t,r,i)&&fQe(r,i,e,t))}function kpr(e,t,r){for(let i of r)for(let n=0;n0&&f<0||c<0&&f>0}function Lie(e,t,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=e[0]-r[0]>n?-i:r[0]-e[0]>n?i:0;a===0&&(a=e[0]-r[2]>n?-i:r[2]-e[0]>n?i:0),e[0]+=a}Xk(t,e)}function Lpr(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function hQe(e,t,r,i){let n=2**i.z*Y1,a=[i.x*Y1,i.y*Y1],o=[];for(let s of e)for(let l of s){let u=[l.x+a[0],l.y+a[1]];Ytt(u,t,r,n),o.push(u)}return o}function dQe(e,t,r,i){let n=2**i.z*Y1,a=[i.x*Y1,i.y*Y1],o=[];for(let s of e){let l=[];for(let u of s){let c=[u.x+a[0],u.y+a[1]];Xk(t,c),l.push(c)}o.push(l)}if(t[2]-t[0]<=n/2){Lpr(t);for(let s of o)for(let l of s)Ytt(l,t,r,n)}return o}function Ppr(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(t.type==="Polygon"){let a=Lie(t.coordinates,i,n),o=hQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!BT(s,a))return!1}if(t.type==="MultiPolygon"){let a=Wtt(t.coordinates,i,n),o=hQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!Cpr(s,a))return!1}return!0}function Ipr(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(t.type==="Polygon"){let a=Lie(t.coordinates,i,n),o=dQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!$tt(s,a))return!1}if(t.type==="MultiPolygon"){let a=Wtt(t.coordinates,i,n),o=dQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!Dpr(s,a))return!1}return!0}function Ztt(e,t){return t[0]-e[0]}function Vz(e){return e[1]-e[0]+1}function Sm(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=Vz(e);if(t){if(r===2)return[e,null];let n=Math.floor(r/2);return[[e[0],e[0]+n],[e[0]+n,e[1]]]}if(r===1)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function ore(e,t){if(!Sm(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)Xk(r,e[i]);return r}function sre(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let i of r)Xk(t,i);return t}function vQe(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Rie(e,t,r){if(!vQe(e)||!vQe(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]=i)return i;if(Ak(n,a)){if(gQe(e,t))return 0}else if(gQe(t,e))return 0;let o=1/0;for(let s of e)for(let l=0,u=s.length,c=u-1;l0;){let l=o.pop();if(l[0]>=a)continue;let u=l[1],c=t?50:100;if(Vz(u)<=c){if(!Sm(u,e.length))return NaN;if(t){let f=qpr(e,u,r,i);if(isNaN(f)||f===0)return f;a=Math.min(a,f)}else for(let f=u[0];f<=u[1];++f){let h=Bpr(e[f],r,i);if(a=Math.min(a,h),a===0)return 0}}else{let f=are(u,t);mQe(o,a,i,e,s,f[0]),mQe(o,a,i,e,s,f[1])}}return a}function Hz(e,t,r,i,n,a=1/0){let o=Math.min(a,n.distance(e[0],r[0]));if(o===0)return o;let s=new Xtt([[0,[0,e.length-1],[0,r.length-1]]],Ztt);for(;s.length>0;){let l=s.pop();if(l[0]>=o)continue;let u=l[1],c=l[2],f=t?50:100,h=i?50:100;if(Vz(u)<=f&&Vz(c)<=h){if(!Sm(u,e.length)&&Sm(c,r.length))return NaN;let d;if(t&&i)d=Rpr(e,u,r,c,n),o=Math.min(o,d);else if(t&&!i){let p=e.slice(u[0],u[1]+1);for(let v=c[0];v<=c[1];++v)if(d=Bb(r[v],p,n),o=Math.min(o,d),o===0)return o}else if(!t&&i){let p=r.slice(c[0],c[1]+1);for(let v=u[0];v<=u[1];++v)if(d=Bb(e[v],p,n),o=Math.min(o,d),o===0)return o}else d=zpr(e,u,r,c,n),o=Math.min(o,d)}else{let d=are(u,t),p=are(c,i);xz(s,o,n,e,r,d[0],p[0]),xz(s,o,n,e,r,d[0],p[1]),xz(s,o,n,e,r,d[1],p[0]),xz(s,o,n,e,r,d[1],p[1])}}return o}function Npr(e,t){let r=e.geometry(),i=r.flat().map(o=>Fie([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Iie(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,Hz(i,!1,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,Hz(i,!1,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,Gz(i,!1,o.coordinates,n,a))}if(a===0)return a}return a}function Upr(e,t){let r=e.geometry(),i=r.flat().map(o=>Fie([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Iie(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,Hz(i,!0,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,Hz(i,!0,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,Gz(i,!0,o.coordinates,n,a))}if(a===0)return a}return a}function Vpr(e,t){let r=e.geometry();if(r.length===0||r[0].length===0)return NaN;let i=AB(r,0).map(o=>o.map(s=>s.map(l=>Fie([l.x,l.y],e.canonical)))),n=new Iie(i[0][0][0][1]),a=1/0;for(let o of t)for(let s of i){switch(o.type){case"Point":a=Math.min(a,Gz([o.coordinates],!1,s,n,a));break;case"LineString":a=Math.min(a,Gz(o.coordinates,!0,s,n,a));break;case"Polygon":a=Math.min(a,Opr(s,o.coordinates,n,a))}if(a===0)return a}return a}function Gte(e){return e.type==="MultiPolygon"?e.coordinates.map(t=>({type:"Polygon",coordinates:t})):e.type==="MultiLineString"?e.coordinates.map(t=>({type:"LineString",coordinates:t})):e.type==="MultiPoint"?e.coordinates.map(t=>({type:"Point",coordinates:t})):[e]}function yQe(e,[t,r,i,n],a){t=t.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);let o=n?n.evaluate(e):1,s=btt(t,r,i,o);if(s)throw new al(s,a);return new ea(t/255,r/255,i/255,o,!1)}function xQe(e,t){return e in t&&t[e]!==void 0}function Hte(e,t){let r=t[e];return r===void 0?null:r}function jpr(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}function Pb(e){return{type:e}}function $pr(e){return Array.isArray(e)?`(${e.map(ml).join(", ")})`:`(${ml(e.type)}...)`}function jz(e){if(e instanceof Ltt)return jz(e.boundExpression);if(e instanceof Jb&&e.name==="error"||e instanceof Utt||e instanceof Pie||e instanceof Bie||e instanceof qie)return!1;let t=e instanceof pT||e instanceof _m,r=!0;return e.eachChild(i=>{r&&(r=t?jz(i):i instanceof ST)}),r?SB(e)&&EB(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function SB(e){if(e instanceof Jb&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof Pie||e instanceof Bie)return!1;let t=!0;return e.eachChild(r=>{t&&!SB(r)&&(t=!1)}),t}function Mk(e){if(e instanceof Jb&&e.name==="feature-state")return!1;let t=!0;return e.eachChild(r=>{t&&!Mk(r)&&(t=!1)}),t}function EB(e,t){if(e instanceof Jb&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(i=>{r&&!EB(i,t)&&(r=!1)}),r}function ET(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function rrt(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Oie(e){return!!e.expression&&e.expression.interpolated}function Sk(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function Aa(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function kB(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Ql(e)===Nb}function Wpr(e){return e}function Ypr(e){switch(e.type){case"color":return ea.parse;case"padding":return Q1.parse;case"numberArray":return eg.parse;case"colorArray":return Xd.parse;default:return null}}function Xpr(e){switch(e){case"exponential":return nrt;case"interval":return Kpr;case"categorical":return Zpr;case"identity":return Jpr;default:throw Error(`Unknown function type "${e}"`)}}function irt(e,t){let r=e.stops&&typeof e.stops[0][0]=="object",i=r||e.property!==void 0,n=r||!i,a=e.type||(Oie(t)?"exponential":"interval"),o=Ypr(t);if(o&&(e=Sk({},e),e.stops&&(e.stops=e.stops.map(c=>[c[0],o(c[1])])),e.default?e.default=o(e.default):e.default=o(t.default)),e.colorSpace&&!Udr(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let s=Xpr(a),l,u;if(a==="categorical"){l=Object.create(null);for(let c of e.stops)l[c[0]]=c[1];u=typeof e.stops[0][0]}if(r){let c={},f=[];for(let p=0;pp[0]),evaluate({zoom:p},v){return nrt({stops:h,base:e.base},t,p).evaluate(p,v)}}}if(n){let c=a==="exponential"?{name:"exponential",base:e.base===void 0?1:e.base}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Zd.interpolationFactor.bind(void 0,c),zoomStops:e.stops.map(f=>f[0]),evaluate:({zoom:f})=>s(e,t,f,l,u)}}return{kind:"source",evaluate(c,f){let h=f&&f.properties?f.properties[e.property]:void 0;return h===void 0?Zk(e.default,t.default):s(e,t,h,l,u)}}}function Zk(e,t,r){if(e!==void 0)return e;if(t!==void 0)return t;if(r!==void 0)return r}function Zpr(e,t,r,i,n){return Zk(typeof r===n?i[r]:void 0,e.default,t.default)}function Kpr(e,t,r){if(Aa(r)!=="number")return Zk(e.default,t.default);let i=e.stops.length;if(i===1||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=TB(e.stops.map(a=>a[0]),r,"");return e.stops[n][1]}function nrt(e,t,r){let i=e.base===void 0?1:e.base;if(Aa(r)!=="number")return Zk(e.default,t.default);let n=e.stops.length;if(n===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let a=TB(e.stops.map(c=>c[0]),r,""),o=Qpr(r,i,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],u=$s[t.type]||Wpr;return typeof s.evaluate=="function"?{evaluate(...c){let f=s.evaluate.apply(void 0,c),h=l.evaluate.apply(void 0,c);if(f!==void 0&&h!==void 0)return u(f,h,o,e.colorSpace)}}:u(s,l,o,e.colorSpace)}function Jpr(e,t,r){switch(t.type){case"color":r=ea.parse(r);break;case"formatted":r=Mm.fromString(r.toString());break;case"resolvedImage":r=Z1.fromString(r.toString());break;case"padding":r=Q1.parse(r);break;case"colorArray":r=Xd.parse(r);break;case"numberArray":r=eg.parse(r);break;default:Aa(r)!==t.type&&(t.type!=="enum"||!t.values[r])&&(r=void 0)}return Zk(r,e.default,t.default)}function Qpr(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function lre(e){return{result:"success",value:e}}function fT(e){return{result:"error",value:e}}function art(e,t,r,i){return`${e}${t}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function ort(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function CB(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in mT}function DB(e,t,r,i){ort(t);let n=new ert(mT,jz,[],r?rvr(r):void 0),a=n.parse(e,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?lre(new Uie(a,t,r,i)):fT(n.errors)}function evr(e){return e._styleExpression!==void 0}function srt(e,t,r,i){let n=DB(e,t,r,i);if(n.result==="error")return n;let a=n.value.expression,o=SB(a);if(!o&&!ET(r))return fT([new $1("","data expressions not supported")]);let s=EB(a,["zoom"]);if(!s&&!rrt(r))return fT([new $1("","zoom expressions not supported")]);let l=qz(a);if(!l&&!s)return fT([new $1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(l instanceof $1)return fT([l]);if(l instanceof Zd&&!Oie(r))return fT([new $1("",'"interpolate" expressions cannot be used with this property')]);if(!l)return lre(o?new Ek("constant",n.value,i):new Ek("source",n.value,i));let u=l instanceof Zd?l.interpolation:void 0;return lre(o?new $z("camera",n.value,l.labels,u,i):new $z("composite",n.value,l.labels,u,i))}function tvr(e,t,r,i){if(kB(e))return new lrt(e,t,r);if(CB(e)){let n=srt(e,t,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=e;return r.type==="color"&&typeof e=="string"?n=ea.parse(e):r.type==="padding"&&(typeof e=="number"||Array.isArray(e))?n=Q1.parse(e):r.type==="numberArray"&&(typeof e=="number"||Array.isArray(e))?n=eg.parse(e):r.type==="colorArray"&&(typeof e=="string"||Array.isArray(e))?n=Xd.parse(e):r.type==="variableAnchorOffsetCollection"&&Array.isArray(e)?n=X1.parse(e):r.type==="projectionDefinition"&&typeof e=="string"&&(n=Lm.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function qz(e){let t=null;if(e instanceof Dtt)t=qz(e.result);else if(e instanceof qtt){for(let r of e.args)if(t=qz(r),t)break}else(e instanceof Die||e instanceof Zd)&&e.input instanceof Jb&&e.input.name==="zoom"&&(t=e);return t instanceof $1||e.eachChild(r=>{let i=qz(r);i instanceof $1?t=i:!t&&i?t=new $1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new $1("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Kk(e,t=new Set){return e instanceof qie&&t.add(e.key),e.eachChild(r=>{Kk(r,t)}),t}function rvr(e){let t={color:xv,string:la,number:Ei,enum:la,boolean:La,formatted:Wk,padding:_B,numberArray:bB,colorArray:wk,projectionDefinition:yB,resolvedImage:Yk,variableAnchorOffsetCollection:wB};return e.type==="array"?Lf(t[e.value]||ha,e.length):t[e.type]}function crt(e){if(e.type==="color"&&kB(e.default))return new ea(0,0,0,0);switch(e.type){case"color":return ea.parse(e.default)||null;case"padding":return Q1.parse(e.default)||null;case"numberArray":return eg.parse(e.default)||null;case"colorArray":return Xd.parse(e.default)||null;case"variableAnchorOffsetCollection":return X1.parse(e.default)||null;case"projectionDefinition":return Lm.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function kT(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e!=null?e:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function ivr(e){let t=!1;for(let r of e){let i=frt(r);if(i==="expression")return"expression";i==="legacy"&&(t=!0)}return t?"legacy":"neutral"}function frt(e){if(typeof e=="boolean")return"neutral";if(!Array.isArray(e)||e.length===0)return"legacy";switch(e[0]){case"has":return e.length<2||e[1]==="$id"||e[1]==="$type"?"legacy":e.length===2?"neutral":"expression";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return ivr(e.slice(1));default:return"expression"}}function Vie(e){return frt(e)!=="legacy"}function _Qe(e){return e==="$type"?["geometry-type"]:e==="$id"?["id"]:["get",e]}function nvr(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return e.length!==3||typeof e[1]!="string"?null:[e[0],_Qe(e[1]),e[2]];case"in":case"!in":{if(e.length<2||typeof e[1]!="string")return null;let t=["in",_Qe(e[1]),["literal",e.slice(2)]];return e[0]==="!in"?["!",t]:t}case"has":case"!has":{if(e.length!==2||typeof e[1]!="string"||e[1]==="$type"||e[1]==="$id")return null;let t=["has",e[1]];return e[0]==="!has"?["!",t]:t}default:return null}}function hrt(e){if((e[0]==="<"||e[0]==="<="||e[0]===">"||e[0]===">=")&&e[1]==="$type")return`"$type" cannot be use with operator "${e[0]}"`;let t=nvr(e);return t?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(t)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function jte(e,t,r){let i=r[e];return Array.isArray(i)?Vie(i)?Gie(i,t.concat(e)):{path:t.concat(e),legacyFilter:i}:null}function Gie(e,t=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${t}${i}: ${hrt(r.legacyFilter)}`)}function CT(e,t,r){if(e==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Vie(e)?avr(e,t):e=Wz(e);let i=DB(e,t,ovr,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,o)=>i.value.evaluate(n,a,{},o),needGeometry:drt(e),getGlobalStateRefs:()=>Kk(i.value.expression)}}function svr(e,t){return et)}function drt(e){if(!Array.isArray(e))return!1;if(e[0]==="within"||e[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?$te(e[1],e[2],t):t==="any"?lvr(e.slice(1)):t==="all"?["all"].concat(e.slice(1).map(Wz)):t==="none"?["all"].concat(e.slice(1).map(Wz).map(_z)):t==="in"?bQe(e[1],e.slice(2)):t==="!in"?_z(bQe(e[1],e.slice(2))):t==="has"?wQe(e[1]):t!=="!has"||_z(wQe(e[1]))}function $te(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 lvr(e){return["any"].concat(e.map(Wz))}function bQe(e,t){if(t.length===0)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(r=>typeof r!=typeof t[0])?["filter-in-large",e,["literal",t.sort(svr)]]:["filter-in-small",e,["literal",t]]}}function wQe(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _z(e){return["!",e]}function prt(e){let t=e.key,r=e.value;return r?[new Qr(t,r,"constants have been deprecated as of v8")]:[]}function Jl(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function jb(e){if(Array.isArray(e))return e.map(jb);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=jb(e[r]);return t}return Jl(e)}function I0(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],u=Aa(r);if(u!=="object")return[new Qr(t,r,`object expected, ${u} found`)];for(let c in r){let f=c.split(".")[0],h=gk(i,f)||i["*"],d;if(gk(n,f))d=n[f];else if(gk(i,f)){if(r[c]===void 0)continue;d=s}else if(n["*"])d=n["*"];else if(i["*"])d=s;else{l.push(new Qr(t,r[c],`unknown property "${c}"`));continue}l=l.concat(d({key:(t&&`${t}.`)+c,value:r[c],valueSpec:h,style:a,styleSpec:o,object:r,objectKey:c,validateSpec:s},r))}for(let c in i)n[c]||i[c].required&&i[c].default===void 0&&r[c]===void 0&&l.push(new Qr(t,r,`missing required property "${c}"`));return l}function Hie(e){let t=e.value,r=e.valueSpec,i=e.validateSpec,n=e.style,a=e.styleSpec,o=e.key,s=e.arrayElementValidator||i;if(Aa(t)!=="array")return[new Qr(o,t,`array expected, ${Aa(t)} found`)];if(r.length&&t.length!==r.length)return[new Qr(o,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Aa(r.value)==="object"&&(l=r.value);let u=[];for(let c=0;ci.maximum?[new Qr(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new Qr(t,r,`number expected, ${n} found`)]}function vrt(e){let t=e.valueSpec,r=Jl(e.value.type),i,n={},a,o,s=r!=="categorical"&&e.value.property===void 0,l=!s,u=Aa(e.value.stops)==="array"&&Aa(e.value.stops[0])==="array"&&Aa(e.value.stops[0][0])==="object",c=I0({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:p}});return r==="identity"&&s&&c.push(new Qr(e.key,e.value,'missing required property "property"')),r!=="identity"&&!e.value.stops&&c.push(new Qr(e.key,e.value,'missing required property "stops"')),r==="exponential"&&e.valueSpec.expression&&!Oie(e.valueSpec)&&c.push(new Qr(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!ET(e.valueSpec)?c.push(new Qr(e.key,e.value,"property functions not supported")):s&&!rrt(e.valueSpec)&&c.push(new Qr(e.key,e.value,"zoom functions not supported"))),(r==="categorical"||u)&&e.value.property===void 0&&c.push(new Qr(e.key,e.value,'"property" property is required')),c;function f(v){if(r==="identity")return[new Qr(v.key,v.value,'identity function may not have a "stops" property')];let m=[],g=v.value;return m=m.concat(Hie({key:v.key,value:g,valueSpec:v.valueSpec,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,arrayElementValidator:h})),Aa(g)==="array"&&g.length===0&&m.push(new Qr(v.key,g,"array must have at least one stop")),m}function h(v){let m=[],g=v.value,w=v.key;if(Aa(g)!=="array")return[new Qr(w,g,`array expected, ${Aa(g)} found`)];if(g.length!==2)return[new Qr(w,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Aa(g[0])!=="object")return[new Qr(w,g,`object expected, ${Aa(g[0])} found`)];if(g[0].zoom===void 0)return[new Qr(w,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new Qr(w,g,"object stop key must have value")];if(o&&o>Jl(g[0].zoom))return[new Qr(w,g[0].zoom,"stop zoom values must appear in ascending order")];Jl(g[0].zoom)!==o&&(o=Jl(g[0].zoom),a=void 0,n={}),m=m.concat(I0({key:`${w}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,objectElementValidators:{zoom:FB,value:d}}))}else m=m.concat(d({key:`${w}[0]`,value:g[0],valueSpec:{},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec},g));return CB(jb(g[1]))?m.concat([new Qr(`${w}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(v.validateSpec({key:`${w}[1]`,value:g[1],valueSpec:t,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec}))}function d(v,m){let g=Aa(v.value),w=Jl(v.value),b=v.value===null?m:v.value;if(!i)i=g;else if(g!==i)return[new Qr(v.key,b,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new Qr(v.key,b,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let _=`number expected, ${g} found`;return ET(t)&&r===void 0&&(_+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Qr(v.key,b,_)]}return r==="categorical"&&g==="number"&&(!isFinite(w)||Math.floor(w)!==w)?[new Qr(v.key,b,`integer expected, found ${w}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&wnew Qr(`${e.key}${i.key}`,e.value,i.message));let r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new Qr(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Mk(r))return[new Qr(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Mk(r))return[new Qr(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!EB(r,["zoom","feature-state"]))return[new Qr(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!SB(r))return[new Qr(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function uvr(e){let t=e.value,r=e.key,i=Aa(t);return i==="boolean"?[]:[new Qr(r,t,`boolean expected, ${i} found`)]}function ure(e){let t=e.key,r=e.value,i=Aa(r);return i==="string"?ea.parse(String(r))?[]:[new Qr(t,r,`color expected, "${r}" found`)]:[new Qr(t,r,`color expected, ${i} found`)]}function kk(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Jl(r))===-1&&n.push(new Qr(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Jl(r))===-1&&n.push(new Qr(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function cvr(e,t){let r=e;for(let i of t)r=r[i];return r}function fvr(e,t){let r=Gie(t);return r?[new Qr(`${e.key}${r.path.map(i=>`[${i}]`).join("")}`,cvr(e.value,r.path),hrt(r.legacyFilter),null,"warning")]:[]}function jie(e){let t=jb(e.value);return Vie(t)?[...fvr(e,t),...DT(Sk({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:grt(e)}function grt(e){let t=e.value,r=e.key;if(Aa(t)!=="array")return[new Qr(r,t,`array expected, ${Aa(t)} found`)];let i=e.styleSpec,n,a=[];if(t.length<1)return[new Qr(r,t,"filter array must have at least 1 element")];switch(a=a.concat(kk({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Jl(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Jl(t[1])==="$type"&&a.push(new Qr(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&a.push(new Qr(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=Aa(t[1]),n!=="string"&&a.push(new Qr(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o{f in r&&t.push(new Qr(i,r[f],`"${f}" is prohibited for ref layers`))});let c;n.layers.forEach(f=>{Jl(f.id)===s&&(c=f)}),c?c.ref?t.push(new Qr(i,r.ref,"ref cannot reference another ref layer")):o=Jl(c.type):t.push(new Qr(i,r.ref,`ref layer "${s}" not found`))}else if(o!=="background")if(!r.source)t.push(new Qr(i,r,'missing required property "source"'));else{let c=n.sources&&n.sources[r.source],f=c&&Jl(c.type);c?f==="vector"&&o==="raster"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a raster source`)):f!=="raster-dem"&&o==="hillshade"||f!=="raster-dem"&&o==="color-relief"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a raster-dem source`)):f==="raster"&&o!=="raster"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a vector source`)):f==="vector"&&!r["source-layer"]?t.push(new Qr(i,r,`layer "${r.id}" must specify a "source-layer"`)):f==="raster-dem"&&o!=="hillshade"&&o!=="color-relief"?t.push(new Qr(i,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):o==="line"&&r.paint&&r.paint["line-gradient"]&&(f!=="geojson"||!c.lineMetrics)&&t.push(new Qr(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Qr(i,r.source,`source "${r.source}" not found`))}return o==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&t.push(new Qr(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),t=t.concat(I0({key:i,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"})},filter:jie,layout(c){return I0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return xrt(Sk({layerType:o},f))}}})},paint(c){return I0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return yrt(Sk({layerType:o},f))}}})}}})),t}function J2(e){let t=e.value,r=e.key,i=Aa(t);return i==="string"?[]:[new Qr(r,t,`string expected, ${i} found`)]}function hvr(e){var f;let t=(f=e.sourceName)!=null?f:"",r=e.value,i=e.styleSpec,n=i.source_raster_dem,a=e.style,o=[],s=Aa(r);if(r===void 0)return o;if(s!=="object")return o.push(new Qr("source_raster_dem",r,`object expected, ${s} found`)),o;let l=Jl(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],c=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let h in r)!l&&u.includes(h)?o.push(new Qr(h,r[h],`In "${t}": "${h}" is only valid when "encoding" is set to "custom". ${c} encoding found`)):n[h]?o=o.concat(e.validateSpec({key:h,value:r[h],valueSpec:n[h],validateSpec:e.validateSpec,style:a,styleSpec:i})):o.push(new Qr(h,r[h],`unknown property "${h}"`));return o}function brt(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new Qr(r,t,'"type" is required')];let o=Jl(t.type),s;switch(o){case"vector":case"raster":return s=I0({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:TQe,validateSpec:a}),s;case"raster-dem":return s=hvr({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a}),s;case"geojson":if(s=I0({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:TQe}),t.cluster)for(let l in t.clusterProperties){let[u,c]=t.clusterProperties[l],f=typeof u=="string"?[u,["accumulated"],["get",l]]:u;s.push(...DT({key:`${r}.${l}.map`,value:c,validateSpec:a,expressionContext:"cluster-map"})),s.push(...DT({key:`${r}.${l}.reduce`,value:f,validateSpec:a,expressionContext:"cluster-reduce"}))}return s;case"video":return I0({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return I0({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new Qr(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return kk({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function dvr({key:e,value:t}){if(Aa(t)==="string")return J2({key:e,value:t});{let r=[];for(let i in t)r.push(...J2({key:`${e}.${i}`,value:t[i]}));return r}}function wrt(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=Aa(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new Qr("light",t,`object expected, ${o} found`)]),a;for(let s in t){let l=s.match(Nie);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r})):i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new Qr(s,t[s],`unknown property "${s}"`)])}return a}function Trt(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=Aa(t);if(t===void 0)return[];if(a!=="object")return[new Qr("sky",t,`object expected, ${a} found`)];let o=[];for(let s in t){let l=s.match(Nie);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new Qr(s,t[s],`unknown property "${s}"`)])}return o}function Art(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=Aa(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new Qr("terrain",t,`object expected, ${o} found`)]),a;for(let s in t)a=i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new Qr(s,t[s],`unknown property "${s}"`)]);return a}function pvr(e){return J2(e).length===0?[]:DT(e)}function vvr(e){return J2(e).length===0?[]:DT(e)}function gvr(e){let t=e.key,r=e.value;if(Aa(r)==="array"){if(r.length<1||r.length>4)return[new Qr(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new Qr(e,t,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],n=r.match(Avr);if(!n)return i();let[,a,o,s]=n;if(s!==void 0)return s.length>6?i():[];let l=parseInt(a,16),u=o===void 0?l:parseInt(o,16);return l>AQe||u>AQe?[new Qr(e,t,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new Qr(e,t,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Ert(e){var s,l;let t=(s=e.key)!=null?s:"font-faces",r=e.value,i=e.validateSpec,n=(l=e.styleSpec)!=null?l:ftt,a=e.style;if(!cre(r))return[new Qr(t,r,`object expected, ${Aa(r)} found`)];let o=[];for(let u in r){let c=r[u],f=Aa(c);if(f==="string")o.push(...J2({key:`${t}.${u}`,value:c}));else if(f==="array"){let h={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[d,p]of c.entries()){let v=`${t}.${u}[${d}]`;o.push(...I0({key:v,value:p,valueSpec:h,styleSpec:n,style:a,validateSpec:i}));let m=cre(p)?p["unicode-range"]:void 0;if(Aa(m)==="array")for(let[g,w]of m.entries())o.push(...Mvr(`${v}.unicode-range[${g}]`,w))}}else o.push(new Qr(`${t}.${u}`,c,`string or array expected, ${f} found`))}return o}function yk(e){let t=e.value,r=e.valueSpec,i=e.styleSpec;return e.validateSpec=yk,r.expression&&kB(Jl(t))?vrt(e):r.expression&&CB(jb(t))?DT(e):r.type&&MQe[r.type]?MQe[r.type](e):I0(Sk({},e,{valueSpec:r.type?i[r.type]:r}))}function krt(e){let t=e.value,r=e.key,i=J2(e);return i.length||(t.indexOf("{fontstack}")===-1&&i.push(new Qr(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&i.push(new Qr(r,t,'"glyphs" url must include a "{range}" token'))),i}function P0(e,t=_r){let r=[];return r=r.concat(yk({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:yk,objectElementValidators:{glyphs:krt,"*"(){return[]}}})),e.constants&&(r=r.concat(prt({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:yk}))),Crt(r)}function Hd(e){return function(t){return e(Object.assign({},t,{validateSpec:yk}))}}function Crt(e){return[].concat(e).sort((t,r)=>t.line-r.line)}function jd(e){return function(...t){return Crt(e.apply(this,t))}}function kvr(e,t,r){return new Evr(e,t,r)}function Cvr(e){var t;return Object.entries((t=e.sources)!=null?t:{}).filter(([,r])=>!$ie.has(r.type)).map(([r])=>`sources.${r}`)}function Wie(e,t){let r=Cvr(t);return LB(e,ch(t).filter(({message:i})=>!r.some(n=>i.startsWith(`${n}:`)||i.startsWith(`${n}.`))))}function LB(e,t){let r=!1;for(let i of t){if(i.severity==="warning"){Ma(i.message);continue}e.fire(new An(Error(i.message))),r=!0}return r}function qT(e,t,r,i){return(i==null?void 0:i.validate)!==!1&&LB(e,t(fn({styleSpec:_r},r)))}function Ui(e,t,r={}){if(bm[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),bm[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}function Frt(e){var t;return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||((t=e.constructor)==null?void 0:t.name)==="ArrayBuffer")}function Yie(e){let t=e.constructor;return e.$name||t._classRegistryKey}function Dvr(e){if(typeof e!="object"||!e)return!1;let t=Yie(e);return t&&t!=="Object"}function Lrt(e){return!Dvr(e)&&(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||Frt(e)||ex(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function xk(e,t){if(Lrt(e))return(Frt(e)||ex(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 a=[];for(let o of e)a.push(xk(o,t));return a}if(typeof e!="object")throw Error(`can't serialize object of type ${typeof e}`);let r=Yie(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!bm[r])throw Error(`${r} is not registered.`);let{klass:i}=bm[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===(t==null?void 0:t[t.length-1]))throw Error("statically serialized object won't survive transfer of $name property")}else{for(let a in e){if(!e.hasOwnProperty(a)||bm[r].omit.includes(a))continue;let o=e[a];o!==void 0&&(n[a]=bm[r].shallow.includes(a)?o:xk(o,t))}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(n.$name=r),n}function _k(e){if(Lrt(e))return e;if(Array.isArray(e))return e.map(_k);if(typeof e!="object")throw Error(`can't deserialize object of type ${typeof e}`);let t=Yie(e)||"Object";if(!bm[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=bm[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 n of Object.keys(e)){if(n==="$name")continue;let a=e[n];i[n]=bm[t].shallow.includes(n)?a:_k(a)}return i}function kQe(e){if(Array.isArray(e))return e.length;let t=e==null?void 0:e.values;return Array.isArray(t)?t.length:void 0}function Prt(e,t){let r=kQe(e),i=kQe(t);return r!==void 0&&i!==void 0&&r!==i}function ol(e,t=1){let r=0,i=0;return{members:e.map(n=>{let a=Bvr(n.type),o=r=DQe(r,Math.max(t,a)),s=n.components||1;return i=Math.max(i,a),r+=a*s,{name:n.name,type:n.type,components:s,offset:o}}),size:DQe(r,Math.max(i,t)),alignment:t}}function Bvr(e){return zvr[e].BYTES_PER_ELEMENT}function DQe(e,t){return Math.ceil(e/t)*t}function PQe(e,t){return e=Jn(Math.floor(e),0,255),t=Jn(Math.floor(t),0,255),256*e+t}function IQe(e){let t=+e;return!isNaN(t)&&t<=2**53-1?t:(0,Ire.default)(String(e))}function Rre(e,t,r,i){for(;r>1],a=r-1,o=i+1;for(;;){do a++;while(e[a]n);if(a>=o)break;bz(e,a,o),bz(t,3*a,3*o),bz(t,3*a+1,3*o+1),bz(t,3*a+2,3*o+2)}o-rn.x+1||on.y+1)&&Ma("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function tx(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Qb(e):[]}}function t1r(e,t,r,i,n){e.emplaceBack(BQe+t*8+i,BQe+r*8+n)}function Qie(e,t){for(let r of e)if(FT(t,r))return!0;for(let r of t)if(FT(e,r))return!0;return ene(e,t)}function qB(e,t,r){return FT(e,t)?!0:qre(t,e,r)}function rit(e,t){if(e.length===1)return qQe(t,e[0]);for(let r of t)for(let i of r)if(FT(e,i))return!0;for(let r of e)if(qQe(t,r))return!0;for(let r of t)if(ene(e,r))return!0;return!1}function r1r(e,t,r){for(let i of t){if(e.length>=3){for(let n of i)if(FT(e,n))return!0}if(i1r(e,i,r))return!0}return!1}function i1r(e,t,r){if(e.length>1){if(ene(e,t))return!0;for(let i of t)if(qre(i,e,r))return!0}for(let i of e)if(qre(i,t,r))return!0;return!1}function ene(e,t){if(e.length===0||t.length===0)return!1;for(let r=0;r1?e.distSqr(r):e.distSqr(r.sub(t)._mult(n)._add(t))}function qQe(e,t){let r=!1,i,n,a;for(let o of e){i=o;for(let s=0,l=i.length-1;st.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function FT(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 a1r(e,t,r,i,n){for(let o of e)if(t<=o.x&&r<=o.y&&i>=o.x&&n>=o.y)return!0;let a=[new tr(t,r),new tr(t,n),new tr(i,n),new tr(i,r)];if(e.length>2){for(let o of a)if(FT(e,o))return!0}for(let o=0;on.x&&t.x>n.x||e.yn.y&&t.y>n.y)return!1;let a=Y2(e,t,r[0]);return a!==Y2(e,t,r[1])||a!==Y2(e,t,r[2])||a!==Y2(e,t,r[3])}function yT(e,t,r){let i=t.paint.get(e).value;return i.kind==="constant"?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function OB(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function NB(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=tr.convert(t)._mult(n);r==="viewport"&&a._rotate(-i);let o=[];for(let s of e)o.push(s.sub(a));return o}function s1r(e){let t=[];for(let r=0;rtne(n,t,r,i))}function rne(e,{width:t,height:r},i,n){if(!n)n=new Uint8Array(t*r*i);else 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}`);return e.width=t,e.height=r,e.data=n,e}function sit(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=rne({},{width:t,height:r},i);ine(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 ine(e,t,r,i,n,a){if(n.width===0||n.height===0)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]=l;let u=e.expression.evaluate(t);n.setPixel(o/4/r,s/4,u)};if(e.clips)for(let o=0,s=0;o80*r){s=e[0],l=e[1];let c=s,f=l;for(let h=r;hc&&(c=d),p>f&&(f=p)}u=Math.max(c-s,f-l),u=u===0?0:32767/u}return Ure(a,o,s,l,u),o}function pit(e,t,r,i,n){let a=null;if(n===J1r(e,t,r,i)>0)for(let o=t;o=t;o-=i)a=UQe(o/i|0,e[o],e[o+1],a);return a&&Pk(a,a.next)&&(Rk(a),a=a.next),a}function Wb(e,t=e){let r=t===e,i=e,n;do n=!1,i!==i.next&&(Lk.size===0||!Lk.has(i))&&(Pk(i,i.next)||Ou(i.prev,i,i.next)===0)?((r||i===t)&&(t=i.prev),Nre=!0,Rk(i),i=i.prev,n=!0):(r||i!==t)&&(i=i.next,n=!r);while(n||i!==t);return t}function Ure(e,t,r,i,n){n&&$1r(e,r,i,n);let a=e,o=!1;for(;e.prev!==e.next;){let s=e.prev,l=e.next;if(Ou(s,e,l)<0&&(n?z1r(e,r,i,n):R1r(e))){t.push(s.i,e.i,l.i),Rk(e),e=l,a=l;continue}if(e=l,e===a){if(Nre=!1,e=Wb(e),Nre){a=e;continue}if(!o){e=B1r(e,t),a=e,o=!0;continue}q1r(e,t,r,i,n);break}}}function R1r(e){let t=e.prev,r=e,i=e.next,n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=Math.min(n,a,o),f=Math.min(s,l,u),h=Math.max(n,a,o),d=Math.max(s,l,u),p=i.next;for(;p!==t;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&(n!==p.x||s!==p.y)&&eB(n,s,a,l,o,u,p.x,p.y)&&Ou(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function z1r(e,t,r,i){let n=e.prev,a=e,o=e.next,s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,d=Math.min(s,l,u),p=Math.min(c,f,h),v=Math.max(s,l,u),m=Math.max(c,f,h),g=jre(d,p,t,r,i),w=jre(v,m,t,r,i),b=e.prevZ;for(;b&&b.z>=g;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==o&&(s!==b.x||c!==b.y)&&eB(s,c,l,f,u,h,b.x,b.y)&&Ou(b.prev,b,b.next)>=0)return!1;b=b.prevZ}let _=e.nextZ;for(;_&&_.z<=w;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==o&&(s!==_.x||c!==_.y)&&eB(s,c,l,f,u,h,_.x,_.y)&&Ou(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function B1r(e,t){let r=e,i=!1;do{let n=r.prev,a=r.next.next;git(n,r,r.next,a,!1)&&Ik(n,a)&&Ik(a,n)&&(t.push(n.i,r.i,a.i),Rk(r),Rk(r.next),r=e=a,i=!0),r=r.next}while(r!==e);return i?Wb(r):r}function q1r(e,t,r,i,n){let a=e;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&X1r(a,o)){let s=mit(a,o);a=Wb(a,a.next),s=Wb(s,s.next),Ure(a,t,r,i,n),Ure(s,t,r,i,n);return}o=o.next}a=a.next}while(a!==e)}function O1r(e,t,r,i){let n=[];for(let a=0,o=t.length;ao&&(o=r.x),r.ys&&(s=r.y),c.xo&&(o=c.x),c.ys&&(s=c.y),r=c}while(++l<16&&r!==t);Hre[i]=r;let u=i*4;Kl[u]=n,Kl[u+1]=a,Kl[u+2]=o,Kl[u+3]=s}while(r!==t)}function G1r(e,t){let r=e.z*4;t.xKl[r+2]&&(Kl[r+2]=t.x),t.y>Kl[r+3]&&(Kl[r+3]=t.y)}function OQe(e){let t=Hre[e];for(;t.prev.next!==t;)t=t.next;return Hre[e]=t,t}function NQe(e){let t=Gre[e];for(;t.prev.next!==t;)t=t.next;return Gre[e]=t,t}function H1r(e,t){let r=t,i=e.x,n=e.y,a=-1/0,o;if(Pk(e,r))return r;for(let h=0,d=0;hKl[d+3]||Kl[d]>i||Kl[d+2]<=a)continue;let p=OQe(h);r=NQe(h);do{if(r.prev.next===r){if(Pk(e,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let v=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&v>a&&(a=v,o=r.xi||Kl[d+3]c)continue;let p=OQe(h);r=NQe(h);do{if(r.prev.next===r&&i>=r.x&&r.x>=s&&i!==r.x&&eB(ni)&&(vo.x||r.x===o.x&&j1r(o,r)))&&(o=r,f=v)}r=r.next}while(r!==p)}return o}function j1r(e,t){return Ou(e.prev,e,t.prev)<0&&Ou(t.next,e,e.next)<0}function $1r(e,t,r,i){let n=e,a=0;do n.z=jre(n.x,n.y,t,r,i),Wd[a++]=n,n=n.next;while(n!==e);W1r(a);let o=null;for(let s=0;s=0&&Wd[n].z>i;)Wd[n+1]=Wd[n],n--;Wd[n+1]=r}return}Ib.length>>a&255]++;let o=0;for(let s=0;s<256;s++){let l=ak[s];ak[s]=o,o+=l}for(let s=0;s>>a&255]++;i[u]=t[s],n[u]=l}}function jre(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|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 Y1r(e){let t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function X1r(e,t){let r=Pk(e,t)&&Ou(e.prev,e,e.next)>0&&Ou(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||Ik(e,t)&&Ik(t,e)&&(Ou(e.prev,e,t.prev)!==0||Ou(e,t.prev,t)!==0))&&!Z1r(e,t)&&(r||K1r(e,t))}function Ou(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Pk(e,t){return e.x===t.x&&e.y===t.y}function git(e,t,r,i,n=!0){let a=Ou(e,t,r),o=Ou(e,t,i),s=Ou(r,i,e),l=Ou(r,i,t);return(a>0&&o<0||a<0&&o>0)&&(s>0&&l<0||s<0&&l>0)?!0:n?!!(a===0&&Az(e,r,t)||o===0&&Az(e,i,t)||s===0&&Az(r,e,i)||l===0&&Az(r,t,i)):!1}function Az(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 Z1r(e,t){let r=Math.min(e.x,t.x),i=Math.max(e.x,t.x),n=Math.min(e.y,t.y),a=Math.max(e.y,t.y),o=e;do{let s=o.next;if(o.x>i&&s.x>i||o.xa&&s.y>a||o.y=0&&Ou(e,e.prev,t)>=0:Ou(e,t,e.prev)<0||Ou(e,e.next,t)<0}function K1r(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do{let o=r.next;r.y>a!=o.y>a&&n<(o.x-r.x)*(a-r.y)/(o.y-r.y)+r.x&&(i=!i),r=o}while(r!==e);return i}function mit(e,t){let r=$re(e.i,e.x,e.y),i=$re(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 UQe(e,t,r,i){let n=$re(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 Rk(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),Vre&&G1r(e.prev,e.next)}function $re(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function J1r(e,t,r,i){let n=0;for(let a=t,o=r-i;a0?(Math.floor(T/o)+1)*o:(Math.ceil(T/o)-1)*o,S=_>0?(Math.floor(A/o)+1)*o:(Math.ceil(A/o)-1)*o,C=Math.abs(T-E),k=Math.abs(A-S),D=Math.abs(T-v),F=Math.abs(A-m),P=g?C/M:1/0,R=w?k/x:1/0;if((D<=C||!g)&&(F<=k||!w))break;if(P0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}function rgr(e,t,r){if(t.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=e[t[0]*2];for(let l=1;l=0?o-1:a-1,u=(s+1)%a,c=e[t[l]*2],f=e[t[l]*2+1],h=e[t[u]*2],d=e[t[u]*2+1],p=e[t[o]*2],v=e[t[o]*2+1],m=e[t[s]*2],g=e[t[s]*2+1],w=!1;if(ch)w=!1;else{let b=g-v,_=-(m-p),M=v((h-p)*b+(d-v)*_)*M&&(w=!0)}if(w){let b=t[l],_=t[o],M=t[s];b!==_&&b!==M&&_!==M&&r.push(M,_,b),o--,o<0&&(o=a-1)}else{let b=t[u],_=t[o],M=t[s];b!==_&&b!==M&&_!==M&&r.push(M,_,b),s++,s>=a&&(s=0)}if(l===u)break}}function xit(e,t,r,i,n,a,o,s,l){let u=n.length/2,c=o&&s&&l;if(uWs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,g=!0,c=0);let b=bk(o,i,a,s,h,v,u),_=bk(o,i,a,s,d,m,u),M=bk(o,i,a,s,p,g,u);r.emplaceBack(c+b-l,c+_-l,c+M-l),u.primitiveLength++}}function ngr(e,t,r,i,n,a){let o=[];for(let f=0;fWs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,c=0);let w=bk(o,i,a,s,d,v,u),b=bk(o,i,a,s,p,m,u);r.emplaceBack(c+w-l,c+b-l),u.primitiveLength++}}function Xre(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}function VQe(e){return e.every(t=>t.x<0)||e.every(t=>t.x>8192)||e.every(t=>t.y<0)||e.every(t=>t.y>8192)}function Tit(e){let t=e.length;if(t<=1)return[e];let r=[],i,n;for(let a=0;a_gr(n,i))}function xgr(e,t){let r=ygr(zr/2,zr/2,t),i=wo.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y;)t.pop();return t}function wgr(e,t,r,i,n){let a=t.sub(r),o=i.sub(r),s=a.mag(),l=o.mag();if(s<1e-6||l<1e-6){e.push(r.clone());return}a._div(s),o._div(l);let u=a.x*o.x+a.y*o.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){e.push(r.clone());return}let c=.2,f=Math.min(n,s*c,l*c),h=r.add(a.mult(f)),d=r.add(o.mult(f)),p=Math.sqrt((1+u)/2),v=r.add(a.add(o)._unit()._mult(f/p)),m=h.sub(v).angleWith(d.sub(v)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let w=0;w<=g;w++)e.push(h.rotateAround(w/g*m,v))}function ok(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,Math.floor(i*Xte)*2+o,n*Xte*2,a*Xte*2,Math.round(s))}function Tgr(e,t){for(let r=0;r0?t+2*e:e}function Wgr(e){return/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u077F\u07C0-\u07FA\u07FD-\u07FF\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\u1800\u1801\u1804\u1806-\u1819\u1820-\u1878\u1880-\u18AA\uA840-\uA877\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDD00-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDEFF\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB]|\uD805[\uDE60-\uDE6C]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]|\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function Ygr(e){return/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC57-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD1F-\uDD39\uDD3F-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58\uDE60-\uDE9F\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF00-\uDF35\uDF39-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD85\uDD8E\uDD8F\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDF27\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function Iit(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function Xgr(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function $B(e){return/[\u02EA\u02EB\u1100-\u11FF\u1401-\u167F\u18B0-\u18FF\u2065\u20DD-\u20E0\u20E2-\u20E4\u2B97\u2BF0-\u2BFF\u2E50\u2E51\u2E80-\u3007\u3012\u3013\u3020-\u302F\u3031-\u30FB\u30FD-\uA4CF\uA960-\uA97F\uAC00-\uD7FF\uF900-\uFAFF\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7\uFFF0-\uFFF8]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|[\uD80C-\uD810\uD81C-\uD822\uD83C\uD83D\uD840-\uD87E\uD880-\uD8BE][\uDC00-\uDFFF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFFF]|\uD823[\uDC00-\uDDFF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFF]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83E[\uDD00-\uDEFF]|[\uD87F\uD8BF][\uDC00-\uDFFD]/gim.test(String.fromCodePoint(e))}function Zgr(e){return/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))}function Kgr(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function XQe(e){return/[\u0E01-\u0E3A\u0E40-\u0E4E\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u103F\u1050-\u108F\u109A-\u109F\u1780-\u17D3\u17D7\u17DC\u17DD\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19DE\u19DF\u1A20-\u1A5E\u1A60-\u1A7C\u1AA0-\u1AAD\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9EF\uA9FA-\uA9FE\uAA60-\uAAC2\uAADB-\uAADF]|\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF3A\uDF3B\uDF3F-\uDF46]/gim.test(String.fromCodePoint(e))}function Jgr(e,t){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||new RegExp("^\\p{gc=Mc}","u").test(t)}function imr(e,t,r){let i=0;for(let n of e.split(";")){let[a,o]=n.split(",").map(l=>parseInt(l,36)),s=i+a;for(let l=s;l{let r=t.codePointAt(0);return{codePoint:r,type:nmr(r),form:null}})}function umr(e){let t=e.filter(r=>r.type!=="T");for(let r=0;r0&&amr(t[r-1].type),a=r+1String.fromCodePoint(hmr(r))).join("")}function pmr(e,t,r){var n;let i=t.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?e=e.toLocaleUpperCase():i==="lowercase"&&(e=e.toLocaleLowerCase()),((n=tB.applyArabicShaping)!=null?n:dmr)(e)}function vmr(e,t,r){for(let i of e.sections)i.text=pmr(i.text,t,r);return e}function gmr(e){let t={},r={},i=[],n=0;function a(u){i.push(e[u]),n++}function o(u,c,f){let h=r[u];return delete r[u],r[c]=h,i[h].geometry[0].pop(),i[h].geometry[0]=i[h].geometry[0].concat(f[0]),h}function s(u,c,f){let h=t[c];return delete t[c],t[u]=h,i[h].geometry[0].shift(),i[h].geometry[0]=f[0].concat(i[h].geometry[0]),h}function l(u,c,f){let h=f?c[0][c[0].length-1]:c[0][0];return`${u}:${h.x}:${h.y}`}for(let u=0;uu.geometry)}function Jre(e){if(!zit||!Kgr(e))return[...e];Sz!=null||(Sz=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let t=[];for(let{segment:r}of Sz.segment(e)){let i=t.length-1;i>=0&&Jgr(t[i],r)?t[i]+=r:t.push(r)}return t}function mmr(e){let t=new Set;if(zit){Ez!=null||(Ez=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of Ez.segment(e))t.add(i);return t}let r=0;for(let i of e.split(new RegExp("\\b|(?=\\p{Ideo})","u")))t.add(r),r+=i.length;return t}function r8(e){let t=e.codePointAt(0);return e.length>(t>65535?2:1)}function une(e){return/\s/u.test(String.fromCodePoint(e))}function Qre(e){for(let t of e)if($B(t.codePointAt(0)))return!0;return!1}function ymr(e){for(let t of e)if(!xmr(t.codePointAt(0)))return!1;return!0}function xmr(e){return!Wgr(e)}function KQe(e){return!($B(e)||Zgr(e))}function Bit(e){return new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(e))}function qit(e){return Ygr(e)}function Oit(e){for(let t of e)if(qit(t.codePointAt(0)))return!0;return!1}function _mr(e){let t="",r={premature:!0,value:void 0},i=e[Symbol.iterator](),n=i.next(),a=e[Symbol.iterator]();a.next();let o=a.next();for(;!n.done;)(o.done||!KQe(o.value.codePointAt(0))||vT[o.value])&&(r.premature||!KQe(r.value.codePointAt(0))||vT[r.value])&&vT[n.value]?t+=vT[n.value]:t+=n.value,r={value:n.value,premature:!1},n=i.next(),o=a.next();return t}function JQe(e,t,r,i,n,a){if("fontStack"in t){let o=r[t.fontStack],s=o==null?void 0:o[e];if(s)return s.metrics.advance*t.scale+n;let l=0;for(let u of e){let c=o==null?void 0:o[u];c&&(l+=c.metrics.advance*t.scale+n)}return l}{let o=i[t.imageName];return o?o.displaySize[0]*t.scale*24/a+n:0}}function QQe(e,t,r,i){let n=(e-t)**2;return i?e1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function p(Ce,be){var he=0,oe=new Map,Ee=be&&new Map,ye;return Ce.split(",").forEach(function ue(ee){if(ee.indexOf("+")!==-1)for(var ae=+ee;ae--;)ue(ye);else{ye=ee;var xe=ee.split(">"),re=xe[0],pe=xe[1];re=String.fromCodePoint(he+=parseInt(re,36)),pe=String.fromCodePoint(he+=parseInt(pe,36)),oe.set(re,pe),be&&Ee.set(pe,re)}}),{map:oe,reverseMap:Ee}}var v,m,g;function w(){if(!v){var Ce=p(d.pairs,!0),be=Ce.map,he=Ce.reverseMap;v=be,m=he,g=p(d.canonical,!1).map}}function b(Ce){return w(),v.get(Ce)||null}function _(Ce){return w(),m.get(Ce)||null}function M(Ce){return w(),g.get(Ce)||null}var x=r.L,T=r.R,A=r.EN,y=r.ES,E=r.ET,S=r.AN,C=r.CS,k=r.B,D=r.S,F=r.ON,P=r.BN,R=r.NSM,L=r.AL,I=r.LRO,B=r.RLO,O=r.LRE,$=r.RLE,Y=r.PDF,K=r.LRI,j=r.RLI,q=r.FSI,J=r.PDI;function U(Ce,be){for(var he=125,oe=new Uint32Array(Ce.length),Ee=0;Ee0)Oe--;else if(et>0){for(Qe=0;!_e[_e.length-1]._isolate;)_e.pop();var bt=_e[_e.length-1]._isolInitIndex;bt!=null&&(ae.set(bt,_t),ae.set(_t,bt)),_e.pop(),et--}Ie=_e[_e.length-1],ee[_t]=Ie._level,Ie._override&&ue(_t,Ie._override)}else ut&Y?(Oe===0&&(Qe>0?Qe--:!Ie._isolate&&_e.length>1&&(_e.pop(),Ie=_e[_e.length-1])),ee[_t]=Ie._level):ut&k&&(ee[_t]=re.level);else ee[_t]=Ie._level,Ie._override&&ut!==P&&ue(_t,Ie._override)}for(var Ne=[],Ue=null,Ge=re.start;Ge<=re.end;Ge++){var je=oe[Ge];if(!(je&s)){var Re=ee[Ge],Ve=je&n,ct=je===J;Ue&&Re===Ue._level?(Ue._end=Ge,Ue._endsWithIsolInit=Ve):Ne.push(Ue={_start:Ge,_end:Ge,_level:Re,_startsWithPDI:ct,_endsWithIsolInit:Ve})}}for(var Tt=[],Xt=0;Xt=0;Je--)if(!(oe[Je]&s)){xt=ee[Je];break}var Ct=Zt[Zt.length-1],ir=ee[Ct],hr=re.level;if(!(oe[Ct]&n)){for(var Ur=Ct+1;Ur<=re.end;Ur++)if(!(oe[Ur]&s)){hr=ee[Ur];break}}Tt.push({_seqIndices:Zt,_sosType:Math.max(xt,st)%2?T:x,_eosType:Math.max(hr,ir)%2?T:x})}}for(var si=0;si=0;Vn--)if(!(oe[Lr[Vn]]&s)){dn=oe[Lr[Vn]];break}ue(ca,dn&(n|J)?F:dn)}}if(ye.get(A))for(var ra=0;ra=-1;mo--){var Rs=mo===-1?$i:oe[Lr[mo]];if(Rs&a){Rs===L&&ue(ds,S);break}}}if(ye.get(L))for(var ho=0;ho=0&&(_a=oe[Lr[_l]],_a&s);_l--);for(var yu=ao+1;yu=0&&oe[Lr[Le]]&(E|s);Le--)ue(Lr[Le],A);for(ul++;ul=0&&oe[Lr[kt]]&s;kt--)ue(Lr[kt],F);for(var Jt=ot+1;Jt=0;Wn--){var Ja=an[Wn].char;if(Ja===fa||Ja===_(M(yn))||b(M(Ja))===yn){Mi.push([an[Wn].seqIndex,Gn]),an.length=Wn;break}}}Mi.sort(function(yo,nu){return yo[0]-nu[0]});for(var oo=0;oo=0;so--){var In=Lr[so];if(oe[In]&ti){var va=oe[In]&Xr?T:x;Mo=va===hn?hn:va;break}}}if(Mo){if(oe[Lr[Io]]=oe[Lr[ps]]=Mo,Mo!==hn){for(var vs=Io+1;vs=0;xu--)if(oe[Lr[xu]]&s)Ol=xu;else{ru=oe[Lr[xu]]&Xr?T:x;break}for(var _u=Tn,dc=Ks+1;dc=0&&f(Ce[Ss])&l;Ss--)ee[Ss]=re.level}}return{levels:ee,paragraphs:xe};function iu(yo,nu){for(var Zo=yo;Zo=ee&&f(Ce[re])&l;re--)xe[re]=ue.level;for(var pe=ue.level,we=1/0,Fe=0;Fepe&&(pe=Se),Se=we;ke--)for(var _e=0;_e=ke){for(var Ie=_e;_e+1=ke;)_e++;_e>Ie&&ye.push([Ie+ee,_e+ee])}}}),ye}function ce(Ce,be,he,oe){var Ee=ge(Ce,be,he,oe),ye=[].concat(Ce);return Ee.forEach(function(ue,ee){ye[ee]=(be.levels[ue]&1?G(Ce[ue]):null)||Ce[ue]}),ye.join("")}function ge(Ce,be,he,oe){for(var Ee=te(Ce,be,he,oe),ye=[],ue=0;ue=0;i--){let n=fne.getBidiCharTypeName(e[i].text[0]);Emr.has(n)?(e[i].level=t,r=!0):r&&Smr.has(n)?e[i].level=t:r=!1}}function Dmr(e,t){let r=t,i=1/0;for(let{level:a}of e)a>r&&(r=a),(a|1)=i;a--)for(let o=0;o=a;)s++;for(let l=o,u=s;lt>=n.start&&t<=n.end))==null?void 0:r.level)!=null?i:0}function Pmr(e,t,r,i,n){let a=kmr(e,t,i,n);Cmr(a,r);let o="",s=[];for(let l of Dmr(a,r)){if(Mmr.test(l.text))continue;let u=Fmr(l);o+=u,s.push(...Array(u.length).fill(l.index))}return{text:o,sourceIndices:s}}function Imr(e,t){let r=t.filter(a=>a>0&&aa-o),n=[];for(let a=0;a+1n.start))).map(([n,a])=>Pmr(e,r,Lmr(i,n),n,a))}function Rmr(e,t){return Uit(e,t).map(r=>r.text)}function zmr(e,t,r){return Uit(e,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=t[n])!=null?a:0})])}function Bmr(e,t,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return qmr(e,n,t);throw Error("Expected varint not more than 10 bytes")}function qmr(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function Omr(e,t,r){let i="",n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function Nmr(e,t,r){e===1&&r.readMessage(Umr,t)}function Umr(e,t,r){if(e===3){let{id:i,bitmap:n,width:a,height:o,left:s,top:l,advance:u}=r.readMessage(Vmr,{});t.push({id:i,bitmap:new UB({width:a+6,height:o+6},n),metrics:{width:a,height:o,left:s,top:l,advance:u}})}}function Vmr(e,t,r){e===1?t.id=r.readVarint():e===2?t.bitmap=r.readBytes():e===3?t.width=r.readVarint():e===4?t.height=r.readVarint():e===5?t.left=r.readSVarint():e===6?t.top=r.readSVarint():e===7&&(t.advance=r.readVarint())}function Git(e){return new Vit(e).readFields(Nmr,[])}function i8(e){return typeof(e==null?void 0:e.renderWithWebGL)=="function"}function Hit(e){let{userImage:t}=e;return!(t!=null&&t.render)||!t.render()?!1:(i8(t.data)||e.data.replace(new Uint8Array(t.data.buffer)),!0)}function hne(e){let t=0,r=0;for(let o of e)t+=o.w*o.h,r=Math.max(r,o.w);e.sort((o,s)=>s.h-o.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 o of e)for(let s=i.length-1;s>=0;s--){let l=i[s];if(!(o.w>l.w||o.h>l.h)){if(o.x=l.x,o.y=l.y,a=Math.max(a,o.y+o.h),n=Math.max(n,o.x+o.w),o.w===l.w&&o.h===l.h){let u=i.pop();u&&s=r;a--)t.push(a);r=i+1}else{for(let a=r;ae.toCodeUnitIndex(a)),i=tB.isParsed()?tB:null;if(e.sections.length===1)return i?i.processBidirectionalText(e.toString(),r).map(a=>net(a,e.sections,[...a].map(()=>0))):Rmr(e.toString(),r).map(a=>rie([...a],e.sections,[...a].map(()=>0)));let n=Wmr(e);return i?i.processStyledBidirectionalText(e.text,n,r).map(([a,o])=>net(a,e.sections,o)):zmr(e.text,n,r).map(([a,o])=>{let s=[...a];return rie(s,e.sections,$it(s).map(l=>{var u;return(u=o[l])!=null?u:0}))})}function rie(e,t,r){var a;let i=new cne(e.join(""),t,[]),n=0;for(let o of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...o].length;return i}function $it(e){let t=[],r=0;for(let i of e)t.push(r),r+=i.length;return t}function net(e,t,r){let i=[...e],n=$it(i),a=$mr(i);return rie(a.map(o=>i[o]),t,a.map(o=>{var s;return(s=r[n[o]])!=null?s:0}))}function kz(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p){let v=cne.fromFeature(e,n);f===2&&v.verticalizePunctuation();let m=v.determineLineBreaks(u,a,t,i,d),g=Oit(v.text)?Ymr(v,m):jmr(v,m),w=[],b={positionedLines:w,text:v.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return iyr(b,t,r,i,g,o,s,l,f,u,h,p),!Hmr(w)&&b}function n8(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function Xmr(e,t,r){let i=t.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=t.getMaxImageSize(e),o=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:o}}function Wit(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function Zmr(e,t,r,i){var a;if(e!=null&&e.rect)return e;let n=(a=t[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function Kmr(e,t,r){return!(e===1||!t&&!$B(r)||t&&(une(r)||Bit(r)))}function Oz(e){return new RegExp("\\p{Nd}","u").test(String.fromCodePoint(e))}function Yit(e){return new RegExp("\\p{Lu}","u").test(String.fromCodePoint(e))}function Jmr(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function Qmr(e){let t=e.some(Oz)&&e.every(i=>Oz(i)||Jmr(i)),r=e.length<=3&&e.every(i=>Yit(i)||Oz(i));return t||r}function eyr(e){return(Oz(e)||Yit(e))&&!Bit(e)}function tyr(e,t){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map($B),n=a=>!i[a]&&!une(r[a])&&!("imageName"in e.getSection(a));for(let a=0;au){let h=Math.ceil(i/u);r*=h/n,n=h}return{x1:t,y1:r,x2:t+i,y2:r+n}}function aet(e,t,r,i,n,a){let o=e.image,s;if(o.content){let m=o.content,g=o.pixelRatio||1;s=[m[0]/g,m[1]/g,o.displaySize[0]-m[2]/g,o.displaySize[1]-m[3]/g]}let l=t.left*a,u=t.right*a,c,f,h,d;r==="width"||r==="both"?(d=n[0]+l-i[3],f=n[0]+u+i[1]):(d=n[0]+(l+u-o.displaySize[0])/2,f=d+o.displaySize[0]);let p=t.top*a,v=t.bottom*a;return r==="height"||r==="both"?(c=n[1]+p-i[0],h=n[1]+v+i[2]):(c=n[1]+(p+v-o.displaySize[1])/2,h=c+o.displaySize[1]),{image:o,top:c,right:f,bottom:h,left:d,collisionPadding:s}}function set(e,t){let{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Co(e+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=uyr(r.zoomStops,e);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=cyr(r),n=r.evaluate(new Co(e+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function uyr(e,t){let r=0;for(;re.evaluate(new Co(t===-1/0?e.zoomStops[1]-1:t)))}function YB(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return e.kind==="source"?i/128:e.kind==="composite"?$s.number(i/128,n/128,r):t}function a8(e,t){let r=0,i=0;return e.kind==="constant"?i=e.layoutSize:e.kind==="camera"?i=fyr(e,t):e.kind==="composite"&&(r=hyr(e,t)),{uSizeT:r,uSize:i}}function fyr({zoomStops:e,sizes:t,layoutSize:r,interpolationType:i},n){let a=e.length-1;for(;a>0&&e[a]>n;)a--;let o=Math.min(a+1,e.length-1),s=i?Jn(Zd.interpolationFactor(i,n,e[a],e[o]),0,1):0;return Math.min($s.number(t[a],t[o],s),r)}function hyr({interpolationType:e,minZoom:t,maxZoom:r},i){return e?Jn(Zd.interpolationFactor(e,i,t,r),0,1):0}function Kit(e,t,r,i,n){if(t.segment===void 0||r===0)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],u=0;for(;si;)u-=l.shift().angleDelta;if(u>n)return!1;o++,s+=f.dist(h)}return!0}function Jit(e){let t=0;for(let r=0;ru){let p=(u-l)/d,v=new bT($s.number(f.x,h.x,p),$s.number(f.y,h.y,p),h.angleTo(f),c);return v._round(),!o||Kit(e,v,s,o,t)?v:void 0}l+=d}}function pyr(e,t,r,i,n,a,o,s,l){let u=Qit(i,a,o),c=ent(i,n),f=c*o,h=e[0].x===0||e[0].x===l||e[0].y===0||e[0].y===l;t-f=0&&_=0&&M=0&&h+u<=c){let x=new bT(_,M,w,p);x._round(),(!i||Kit(e,x,a,i,n))&&d.push(x)}}f+=g}return!s&&!d.length&&!o&&(d=tnt(e,f/2,r,i,n,a,o,!0,l)),d}function dne(e,t,r,i,n){let a=[];for(let o of e){let s;for(let l=0;l=i&&c.x>=i)&&(u.x>=i?u=new tr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round():c.x>=i&&(c=new tr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round()),!(u.y>=n&&c.y>=n)&&(u.y>=n?u=new tr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round():c.y>=n&&(c=new tr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round()),(!s||!u.equals(s[s.length-1]))&&(s=[u],a.push(s)),s.push(c)))))}}return a}function uet(e,t,r,i){let n=[],a=e.image,o=a.pixelRatio,s=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=a.stretchX||[[0,s]],f=a.stretchY||[[0,l]],h=(D,F)=>D+F[1]-F[0],d=c.reduce(h,0),p=f.reduce(h,0),v=s-d,m=l-p,g=0,w=d,b=0,_=p,M=0,x=v,T=0,A=m;if(a.content&&i){let D=a.content,F=D[2]-D[0],P=D[3]-D[1];(a.textFitWidth||a.textFitHeight)&&(u=Xit(e)),g=Cz(c,0,D[0]),b=Cz(f,0,D[1]),w=Cz(c,D[0],D[2]),_=Cz(f,D[1],D[3]),M=D[0]-g,T=D[1]-b,x=F-w,A=P-_}let y=u.x1,E=u.y1,S=u.x2-y,C=u.y2-E,k=(D,F,P,R)=>{let L=Dz(D.stretch-g,w,S,y),I=Fz(D.fixed-M,x,D.stretch,d),B=Dz(F.stretch-b,_,C,E),O=Fz(F.fixed-T,A,F.stretch,p),$=Dz(P.stretch-g,w,S,y),Y=Fz(P.fixed-M,x,P.stretch,d),K=Dz(R.stretch-b,_,C,E),j=Fz(R.fixed-T,A,R.stretch,p),q=new tr(L,B),J=new tr($,B),U=new tr($,K),V=new tr(L,K),X=new tr(I/o,O/o),H=new tr(Y/o,j/o),G=t*Math.PI/180;if(G){let Ce=Math.sin(G),be=Math.cos(G),he=[be,-Ce,Ce,be];q._matMult(he),J._matMult(he),V._matMult(he),U._matMult(he)}let Q=D.stretch+D.fixed,te=P.stretch+P.fixed,ce=F.stretch+F.fixed,ge=R.stretch+R.fixed;return{tl:q,tr:J,bl:V,br:U,tex:{x:a.paddedRect.x+1+Q,y:a.paddedRect.y+1+ce,w:te-Q,h:ge-ce},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:X,pixelOffsetBR:H,minFontScaleX:x/o/S,minFontScaleY:A/o/C,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(k({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));else{let D=cet(c,v,d),F=cet(f,m,p);for(let P=0;Pf.d||!f.d)&&(f=h),!(h.max-f.d<=t)&&(n=h.h/2,a.push(new dT(h.p.x-n,h.p.y-n,n,e)),a.push(new dT(h.p.x+n,h.p.y-n,n,e)),a.push(new dT(h.p.x-n,h.p.y+n,n,e)),a.push(new dT(h.p.x+n,h.p.y+n,n,e)))}return c.d>0&&f.d-c.d<=t?c.p:f.p}function yyr(e,t){return t.max-e.max}function xyr(e,t){let r=!1,i=1/0;for(let n of t)for(let a=0,o=n.length,s=o-1;ae.y!=u.y>e.y&&e.x<(u.x-l.x)*(e.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,iit(e,l,u))}return(r?1:-1)*Math.sqrt(i)}function _yr(e){let t=0,r=0,i=0,n=e[0];for(let a=0,o=n.length,s=o-1;ah*24);c.startsWith("top")?f[1]-=7:c.startsWith("bottom")&&(f[1]+=7),l[u+1]=f}return new X1(l)}let a=i.get("text-variable-anchor");if(a){let s;s=e._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(t,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(t,{},r)*24,pne];let l=[];for(let u of a)l.push(u,rnt(u,s));return new X1(l)}return null}function byr(e){var c,f;e.bucket.createArrays();let t=512*e.bucket.overscaling;e.bucket.tilePixelRatio=zr/t,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let r=e.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new Co(e.bucket.zoom+1),e.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new Co(e.bucket.zoom+1),e.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new Co(18))};if(e.bucket.textSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new Co(h),e.canonical),n["text-size"].possiblyEvaluate(new Co(d),e.canonical)]}if(e.bucket.iconSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new Co(h),e.canonical),n["icon-size"].possiblyEvaluate(new Co(d),e.canonical)]}let o=i.get("text-line-height")*24,s=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let h of e.bucket.features){let d=i.get("text-font").evaluate(h,{},e.canonical).join(","),p=u.evaluate(h,{},e.canonical),v=a.layoutTextSize.evaluate(h,{},e.canonical),m=a.layoutIconSize.evaluate(h,{},e.canonical),g={horizontal:{},vertical:void 0},w=h.text,b=[0,0];if(w){let T=w.toString(),A=i.get("text-letter-spacing").evaluate(h,{},e.canonical)*24,y=ymr(T)?A:0,E=i.get("text-anchor").evaluate(h,{},e.canonical),S=int(r,h,e.canonical);if(!S){let F=i.get("text-radial-offset").evaluate(h,{},e.canonical);b=F?rnt(E,[F*24,pne]):i.get("text-offset").evaluate(h,{},e.canonical).map(P=>P*24)}let C=s?"center":i.get("text-justify").evaluate(h,{},e.canonical),k=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(h,{},e.canonical)*24:1/0,D=()=>{e.bucket.allowVerticalPlacement&&Qre(T)&&(g.vertical=kz(w,e.glyphMap,e.glyphPositions,e.imagePositions,d,k,o,E,"left",y,b,2,!0,v,p))};if(!s&&S){let F=new Set;if(C==="auto")for(let R=0;R{R.x<0||R.x>=8192||R.y<0||R.y>=8192||Ayr(e,R,P,r,i,n,k,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,g,[M,M,M,M],A,l,b,x,y,p,t,a,u,c,o)};if(E==="line")for(let P of dne(t.geometry,0,0,zr,zr)){let R=qb(P,D),L=pyr(R,_,T,r.vertical||v,i,24,w,e.overscaling,zr);for(let I of L){let B=v;(!B||!Myr(e,B.text,S,I))&&F(R,I)}}else if(E==="line-center"){for(let P of t.geometry)if(P.length>1){let R=qb(P,D),L=dyr(R,T,r.vertical||v,i,24,w);L&&F(R,L)}}else if(t.type==="Polygon")for(let P of AB(t.geometry,0)){let R=myr(P,16);F(qb(P[0],D,!0),new bT(R.x,R.y,0))}else if(t.type==="LineString")for(let P of t.geometry){let R=qb(P,D);F(R,new bT(R[0].x,R[0].y,0))}else if(t.type==="Point")for(let P of t.geometry)for(let R of P)F([R],new bT(R.x,R.y,0))}function Tyr(e,t){let r=e.length,i=t==null?void 0:t.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Ma(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(w=[128*p.compositeTextSizes[0].evaluate(o,{},v),128*p.compositeTextSizes[1].evaluate(o,{},v)],(w[0]>32640||w[1]>32640)&&Ma(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,w,s,a,o,c,t,u.lineStartIndex,u.lineLength,d,v,l);for(let b of f)h[b]=e.text.placedSymbolArray.length-1;return m.length*4}function nnt(e){for(let t in e)return e[t];return null}function Ayr(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A){let y=e.addToLineVertexArray(t,r),E=s.layout.get("symbol-height-offset").evaluate(_,{},T);E>e.maxHeightOffset&&(e.maxHeightOffset=E);let S,C,k,D,F=0,P=0,R=0,L=0,I=-1,B=-1,O={},$=(0,Ire.default)("");if(e.allowVerticalPlacement&&i.vertical){let be=s.layout.get("text-rotate").evaluate(_,{},T)+90,he=i.vertical;k=new Lz(l,t,u,c,f,he,h,d,p,be),o&&(D=new Lz(l,t,u,c,f,o,m,g,p,be))}if(n){let be=s.layout.get("icon-rotate").evaluate(_,{}),he=s.layout.get("icon-text-fit")!=="none",oe=uet(n,be,x,he),Ee=o?uet(o,be,x,he):void 0;C=new Lz(l,t,u,c,f,n,m,g,!1,be),F=oe.length*4;let ye=e.iconSizeData,ue=null;ye.kind==="source"?(ue=[128*s.layout.get("icon-size").evaluate(_,{})],ue[0]>32640&&Ma(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):ye.kind==="composite"&&(ue=[128*M.compositeIconSizes[0].evaluate(_,{},T),128*M.compositeIconSizes[1].evaluate(_,{},T)],(ue[0]>32640||ue[1]>32640)&&Ma(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,oe,ue,b,w,_,0,t,y.lineStartIndex,y.lineLength,-1,T,E),I=e.icon.placedSymbolArray.length-1,Ee&&(P=Ee.length*4,e.addSymbols(e.icon,Ee,ue,b,w,_,2,t,y.lineStartIndex,y.lineLength,-1,T,E),B=e.icon.placedSymbolArray.length-1)}let Y=Object.keys(i.horizontal);for(let be of Y){let he=i.horizontal[be];S||(S=($=(0,Ire.default)(he.text),new Lz(l,t,u,c,f,he,h,d,p,s.layout.get("text-rotate").evaluate(_,{},T))));let oe=he.positionedLines.length===1;if(R+=fet(e,t,he,a,s,p,_,v,E,y,i.vertical?1:3,oe?Y:[be],O,I,M,T),oe)break}i.vertical&&(L+=fet(e,t,i.vertical,a,s,p,_,v,E,y,2,["vertical"],O,B,M,T));let K=S?S.boxStartIndex:e.collisionBoxArray.length,j=S?S.boxEndIndex:e.collisionBoxArray.length,q=k?k.boxStartIndex:e.collisionBoxArray.length,J=k?k.boxEndIndex:e.collisionBoxArray.length,U=C?C.boxStartIndex:e.collisionBoxArray.length,V=C?C.boxEndIndex:e.collisionBoxArray.length,X=D?D.boxStartIndex:e.collisionBoxArray.length,H=D?D.boxEndIndex:e.collisionBoxArray.length,G=-1,Q=(be,he)=>be!=null&&be.circleDiameter?Math.max(be.circleDiameter,he):he;G=Q(S,G),G=Q(k,G),G=Q(C,G),G=Q(D,G);let te=+(G>-1);te&&(G*=A/24),e.glyphOffsetArray.length>=e.maxGlyphs&&Ma("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),_.sortKey!==void 0&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey);let ce=int(s,_,T),[ge,Ce]=Tyr(e.textAnchorOffsets,ce);e.symbolInstances.emplaceBack(t.x,t.y,O.right>=0?O.right:-1,O.center>=0?O.center:-1,O.left>=0?O.left:-1,O.vertical||-1,I,B,$,K,j,q,J,U,V,X,H,u,R,L,F,P,te,0,h,G,ge,Ce,E)}function Myr(e,t,r,i){let n=e.compareText;if(!(t in n))n[t]=[];else{let a=n[t];for(let o=a.length-1;o>=0;o--)if(i.dist(a[o])e&&i in e?String(e[i]):"")}function Iyr(e,t,r,i=1){var a;let n=(a=e.get("icon-padding").evaluate(t,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}function snt(e){let t=[],r=e.id;return r===void 0&&t.push(new Qr(`layers.${r}`,null,'missing required property "id"')),e.render===void 0&&t.push(new Qr(`layers.${r}`,null,'missing required method "render"')),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&t.push(new Qr(`layers.${r}`,null,'property "renderingMode" must be either "2d" or "3d"')),t}function ZB(e,t){if(e.type==="custom")return new Oyr(e,t);switch(e.type){case"background":return new qyr(e,t);case"circle":return new x1r(e,t);case"color-relief":return new L1r(e,t);case"fill":return new cgr(e,t);case"fill-extrusion":return new Cgr(e,t);case"heatmap":return new T1r(e,t);case"hillshade":return new E1r(e,t);case"line":return new Ggr(e,t);case"raster":return new Rvr(e,t);case"symbol":return new Pyr(e,t)}}function Vyr(e,t,r){return!(e<0||e>25||r<0||r>=2**e||t<0||t>=2**e)}function gne(e,t){let{x:r,y:i}=wo.fromLngLat(t);return!(e<0||e>25||i<0||i>=1||r<0||r>=1)}function Vb(e,t,r,i,n){e*=2,e<0&&(e=e*-1-1);let a=1<0;n--){let a=1<>>0;return((t&255)<<24|(t&65280)<<8|t>>>8&65280|t>>>24&255)>>>0}function Zyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n]=o>>>30&3}function Kyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(o&1)<<2)&7,r[n++]=o>>>1&7,r[n++]=o>>>4&7,r[n++]=o>>>7&7,r[n++]=o>>>10&7,r[n++]=o>>>13&7,r[n++]=o>>>16&7,r[n++]=o>>>19&7,r[n++]=o>>>22&7,r[n++]=o>>>25&7,r[n++]=o>>>28&7,r[n++]=(o>>>31|(s&3)<<1)&7,r[n++]=s>>>2&7,r[n++]=s>>>5&7,r[n++]=s>>>8&7,r[n++]=s>>>11&7,r[n++]=s>>>14&7,r[n++]=s>>>17&7,r[n++]=s>>>20&7,r[n++]=s>>>23&7,r[n++]=s>>>26&7,r[n]=s>>>29&7}function Jyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=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,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Qyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(o&7)<<2)&31,r[n++]=o>>>3&31,r[n++]=o>>>8&31,r[n++]=o>>>13&31,r[n++]=o>>>18&31,r[n++]=o>>>23&31,r[n++]=(o>>>28|(s&1)<<4)&31,r[n++]=s>>>1&31,r[n++]=s>>>6&31,r[n++]=s>>>11&31,r[n++]=s>>>16&31,r[n++]=s>>>21&31,r[n++]=s>>>26&31,r[n++]=(s>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function e2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(o&15)<<2)&63,r[n++]=o>>>4&63,r[n++]=o>>>10&63,r[n++]=o>>>16&63,r[n++]=o>>>22&63,r[n++]=(o>>>28|(s&3)<<4)&63,r[n++]=s>>>2&63,r[n++]=s>>>8&63,r[n++]=s>>>14&63,r[n++]=s>>>20&63,r[n++]=s>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(c&3)<<4)&63,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}function t2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(o&7)<<4)&127,r[n++]=o>>>3&127,r[n++]=o>>>10&127,r[n++]=o>>>17&127,r[n++]=o>>>24&127,r[n++]=(o>>>31|(s&63)<<1)&127,r[n++]=s>>>6&127,r[n++]=s>>>13&127,r[n++]=s>>>20&127,r[n++]=(s>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(c&1)<<6)&127,r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=(c>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n]=f>>>25&127}function r2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>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++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n]=h>>>24&255}function i2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(o&15)<<5)&511,r[n++]=o>>>4&511,r[n++]=o>>>13&511,r[n++]=o>>>22&511,r[n++]=(o>>>31|(s&255)<<1)&511,r[n++]=s>>>8&511,r[n++]=s>>>17&511,r[n++]=(s>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(c&3)<<7)&511,r[n++]=c>>>2&511,r[n++]=c>>>11&511,r[n++]=c>>>20&511,r[n++]=(c>>>29|(f&63)<<3)&511,r[n++]=f>>>6&511,r[n++]=f>>>15&511,r[n++]=(f>>>24|(h&1)<<8)&511,r[n++]=h>>>1&511,r[n++]=h>>>10&511,r[n++]=h>>>19&511,r[n++]=(h>>>28|(d&31)<<4)&511,r[n++]=d>>>5&511,r[n++]=d>>>14&511,r[n]=d>>>23&511}function n2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(o&255)<<2)&1023,r[n++]=o>>>8&1023,r[n++]=o>>>18&1023,r[n++]=(o>>>28|(s&63)<<4)&1023,r[n++]=s>>>6&1023,r[n++]=s>>>16&1023,r[n++]=(s>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=c>>>0&1023,r[n++]=c>>>10&1023,r[n++]=c>>>20&1023,r[n++]=(c>>>30|(f&255)<<2)&1023,r[n++]=f>>>8&1023,r[n++]=f>>>18&1023,r[n++]=(f>>>28|(h&63)<<4)&1023,r[n++]=h>>>6&1023,r[n++]=h>>>16&1023,r[n++]=(h>>>26|(d&15)<<6)&1023,r[n++]=d>>>4&1023,r[n++]=d>>>14&1023,r[n++]=(d>>>24|(p&3)<<8)&1023,r[n++]=p>>>2&1023,r[n++]=p>>>12&1023,r[n]=p>>>22&1023}function a2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(o&1)<<10)&2047,r[n++]=o>>>1&2047,r[n++]=o>>>12&2047,r[n++]=(o>>>23|(s&3)<<9)&2047,r[n++]=s>>>2&2047,r[n++]=s>>>13&2047,r[n++]=(s>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(c&31)<<6)&2047,r[n++]=c>>>5&2047,r[n++]=c>>>16&2047,r[n++]=(c>>>27|(f&63)<<5)&2047,r[n++]=f>>>6&2047,r[n++]=f>>>17&2047,r[n++]=(f>>>28|(h&127)<<4)&2047,r[n++]=h>>>7&2047,r[n++]=h>>>18&2047,r[n++]=(h>>>29|(d&255)<<3)&2047,r[n++]=d>>>8&2047,r[n++]=d>>>19&2047,r[n++]=(d>>>30|(p&511)<<2)&2047,r[n++]=p>>>9&2047,r[n++]=p>>>20&2047,r[n++]=(p>>>31|(v&1023)<<1)&2047,r[n++]=v>>>10&2047,r[n]=v>>>21&2047}function o2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(o&15)<<8)&4095,r[n++]=o>>>4&4095,r[n++]=o>>>16&4095,r[n++]=(o>>>28|(s&255)<<4)&4095,r[n++]=s>>>8&4095,r[n++]=s>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(c&255)<<4)&4095,r[n++]=c>>>8&4095,r[n++]=c>>>20&4095,r[n++]=f>>>0&4095,r[n++]=f>>>12&4095,r[n++]=(f>>>24|(h&15)<<8)&4095,r[n++]=h>>>4&4095,r[n++]=h>>>16&4095,r[n++]=(h>>>28|(d&255)<<4)&4095,r[n++]=d>>>8&4095,r[n++]=d>>>20&4095,r[n++]=p>>>0&4095,r[n++]=p>>>12&4095,r[n++]=(p>>>24|(v&15)<<8)&4095,r[n++]=v>>>4&4095,r[n++]=v>>>16&4095,r[n++]=(v>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function s2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0,g=e[t+12]>>>0,w=e[t+13]>>>0,b=e[t+14]>>>0,_=e[t+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=w>>>0&65535,r[n++]=w>>>16&65535,r[n++]=b>>>0&65535,r[n++]=b>>>16&65535,r[n++]=_>>>0&65535,r[n]=_>>>16&65535}function l2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0;r[n++]=s>>>0&1,r[n++]=s>>>1&1,r[n++]=s>>>2&1,r[n++]=s>>>3&1,r[n++]=s>>>4&1,r[n++]=s>>>5&1,r[n++]=s>>>6&1,r[n++]=s>>>7&1,r[n++]=s>>>8&1,r[n++]=s>>>9&1,r[n++]=s>>>10&1,r[n++]=s>>>11&1,r[n++]=s>>>12&1,r[n++]=s>>>13&1,r[n++]=s>>>14&1,r[n++]=s>>>15&1,r[n++]=s>>>16&1,r[n++]=s>>>17&1,r[n++]=s>>>18&1,r[n++]=s>>>19&1,r[n++]=s>>>20&1,r[n++]=s>>>21&1,r[n++]=s>>>22&1,r[n++]=s>>>23&1,r[n++]=s>>>24&1,r[n++]=s>>>25&1,r[n++]=s>>>26&1,r[n++]=s>>>27&1,r[n++]=s>>>28&1,r[n++]=s>>>29&1,r[n++]=s>>>30&1,r[n++]=s>>>31&1}}function u2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n++]=s>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function c2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0;r[n++]=s>>>0&7,r[n++]=s>>>3&7,r[n++]=s>>>6&7,r[n++]=s>>>9&7,r[n++]=s>>>12&7,r[n++]=s>>>15&7,r[n++]=s>>>18&7,r[n++]=s>>>21&7,r[n++]=s>>>24&7,r[n++]=s>>>27&7,r[n++]=(s>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function f2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0;r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=c>>>0&15,r[n++]=c>>>4&15,r[n++]=c>>>8&15,r[n++]=c>>>12&15,r[n++]=c>>>16&15,r[n++]=c>>>20&15,r[n++]=c>>>24&15,r[n++]=c>>>28&15}}function h2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0;r[n++]=s>>>0&31,r[n++]=s>>>5&31,r[n++]=s>>>10&31,r[n++]=s>>>15&31,r[n++]=s>>>20&31,r[n++]=s>>>25&31,r[n++]=(s>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(c&15)<<1)&31,r[n++]=c>>>4&31,r[n++]=c>>>9&31,r[n++]=c>>>14&31,r[n++]=c>>>19&31,r[n++]=c>>>24&31,r[n++]=(c>>>29|(f&3)<<3)&31,r[n++]=f>>>2&31,r[n++]=f>>>7&31,r[n++]=f>>>12&31,r[n++]=f>>>17&31,r[n++]=f>>>22&31,r[n++]=f>>>27&31}}function d2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0;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++]=(s>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=c>>>0&63,r[n++]=c>>>6&63,r[n++]=c>>>12&63,r[n++]=c>>>18&63,r[n++]=c>>>24&63,r[n++]=(c>>>30|(f&15)<<2)&63,r[n++]=f>>>4&63,r[n++]=f>>>10&63,r[n++]=f>>>16&63,r[n++]=f>>>22&63,r[n++]=(f>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n++]=h>>>26&63}}function p2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,d=e[a++]>>>0;r[n++]=s>>>0&127,r[n++]=s>>>7&127,r[n++]=s>>>14&127,r[n++]=s>>>21&127,r[n++]=(s>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(c&3)<<5)&127,r[n++]=c>>>2&127,r[n++]=c>>>9&127,r[n++]=c>>>16&127,r[n++]=c>>>23&127,r[n++]=(c>>>30|(f&31)<<2)&127,r[n++]=f>>>5&127,r[n++]=f>>>12&127,r[n++]=f>>>19&127,r[n++]=(f>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(d&15)<<3)&127,r[n++]=d>>>4&127,r[n++]=d>>>11&127,r[n++]=d>>>18&127,r[n++]=d>>>25&127}}function v2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,d=e[a++]>>>0,p=e[a++]>>>0;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++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255}}function g2r(e,t,r,i){let n=i,a=t;for(let o=0;o<128;o++){let s=e[a++]>>>0;r[n++]=s&65535,r[n++]=s>>>16&65535}}function m2r(e,t,r,i,n){let a=oie[n]>>>0,o=t,s=0,l=e[o]>>>0,u=i;for(let c=0;c<8;c++){for(let f=0;f<32;f++)if(s+n<=32){let h=l>>>s&a;r[u+f]=h|0,s+=n,s===32&&(s=0,o++,f!==31&&(l=e[o]>>>0))}else{let h=32-s,d=l>>>s;o++,l=e[o]>>>0;let p=n-h,v=-1>>>32-p>>>0,m=(d|(l&v)<>>0)}}function pnt(){let e=new Uint8Array(y2r);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 x2r(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let t=Math.max(16,e|0);return{encodedWords:new Uint32Array(t),decoderWorkspace:pnt()}}function _2r(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,t*2));return e.encodedWords=r,r}function b2r(e,t,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let s=0;s>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let s=i.byteContainerI32;(!s||s.buffer!==n.buffer||s.byteOffset!==n.byteOffset||s.length>>2)),s.set(e.subarray(t,t+a))}let o=r&3;if(o>0){let s=e[t+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function w2r(e,t,r){let i=e[t++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let o=e[t++]>>>0,s=Wyr(o),l=o*a+31>>>5;if(t+l>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${o}, streamWordIndex=${t}, needWords=${l}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=o}return t}function T2r(e,t,r,i,n){switch(n){case 1:l2r(e,t,r,i);break;case 2:u2r(e,t,r,i);break;case 3:c2r(e,t,r,i);break;case 4:f2r(e,t,r,i);break;case 5:h2r(e,t,r,i);break;case 6:d2r(e,t,r,i);break;case 7:p2r(e,t,r,i);break;case 8:v2r(e,t,r,i);break;case 16:g2r(e,t,r,i);break;default:m2r(e,t,r,i,n)}return t+(n<<3)|0}function A2r(e,t,r,i){if(r+2>t)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}}function M2r(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}}function S2r(e,t,r,i,n,a,o,s,l){let{maxBits:u,exceptionBitWidth:c,bytePosIn:f}=M2r(n,a,o,r,i,l);if(o=f,c===1){let m=1<v)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${p}, need ${i}, size=${v}) at block ${l}`);for(let m=0;m0&&(f=S2r(n,m,p,v,s,l,f,u,h))}if(c!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${c}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${e.length})`)}function k2r(e,t,r,i,n,a){let o=r|0,s=e[o]|0;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+1|0,u=o+s|0,c=e[u]>>>0,f=c+3>>>2,h=u+1,d=h+f;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${f}, pageStart=${o}, packedEnd=${u}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let p=b2r(e,h,c,a),v=c,m=w2r(e,d,a);return a.dataPointers.fill(0),E2r(e,o,l,u,t,i|0,n/256|0,p,v,a),m}function C2r(e,t,r,i,n,a){let o=i+Ane(n,256),s=i,l=r;for(;s!==o;){let u=Math.min(sie,o-s);l=k2r(e,t,l,s,u,a),s=s+u|0}return l}function D2r(e,t,r,i,n,a){if(a===0)return t;let o=0,s=t,l=t+r,u=n,c=n,f=n+a,h=0,d=0;for(;s>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(p&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-u}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==f)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`);return s}function F2r(e,t,r){let i=0,n=0,a=new Uint32Array(t),o=r!=null?r:pnt();if(e.length>0){let u=e[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=C2r(e,a,i,n,u,o),n=n+u|0}let s=e.length-i|0,l=t-n|0;return D2r(e,i,s,a,n,l),a}function L2r(e,t,r,i,n){switch(n){case 2:Zyr(e,t,r,i);return;case 3:Kyr(e,t,r,i);return;case 4:Jyr(e,t,r,i);return;case 5:Qyr(e,t,r,i);return;case 6:e2r(e,t,r,i);return;case 7:t2r(e,t,r,i);return;case 8:r2r(e,t,r,i);return;case 9:i2r(e,t,r,i);return;case 10:n2r(e,t,r,i);return;case 11:a2r(e,t,r,i);return;case 12:o2r(e,t,r,i);return;case 16:s2r(e,t,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=e[t+u|0]|0;return}let a=oie[n]>>>0,o=t,s=0,l=e[o]>>>0;for(let u=0;u<32;u++)if(s+n<=32){let c=l>>>s&a;r[i+u]=c|0,s+=n,s===32&&(s=0,o++,u!==31&&(l=e[o]>>>0))}else{let c=32-s,f=l>>>s;o++,l=e[o]>>>0;let h=oie[n-c]>>>0,d=(f|(l&h)<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 s=e.byteOffset+t;if(s&3)for(let l=0;l=64)throw Error("Varint too long")}return t.set(n),r}function R2r(e,t,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=t[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function q2r(e,t,r,i){return O2r(e,t,r,i,x2r(r>>>2))}function O2r(e,t,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let o=r>>>2,s=_2r(n,o);P2r(e,a,r,s);let l=F2r(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}function Na(e){return e>>>1^-(e&1)}function lf(e){return e>>BigInt(1)^-(e&BigInt(1))}function $2(e){return e%2==1?(e+1)/-2:e/2}function N2r(e){let t=new Int32Array(e.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=e[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return t}function get(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,lf(e[0]));for(let r=1;r>>0,t[1]=Na(e[1])>>>0;for(let r=2;r>>0,t[r+1]=t[r-1]+Na(e[r+1])>>>0;return t}function txr(e,t,r,i){let n=gnt(e,t,r,i);return new Uint32Array(n)}function rxr(e){return e[1]}function ixr(e){return Na(e[1])}function nxr(e){if(e.length===2){let t=Na(e[1]);return[t,t]}return[Na(e[2]),Na(e[3])]}function axr(e){return e[1]}function oxr(e){return lf(e[1])}function sxr(e){if(e.length===2){let t=lf(e[1]);return[t,t]}return[lf(e[2]),lf(e[3])]}function Hs(e,t){let r=vxr(e,t);return r.logicalLevelTechnique1===da.MORTON?dxr(r,e,t):(da.RLE===r.logicalLevelTechnique1||da.RLE===r.logicalLevelTechnique2)&&Kd.NONE!==r.physicalLevelTechnique?pxr(r,e,t):r}function dxr(e,t,r){let i=cf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function pxr(e,t,r){let i=cf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function vxr(e,t){let r=e[t.get()],i=lxr[r>>4],n={};switch(i){case pu.DATA:n={dictionaryType:cxr[r&15]};break;case pu.OFFSET:n={offsetType:fxr[r&15]};break;case pu.LENGTH:n={lengthType:hxr[r&15]}}t.increment();let a=e[t.get()],o=met[a>>5],s=met[a>>2&7],l=uxr[a&3];t.increment();let u=cf(e,t,2),c=u[0],f=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:c,byteLength:f,decompressedCount:c}}function i3(e,t,r){if(!t)return e;let i=t.size(),n=e.constructor,a=new n(i),o=0;for(let s=0;s=o);){let s=e[i.increment()];if(s<=127){let l=s+3,u=e[i.increment()],c=Math.min(a+l,t);n.fill(u,a,c),a=c}else{let l=256-s;for(let u=0;u=12?_xr.decode(e.subarray(t,r)):bxr(e,t,r)}function bxr(e,t,r){let i="",n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function iB(e,t,r,i,n){return Sxr(GT(e,t,r),r,i,n)}function sf(e,t,r,i,n){return Exr(GT(e,t,r),r,i,n)}function W2(e,t,r){return Cxr(GT(e,t,r),r)}function GT(e,t,r){let i=r.physicalLevelTechnique;switch(i){case Kd.FAST_PFOR:return q2r(e,r.numValues,r.byteLength,t);case Kd.VARINT:return cf(e,t,r.numValues);case Kd.NONE:return yxr(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function f8(e,t,r){let i=r.physicalLevelTechnique;switch(i){case Kd.VARINT:return Mne(e,t,r.numValues);case Kd.NONE:return xxr(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function wxr(e,t,r){let i=GT(e,t,r);return i.length===1?Na(i[0]):ixr(i)}function kne(e,t,r){let i=GT(e,t,r);return i.length===1?r.logicalLevelTechnique1===da.DELTA?Na(i[0]):i[0]:rxr(i)}function _nt(e,t,r){return nxr(GT(e,t,r))}function bnt(e,t,r){return sxr(Mne(e,t,r.numValues))}function wnt(e,t,r,i){return Ant(f8(e,t,r),r,i)}function Cne(e,t,r,i){return Mnt(f8(e,t,r),r,i)}function Txr(e,t,r,i){let n=Axr(e,t,r,!1);return i?i3(n,i,0):n}function Axr(e,t,r,i){if(r.physicalLevelTechnique===Kd.VARINT)return kxr(R2r(e,t,r.numValues),r,i);let n=f8(e,t,r),a=i?Ant(n,r):Mnt(n,r);return Float64Array.from(a,Number)}function Mxr(e,t,r){let i=f8(e,t,r);return i.length===1?lf(i[0]):oxr(i)}function Tnt(e,t,r){let i=f8(e,t,r);return i.length===1?r.logicalLevelTechnique1===da.DELTA?lf(i[0]):i[0]:axr(i)}function Sxr(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let a=t;if(!i)return J2r(e,a.runs,a.numRleValues);e=lie(e,a.runs,a.numRleValues),n=det(e)}else n=det(e);break;case da.RLE:n=H2r(e,t.runs,t.numRleValues);break;case da.MORTON:Sne(e),n=new Int32Array(e);break;case da.COMPONENTWISE_DELTA:if(r&&!i)return gnt(e,r.scale,r.min,r.max);n=Y2r(e);break;case da.NONE:n=N2r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?i3(n,i,0):n}function Exr(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let a=t;n=vet(lie(e,a.runs,a.numRleValues))}else n=vet(e);break;case da.RLE:n=lie(e,t.runs,t.numRleValues);break;case da.MORTON:Sne(e),n=e;break;case da.COMPONENTWISE_DELTA:n=r&&!i?txr(e,r.scale,r.min,r.max):exr(e);break;case da.NONE:n=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?i3(n,i,0):n}function Ant(e,t,r){let i;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let n=t;if(!r)return Q2r(e,n.runs,n.numRleValues);e=uie(e,n.runs,n.numRleValues),i=pet(e)}else i=pet(e);break;case da.RLE:i=j2r(e,t.runs,t.numRleValues);break;case da.NONE:i=U2r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?i3(i,r,BigInt(0)):i}function Mnt(e,t,r){let i;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let n=t;i=get(uie(e,n.runs,n.numRleValues))}else i=get(e);break;case da.RLE:i=uie(e,t.runs,t.numRleValues);break;case da.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?i3(i,r,BigInt(0)):i}function kxr(e,t,r){switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let i=t;e=vnt(e,i.runs,i.numRleValues)}return G2r(e),e;case da.RLE:return Fxr(e,t,r);case da.NONE:return r&&V2r(e),e;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}}function Cxr(e,t){if(t.logicalLevelTechnique1===da.DELTA&&t.logicalLevelTechnique2===da.NONE)return X2r(e);if(t.logicalLevelTechnique1===da.RLE&&t.logicalLevelTechnique2===da.NONE){let r=t;return K2r(e,r.runs,r.numRleValues)}if(t.logicalLevelTechnique1===da.NONE&&t.logicalLevelTechnique2===da.NONE){W2r(e);let r=new Uint32Array(t.numValues+1);return r[0]=0,r.set(e,1),r}if(t.logicalLevelTechnique1===da.DELTA&&t.logicalLevelTechnique2===da.RLE){let r=t,i=Z2r(e,r.runs,r.numRleValues);return Sne(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function JB(e,t,r,i,n="int32"){let a=e.logicalLevelTechnique1;if(a===da.RLE)return e.runs===1?Gs.CONST:Gs.FLAT;if(a!==da.DELTA||e.logicalLevelTechnique2!==da.RLE)return e.numValues===1?Gs.CONST:Gs.FLAT;let o=t instanceof bv?t.size():t,s=e;if(s.numRleValues!==o)return Gs.FLAT;if(s.runs===1)return Gs.SEQUENCE;if(s.runs!==2)return e.numValues===1?Gs.CONST:Gs.FLAT;let l=i.get();if(e.physicalLevelTechnique===Kd.VARINT)return Dxr(r,i,n)?Gs.SEQUENCE:e.numValues===1?Gs.CONST:Gs.FLAT;let u=i.get(),c=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),c[2]===2&&c[3]===2?Gs.SEQUENCE:e.numValues===1?Gs.CONST:Gs.FLAT}function Dxr(e,t,r){let i=new hnt(t.get());if(r==="int64"){let a=Mne(e,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=cf(e,i,4);return n[2]===2&&n[3]===2}function Fxr(e,t,r){return r?$2r(e,t.runs,t.numRleValues):vnt(e,t.runs,t.numRleValues)}function Dne(e,t,r){return{x:yet(e,t)-r,y:yet(e>>1,t)-r}}function yet(e,t){let r=0;for(let i=0;i>i;return r}function Pxr(e){let t=Array(e.numGeometries),r=1,i=1,n=1,a=0,o=0,s=0,l=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,f=u.partOffsets,h=u.ringOffsets,d=e.vertexOffsets,p=!d||d.length===0,v=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let g=0;g[M]),r+=b,i+=b}break;case uf.LINESTRING:{let b;v?(b=h[i]-h[i-1],i++):b=f[r]-f[r-1],r++;let _;p?(_=lT(m,o,b,!1),o+=b*2):(_=Rb(e.vertexBufferType,m,d,s,b,!1,l),s+=b),t[a++]=[_],c&&n++}break;case uf.POLYGON:{let b=f[r]-f[r-1];r++;let _=Array(b-1),M,x=h[i]-h[i-1];if(i++,p){M=lT(m,o,x,!0),o+=x*2;for(let T=0;T<_.length;T++)x=h[i]-h[i-1],i++,_[T]=lT(m,o,x,!0),o+=x*2}else{M=Rb(e.vertexBufferType,m,d,s,x,!0,l),s+=x;for(let T=0;T<_.length;T++)x=h[i]-h[i-1],i++,_[T]=Rb(e.vertexBufferType,m,d,s,x,!0,l),s+=x}t[a++]=[M].concat(_),c&&n++}break;case uf.MULTILINESTRING:{let b=c[n]-c[n-1];n++;let _=Array(b);for(let M=0;Mr?t[a++]:1);return i}function bet(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;l0;)n[a++]=e[u++]}}return n}function Rnt(e,t,r,i,n){var d,p;let a,o,s,l,u,c=n,f,h;for(let v=0;v1&&!d.nullable||p===1&&d.nullable)throw Error(`The number of streams for the child field ${d.name} does not match its nullability. nullibilty: ${d.nullable}, numStreams: ${p}`);let m;if(d.nullable){let w=Hs(e,t);m=new bv(VT(e,w.numValues,w.byteLength,t),w.numValues)}let g=sf(e,t,Hs(e,t),void 0,m);if(s){if(!o)throw Error(`Incomplete shared FSST dictionary for column "${v}"`);c[h++]=new Int(v,g,n,a,o,s,m,f)}else c[h++]=new wT(v,g,n,a,m)}return c}function Jxr(e,t,r,i){let n=Qxr(r);if(i===0)return n.map(c=>new Tet(c,[]));let a=e_r(e,t,i),o=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,s=[],l=0,u=0;for(let c=0;c{var i;return e.name+((i=r.name)!=null?i:"")})}function e_r(e,t,r){let i=e[t.get()];t.add(1);let n=sf(e,t,Hs(e,t)),a=r-1,o=[];i&Tm.STRING&&(a-=t_r(e,t,o)),a-=r_r(e,t,i,o),a-=i_r(e,t,i,o);let s,l=0;if(i&Tm.PRESENCE){let c=n_r(e,t);s=c.value,l=c.count,a--}let u=new Uint32Array;if(a>0&&(u=sf(e,t,Hs(e,t)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:o,presentStream:s,presentCount:l,flattenedValues:u}}function t_r(e,t,r){let i=e[t.get()];t.add(1);let n=Rnt("",e,t,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let d=Array(r),p=i,v=n;for(let w=0;wo.length)throw Error("Map value stream underflow while decoding feature payload");let _=o_r(o,v,b,l);d[w]=_.value,v=_.nextIndex}let m=0;for(let w=i;w=r)throw Error("Unexpected end of map value stream");let n=e[t];if(n===Ob.FALSE)return{value:!1,nextIndex:t+1};if(n===Ob.TRUE)return{value:!0,nextIndex:t+1};if(n===Ob.START_MAP){let a=Aet(e,t,r);return{value:znt(e,t+2,a,i).value,nextIndex:a}}if(n===Ob.START_LIST){let a=Aet(e,t,r),o=[],s=t+2;for(;s=r)throw Error("Missing length for nested map/list payload");let i=e[t+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=t+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Bnt(e,t){let r=e-Ob.COUNT;if(r<0||r>=t.length)throw Error(`Scalar dictionary index out of range: ${e}`);return t[r]}function gT(e,t){for(let r of t)e.push(r)}function s_r(e,t,r,i,n,a){var o;return r.type==="scalarType"?a&&!a.has(r.name)?(mnt(i,e,t),null):l_r(i,e,t,n,r.scalarType,r):((o=r.complexType)==null?void 0:o.physicalType)===Z2.MAP?Jxr(e,t,r,i):i===0?null:Kxr(e,t,r,a)}function l_r(e,t,r,i,n,a){var l;let o;if(e===0)return null;if(a.nullable){let u=Hs(t,r),c=u.numValues,f=r.get(),h=VT(t,c,u.byteLength,r);r.set(f+u.byteLength),o=new bv(h,u.numValues)}let s=o!=null?o:i;switch(n.physicalType){case go.UINT_32:case go.INT_32:return d_r(t,r,a,n,s);case go.STRING:{let u=a.nullable?e-1:e;return(l=Rnt(a.name,t,r,u,o))!=null?l:null}case go.BOOLEAN:return u_r(t,r,a,i,s);case go.UINT_64:case go.INT_64:return h_r(t,r,a,s,n);case go.FLOAT:return c_r(t,r,a,s);case go.DOUBLE:return f_r(t,r,a,s);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function u_r(e,t,r,i,n){let a=Hs(e,t),o=a.numValues,s=t.get(),l=h8(n)?n:void 0,u=VT(e,o,a.byteLength,t,l);t.set(s+a.byteLength);let c=new bv(u,o);return new Hxr(r.name,c,n)}function c_r(e,t,r,i){let n=Hs(e,t),a=h8(i)?i:void 0,o=ynt(e,t,n.numValues,a);return new jxr(r.name,o,i)}function f_r(e,t,r,i){let n=Hs(e,t),a=h8(i)?i:void 0,o=xnt(e,t,n.numValues,a);return new _ne(r.name,o,i)}function h_r(e,t,r,i,n){let a=Hs(e,t),o=JB(a,i,e,t,"int64"),s=n.physicalType===go.INT_64;if(o===Gs.FLAT){let u=h8(i)?i:void 0,c=s?wnt(e,t,a,u):Cne(e,t,a,u);return new Snt(r.name,c,i)}if(o===Gs.SEQUENCE){let u=bnt(e,t,a);return new Ent(r.name,u[0],u[1],a.numRleValues,s)}let l=s?Mxr(e,t,a):Tnt(e,t,a);return new Pnt(r.name,l,i,s)}function d_r(e,t,r,i,n){let a=Hs(e,t),o=JB(a,n,e,t),s=i.physicalType===go.INT_32;if(o===Gs.FLAT){let u=h8(n)?n:void 0,c=s?iB(e,t,a,void 0,u):sf(e,t,a,void 0,u);return new xne(r.name,c,n)}if(o===Gs.SEQUENCE){let u=_nt(e,t,a);return new bne(r.name,u[0],u[1],a.numRleValues,s)}let l=s?wxr(e,t,a):kne(e,t,a);return new wne(r.name,l,n,s)}function h8(e){return e instanceof bv}function qnt(e){switch(e){case sc.ID:case sc.ID|sc.ID_NULLABLE:case sc.ID|sc.ID_LONG:case sc.ID|sc.ID_LONG|sc.ID_NULLABLE:return{nullable:(e&sc.ID_NULLABLE)!==0,columnScope:pk.FEATURE,type:"scalarType",scalarType:{longID:(e&sc.ID_LONG)!==0,type:"logicalType",logicalType:fnt.ID}};case sc.GEOMETRY:return{nullable:!1,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.GEOMETRY,children:[]}};case sc.STRUCT:return{nullable:!1,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.STRUCT,children:[]}};case sc.MAP:return{nullable:!0,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.MAP,children:[]}};default:return y_r(e)}}function p_r(e){return e>=sc.SCALAR_BASE}function Ont(e){return e===sc.STRUCT||e===sc.MAP}function v_r(e){if(e.type==="scalarType"){let t=e.scalarType;if(t.type==="physicalType")switch(t.physicalType){case go.BOOLEAN:case go.INT_8:case go.UINT_8:case go.INT_32:case go.UINT_32:case go.INT_64:case go.UINT_64:case go.FLOAT:case go.DOUBLE:return!1;case go.STRING:return!0;default:return!1}if(t.type==="logicalType")return!1}else if(e.type==="complexType"){let t=e.complexType;if(t.type==="physicalType")switch(t.physicalType){case Z2.GEOMETRY:case Z2.STRUCT:case Z2.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function g_r(e){var t;return e.type==="scalarType"&&((t=e.scalarType)==null?void 0:t.type)==="logicalType"&&e.scalarType.logicalType===fnt.ID}function m_r(e){var t;return e.type==="complexType"&&((t=e.complexType)==null?void 0:t.type)==="physicalType"&&e.complexType.physicalType===Z2.GEOMETRY}function y_r(e){let t;switch(e){case 10:case 11:t=go.BOOLEAN;break;case 12:case 13:t=go.INT_8;break;case 14:case 15:t=go.UINT_8;break;case 16:case 17:t=go.INT_32;break;case 18:case 19:t=go.UINT_32;break;case 20:case 21:t=go.INT_64;break;case 22:case 23:t=go.UINT_64;break;case 24:case 25:t=go.FLOAT;break;case 26:case 27:t=go.DOUBLE;break;case 28:case 29:t=go.STRING;break;default:return null}return{nullable:!!(e&1),columnScope:pk.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:t}}}function Pne(e,t){let r=cf(e,t,1)[0];if(r===0)return"";let i=t.get(),n=i+r,a=e.subarray(i,n);return t.add(r),x_r.decode(a)}function __r(e){let t=e.name,r=e.nullable;return e.type==="scalarType"?{type:"scalarField",scalarField:e.scalarType,name:t,nullable:r}:{type:"complexField",complexField:e.complexType,name:t,nullable:r}}function Nnt(e,t){let r=cf(e,t,1)[0]>>>0,i=r>=sc.SCALAR_BASE?qnt(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=ma(fn({},i),{name:Pne(e,t)});if(n.type==="complexType"&&Ont(r)){let a=n.complexType,o=cf(e,t,1)[0]>>>0;a.children=Array(o);for(let s=0;s>>0,i=qnt(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Met}`);let n;if(p_r(r))n=Pne(e,t);else if(r>>0,s=a.complexType;s.children=Array(o);for(let l=0;l>>0,a=cf(e,t,1)[0]>>>0;i.columns=Array(a);for(let o=0;o>>0,o=i.get()+a;if(o>e.length)throw Error(`Block overruns tile: ${o} > ${e.length}`);let s=cf(e,i,1)[0]>>>0;if(s!==1&&s!==2){i.set(o);continue}let[l,u]=w_r(e,i),c=l.featureTables[0],f=null,h=null,d=[],p=0;for(let m of c.columns){let g=m.name;if(g_r(m)){let w=null;if(m.nullable){let _=Hs(e,i),M=i.get(),x=VT(e,_.numValues,_.byteLength,i);i.set(M+_.byteLength),w=new bv(x,_.numValues)}let b=Hs(e,i);p=w?w.size():b.decompressedCount,f=A_r(e,m,i,g,b,w!=null?w:p,r)}else if(m_r(m)){let w=cf(e,i,1)[0];if(p===0){let b=i.get();p=Hs(e,i).decompressedCount,i.set(b)}t&&(t.scale=t.extent/u),h=Uxr(e,w,i,p,t)}else{let w=v_r(m)?cf(e,i,1)[0]:1;if(w===0)continue;let b=s_r(e,i,m,w,p,void 0);if(b)if(Array.isArray(b))for(let _ of b)d.push(_);else d.push(b)}}let v=new $yr(c.name,h,f,d,u);n.push(v),i.set(o)}return n}function A_r(e,t,r,i,n,a,o=!1){var c;let s=(c=t.scalarType)!=null&&c.longID?go.UINT_64:go.UINT_32,l=typeof a=="number"?void 0:a,u=JB(n,a,e,r,s===go.UINT_64?"int64":"int32");if(s===go.UINT_32)switch(u){case Gs.FLAT:return new xne(i,sf(e,r,n,void 0,l),a);case Gs.SEQUENCE:{let f=_nt(e,r,n);return new bne(i,f[0],f[1],n.numRleValues,!1)}case Gs.CONST:return new wne(i,kne(e,r,n),a,!1)}switch(u){case Gs.FLAT:return o?new _ne(i,Txr(e,r,n,l),a):new Snt(i,Cne(e,r,n,l),a);case Gs.SEQUENCE:{let f=bnt(e,r,n);return new Ent(i,f[0],f[1],n.numRleValues,!1)}case Gs.CONST:return new Pnt(i,Tnt(e,r,n),a,!1)}throw Error("Vector type not supported for id column.")}function C_r(e){return typeof e=="object"&&!!e&&"evaluate"in e}function Eet(e,t,r,i,n){return vB(e,(a,o)=>{let s=t instanceof RB?t.get(o):null;return C_r(s)?s.evaluate(r,i,void 0,n):s})}function D_r(e,t){return t-e}var adr,ket,odr,sdr,ldr,Cet,cie,udr,cdr,vz,gz,Nu,oB,wv,J1,Ok,Vet,vie,rQe,Het,zr,pB,Mdr,nQe,zte,Qet,ett,Tv,itt,ntt,aQe,RT,Qh,Uz,TT,kdr,Hk,jk,Sie,ctt,e0,An,mu,ftt,_r,htt,Qr,$k,Ei,la,La,xv,yB,Nb,ha,Fdr,xB,Wk,_B,wk,bB,Yk,wB,Ldr,dtt,ptt,vtt,Qte,gtt,Pdr,Idr,qdr,Ndr,Pc,ea,Vdr,ere,Mm,Q1,eg,Xd,al,Gdr,X1,Z1,Lm,Cie,ST,Hdr,Ttt,Die,Zd,$s,Mtt,yz,_m,uQe,pT,Dtt,Ltt,Xdr,Zdr,Kdr,Jdr,Qdr,epr,qtt,hpr,dpr,ppr,vpr,gpr,mpr,Utt,ypr,xpr,_pr,Y1,Pie,Xtt,pQe,Iie,Bie,Gpr,qie,mT,$1,Hpr,ert,Jb,Nie,Uie,Ek,$z,lrt,ovr,TQe,AQe,Avr,MQe,Svr,Evr,ch,$ie,fre,bm,Yz,Co,PB,IB,hre,Jk,SQe,EQe,Fvr,Yd,RB,Fi,Sn,Ck,Irt,zB,uc,CQe,Wte,Av,Lvr,Pvr,Ivr,BB,Rvr,zvr,Qk,yl,Dk,Xz,dre,pre,vre,Fk,gre,mre,yre,xre,_re,bre,wre,Tre,Are,Zz,Mre,Sre,Kz,Ere,kre,Cre,Dre,Fre,Rrt,Xie,zrt,Brt,qrt,Ort,Nrt,Urt,Vrt,Grt,Hrt,jrt,Pm,$rt,Wrt,qvr,Ovr,Nvr,Uvr,Vvr,sT,FQe,Gvr,Hvr,jvr,LQe,Yrt,$vr,Xrt,Mv,Lre,Zrt,Pre,Wvr,Ws,Yvr,Xvr,Zvr,Kvr,Ire,Krt,Im,wn,qi,pa,Rf,OT,Rm,Zie,Kie,Jvr,ep,hk,zb,xm,mv,j2,Qrt,eit,tit,$b,Bre,zQe,BQe,Jie,p1r,v1r,g1r,m1r,y1r,ait,x1r,oit,_1r,b1r,w1r,UB,As,e8,cit,T1r,A1r,M1r,S1r,fit,E1r,k1r,C1r,D1r,vu,Am,F1r,dit,L1r,Ore,P1r,Lk,Nre,Vre,Kl,Qz,Gre,Hre,Wd,ik,Ib,nk,ak,W1,Gb,VB,xT,_T,Q1r,_it,agr,ogr,sgr,lgr,ugr,bit,cgr,Wre,fgr,hgr,Jd,wit,t8,pgr,ggr,zf,mn,Ait,wo,ix,Xte,kit,Agr,Mgr,Sgr,Egr,kgr,Cit,Cgr,IXr,Pgr,Igr,Zre,Rgr,Kre,zgr,Bgr,Dit,jQe,Fit,qgr,Ogr,Ngr,Ugr,$Qe,Vgr,Mz,Lit,Ggr,Hgr,jgr,$gr,YQe,Pit,tB,Qgr,emr,tmr,ZQe,rmr,Rit,zit,Sz,Ez,vT,bmr,wmr,cne,fne,Mmr,Smr,Emr,tie,RXr,ret,Vit,WB,Gmr,jit,iet,oet,bT,Lz,gyr,dT,XB,pne,Syr,iie,nie,s8,Cyr,Dyr,Fyr,Lyr,Zte,ant,vne,Pyr,Ryr,zyr,Byr,ont,qyr,lnt,Oyr,Nyr,Uyr,unt,l8,u8,Bc,Kte,c8,jyr,yne,r3,KB,xne,_ne,cnt,bne,wne,$yr,pk,go,Z2,fnt,hnt,da,Kd,Tne,oie,dnt,sie,y2r,pu,sh,wm,lc,lxr,met,uxr,cxr,fxr,hxr,Gs,bv,_xr,Snt,Ent,uf,Lxr,n3,knt,Cnt,Fnt,Lnt,Oxr,Nxr,Hxr,jxr,Pnt,Fne,wet,wT,Int,Tet,Tm,Ob,sc,x_r,Met,M_r,S_r,E_r,k_r,Unt,Vnt=Ea(()=>{adr=Object.create,ket=Object.defineProperty,odr=Object.getOwnPropertyDescriptor,sdr=Object.getOwnPropertyNames,ldr=Object.getPrototypeOf,Cet=Object.prototype.hasOwnProperty,cie=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),udr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=sdr(t),a=0,o=n.length,s;at[l]).bind(null,s),enumerable:!(i=odr(t,s))||i.enumerable});return e},cdr=(e,t,r)=>(r=e==null?{}:adr(ldr(e)),udr(t||!e||!e.__esModule||!Cet.call(e,"default")?ket(r,"default",{value:e,enumerable:!0}):r,e));tr.prototype={clone(){return new tr(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[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,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=t*this.x-r*this.y,n=r*this.x+t*this.y;return this.x=i,this.y=n,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.x+r*(this.x-t.x)-i*(this.y-t.y),a=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:tr},tr.convert=function(e){if(e instanceof tr)return e;if(Array.isArray(e))return new tr(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new tr(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};Nu=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;oB=pdr;wv=vdr;J1=pie,Ok=K1;(function(){var e=Ret();return function(t,r,i,n,a,o){var s,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;s.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(uh(e,n,a),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=1+o,rQe(i,i))}})(),(function(){var e=tQe(),t=tQe();return function(r,i,n,a,o,s){return vk(e,i,o,s),vk(t,n,a,s),vk(r,e,t,2*s*(1-s)),r}})(),(function(){var e=hie();return function(t,r,i,n){return e[0]=i[0],e[3]=i[1],e[6]=i[2],e[1]=n[0],e[4]=n[1],e[7]=n[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],rQe(t,bdr(t,e))}})();Het=wdr;(function(){var e=fB();return function(t,r,i,n,a,o){var s,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;sKi(null,null,function*(){let r=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(r,t)}catch(i){throw Error(`Could not load image because of ${Ic(i).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),ett=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},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=URL.createObjectURL(n)});Tv=85.051129,itt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ntt={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0};aQe="AbortError",RT=class extends Error{constructor(e=aQe){super(e instanceof Error?e.message:e),this.name=aQe,e instanceof Error&&e.stack&&(this.stack=e.stack)}};Qh={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};Uz="global-dispatcher",TT=class extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}};kdr=e=>{var t;return e.startsWith("file:")||((t=mB())==null?void 0:t.startsWith("file:"))&&!/^\w+:/.test(e)};Hk=function(e,t){return Ki(this,null,function*(){var r,i;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let n=Mie(e.url);if(n){let a=yield n(e,t);return!a.data&&e.type==="arrayBuffer"?ln(a,{data:new ArrayBuffer(0)}):a}if(Hb(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:Uz},t)}if(!kdr(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return Cdr(e,t);if(Hb(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:Uz},t)}return Ddr(e,t)})},jk=(e,t)=>Hk(ln(e,{type:"json"}),t),Sie=(e,t)=>Hk(ln(e,{type:"arrayBuffer"}),t);ctt=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{t.onloadstart=()=>{r(t)};for(let i of e){let n=window.document.createElement("source");Eie(i)||(t.crossOrigin="Anonymous"),n.src=i,t.appendChild(n)}})};e0=class{constructor(e,t={}){ln(this,t),this.type=e}},An=class extends e0{constructor(e,t={}){super("error",ln({error:e},t))}},mu=class{on(e,t){return this._listeners||(this._listeners={}),oQe(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return Bte(e,t,this._listeners),Bte(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),oQe(e,t,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,t){var n,a,o,s,l,u;let r=typeof e=="string"?new e0(e,t||{}):e,i=r.type;if(this.listens(i)){r.target=this;let c=(o=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?o:[];for(let d of c)d.call(this,r);let f=(u=(l=(s=this._oneTimeListeners)==null?void 0:s[i])==null?void 0:l.slice())!=null?u:[];for(let d of f)Bte(i,d,this._oneTimeListeners),d.call(this,r);let h=this._eventedParent;h&&(ln(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(r))}else r instanceof An&&console.error(r.error);return this}listens(e){var t,r,i,n,a;return!!((r=(t=this._listeners)==null?void 0:t[e])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[e])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}},ftt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},_r=ftt,htt=["type","source","source-layer","minzoom","maxzoom","filter","layout"],Qr=class{constructor(e,t,r,i,n="error"){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),this.severity=n,t!=null&&t.__line__&&(this.line=t.__line__)}},$k={kind:"null"},Ei={kind:"number"},la={kind:"string"},La={kind:"boolean"},xv={kind:"color"},yB={kind:"projectionDefinition"},Nb={kind:"object"},ha={kind:"value"},Fdr={kind:"error"},xB={kind:"collator"},Wk={kind:"formatted"},_B={kind:"padding"},wk={kind:"colorArray"},bB={kind:"numberArray"},Yk={kind:"resolvedImage"},wB={kind:"variableAnchorOffsetCollection"};Ldr=[$k,Ei,la,La,xv,yB,Wk,Nb,Lf(ha),_B,bB,wk,Yk,wB];dtt=.96422,ptt=.82521,vtt=4/29,Qte=6/29,gtt=3*Qte*Qte,Pdr=Math.PI/180,Idr=180/Math.PI;qdr=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};Ndr={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]};ea=(Pc=class{constructor(t,r,i,n=1,a=!0){this.r=t,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[t,r,i,n]))}static parse(t){if(t instanceof Pc)return t;if(typeof t!="string")return;let r=Odr(t);if(r)return new Pc(...r,!1)}get rgb(){let{r:t,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[t/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",Rdr(this.rgb))}get lab(){return this.overwriteGetter("lab",ytt(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){let[t,r,i,n]=this.rgb;return`rgba(${[t,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(t,r,i,n="rgb"){switch(n){case"rgb":{let[a,o,s,l]=AT(t.rgb,r.rgb,i);return new Pc(a,o,s,l,!1)}case"hcl":{let[a,o,s,l]=t.hcl,[u,c,f,h]=r.hcl,d,p;if(!isNaN(a)&&!isNaN(u)){let b=u-a;u>a&&b>180?b-=360:u180&&(b+=360),d=a+i*b}else isNaN(a)?isNaN(u)?d=NaN:(d=u,(s===1||s===0)&&(p=c)):(d=a,(f===1||f===0)&&(p=o));let[v,m,g,w]=zdr([d,p!=null?p:X2(o,c,i),X2(s,f,i),X2(l,h,i)]);return new Pc(v,m,g,w,!1)}case"lab":{let[a,o,s,l]=xtt(AT(t.lab,r.lab,i));return new Pc(a,o,s,l,!1)}}}},Pc.black=new Pc(0,0,0,1),Pc.white=new Pc(1,1,1,1),Pc.transparent=new Pc(0,0,0,0),Pc.red=new Pc(1,0,0,1),Pc),Vdr=["bottom","center","top"],ere=class{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}},Mm=class Iz{constructor(t){this.sections=t}static fromString(t){return new Iz([new ere(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof Iz?t:Iz.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}},Q1=class lk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof lk)return t;if(typeof t=="number")return new lk([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new lk(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new lk(AT(t.values,r.values,i))}},eg=class uk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof uk)return t;if(typeof t=="number")return new uk([t]);if(Array.isArray(t)){for(let r of t)if(typeof r!="number")return;return new uk(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new uk(AT(t.values,r.values,i))}},Xd=class ck{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof ck)return t;if(typeof t=="string"){let i=ea.parse(t);return i?new ck([i]):void 0}if(!Array.isArray(t))return;let r=[];for(let i of t){if(typeof i!="string")return;let n=ea.parse(i);if(!n)return;r.push(n)}return new ck(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i,n="rgb"){let a=[];if(t.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let o=0;o=s)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);let f=r.parse(l,c,a);if(!f)return null;a||(a=f.type),n.push([s,f])}return new Att(a,i,n,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(t):i[TB(r,n,this.key)].evaluate(t)}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};Zd=class tre{constructor(t,r,i,n,a,o){this.type=t,this.operator=r,this.interpolation=i,this.input=n,this.key=o,this.labels=[],this.outputs=[];for(let[s,l]of a)this.labels.push(s),this.outputs.push(l)}static interpolationFactor(t,r,i,n){let a=0;if(t.name==="exponential")a=Vte(r,t.base,i,n);else if(t.name==="linear")a=Vte(r,1,i,n);else if(t.name==="cubic-bezier"){let o=t.controlPoints;a=jdr(o[0],o[1],o[2],o[3])(Vte(r,1,i,n))}return a}static parse(t,r){let[i,n,a,...o]=t;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,Ei),!a)return null;let s=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=wk?l=xv:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=c)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);let p=r.parse(f,d,l);if(!p)return null;l||(l=p.type),s.push([c,p])}return!G2(l,Ei)&&!G2(l,yB)&&!G2(l,xv)&&!G2(l,_B)&&!G2(l,bB)&&!G2(l,wk)&&!G2(l,wB)&&!G2(l,Lf(Ei))?r.error(`Type ${ml(l)} is not interpolatable.`):new tre(l,i,n,a,s,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(t);let o=TB(r,n,this.key),s=r[o],l=r[o+1],u=tre.interpolationFactor(this.interpolation,n,s,l),c=i[o].evaluate(t),f=i[o+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return X2(c,f,u);case"color":return ea.interpolate(c,f,u);case"padding":return Q1.interpolate(c,f,u);case"colorArray":return Xd.interpolate(c,f,u);case"numberArray":return eg.interpolate(c,f,u);case"variableAnchorOffsetCollection":return X1.interpolate(c,f,u,this.key);case"array":return AT(c,f,u);case"projectionDefinition":return Lm.interpolate(c,f,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return ea.interpolate(c,f,u,"hcl");case"colorArray":return Xd.interpolate(c,f,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ea.interpolate(c,f,u,"lab");case"colorArray":return Xd.interpolate(c,f,u,"lab")}}}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};$s={color:ea.interpolate,number:X2,padding:Q1.interpolate,numberArray:eg.interpolate,colorArray:Xd.interpolate,variableAnchorOffsetCollection:X1.interpolate,array:AT},Mtt=class Stt{constructor(t){this.type=Wk,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let o=1;o<=t.length-1;++o){let s=t[o];if(a&&typeof s=="object"&&!Array.isArray(s)){a=!1;let l=null;if(s["font-scale"]&&(l=r.parse(s["font-scale"],1,Ei),!l))return null;let u=null;if(s["text-font"]&&(u=r.parse(s["text-font"],1,Lf(la)),!u))return null;let c=null;if(s["text-color"]&&(c=r.parse(s["text-color"],1,xv),!c))return null;let f=null;if(s["vertical-align"]){if(typeof s["vertical-align"]=="string"&&!Vdr.includes(s["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);if(f=r.parse(s["vertical-align"],1,la),!f)return null}let h=n[n.length-1];h.scale=l,h.font=u,h.textColor=c,h.verticalAlign=f}else{let l=r.parse(t[o],1,ha);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Stt(n)}evaluate(t){return new Mm(this.sections.map(r=>{let i=r.content.evaluate(t);return Ql(i)===Yk?new ere("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new ere(mk(i),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)}))}eachChild(t){for(let r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}};yz={string:la,number:Ei,boolean:La,object:Nb},_m=class ktt{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=1,n,a=t[0];if(a==="array"){let s;if(t.length>2){let u=t[1];if(typeof u!="string"||!(u in yz)||u==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);s=yz[u],i++}else s=ha;let l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);l=t[2],i++}n=Lf(s,l)}else{if(!yz[a])throw Error(`Types doesn't contain name = ${a}`);n=yz[a]}let o=[];for(;it.outputDefined())}},uQe={"to-boolean":La,"to-color":xv,"to-number":Ei,"to-string":la},pT=class Ctt{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[0];if(!uQe[i])throw Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&t.length!==2)return r.error("Expected one argument.");let n=uQe[i],a=[];for(let o=1;o4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:btt(r[0],r[1],r[2],r[3]),!i))return new ea(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new al(i||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(t);let n=Q1.parse(r);if(n)return n}throw new al(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=eg.parse(r);if(n)return n}throw new al(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=Xd.parse(r);if(n)return n}throw new al(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(t);let n=X1.parse(r);if(n)return n}throw new al(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(t),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new al(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return Mm.fromString(mk(this.args[0].evaluate(t)));case"resolvedImage":return Z1.fromString(mk(this.args[0].evaluate(t)));case"projectionDefinition":{let r=this.args[0].evaluate(t);if(Lm.parse(r))return r;throw new al(`Could not parse projectionDefinition from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}default:return mk(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}},Dtt=class Ftt{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(let r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new al(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new al(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}},Zdr=class Rtt{constructor(t,r,i){this.needle=t,this.haystack=r,this.key=i,this.type=La}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ha),n=r.parse(t[2],2,ha);return!i||!n?null:kie(i.type,[La,la,Ei,$k,ha])?new Rtt(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ml(i.type)} instead`)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!Ub(r,["boolean","string","number","null"]))throw new al(`Expected first argument to be of type boolean, string, number or null, but found ${ml(Ql(r))} instead.`,this.key);if(!Ub(i,["string","array"]))throw new al(`Expected second argument to be of type array or string, but found ${ml(Ql(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}},Kdr=class rre{constructor(t,r,i,n){this.needle=t,this.haystack=r,this.key=i,this.fromIndex=n,this.type=Ei}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,ha),n=r.parse(t[2],2,ha);if(!i||!n)return null;if(!kie(i.type,[La,la,Ei,$k,ha]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ml(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,Ei);return a?new rre(i,n,r.key,a):null}return new rre(i,n,r.key)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Ub(r,["boolean","string","number","null"]))throw new al(`Expected first argument to be of type boolean, string, number or null, but found ${ml(Ql(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(t)),Ub(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(Ub(i,["array"]))return i.indexOf(r,n);throw new al(`Expected second argument to be of type array or string, but found ${ml(Ql(i))} instead.`,this.key)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}},Jdr=class ztt{constructor(t,r,i,n,a,o){this.inputType=t,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=o}static parse(t,r){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.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},o=[];for(let u=2;u2**53-1)return h.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof p=="number"&&Math.floor(p)!==p)return h.error("Numeric branch labels must be integer values.");if(!i)i=Ql(p);else if(h.checkSubtype(i,Ql(p)))return null;if(a[String(p)]!==void 0)return h.error("Branch labels must be unique.");a[String(p)]=o.length}let d=r.parse(f,u,n);if(!d)return null;n||(n=d.type),o.push(d)}let s=r.parse(t[1],1,ha);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return!l||s.type.kind!=="value"&&r.concat(1).checkSubtype(i,s.type)?null:new ztt(i,n,s,a,o,l)}evaluate(t){let r=this.input.evaluate(t);return(Ql(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}},Qdr=class Btt{constructor(t,r,i){this.type=t,this.branches=r,this.otherwise=i}static parse(t,r){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.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let o=1;or.outputDefined())&&this.otherwise.outputDefined()}},epr=class ire{constructor(t,r,i,n,a){this.type=t,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}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,ha),n=r.parse(t[2],2,Ei);if(!i||!n)return null;if(!kie(i.type,[Lf(ha),la,ha]))return r.error(`Expected first argument to be of type array or string, but found ${ml(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,Ei);return a?new ire(i.type,i,n,r.key,a):null}return new ire(i.type,i,n,r.key)}evaluate(t){let r=this.input.evaluate(t),i=this.beginIndex.evaluate(t),n;if(this.endIndex&&(n=this.endIndex.evaluate(t)),Ub(r,["string"]))return[...r].slice(i,n).join("");if(Ub(r,["array"]))return r.slice(i,n);throw new al(`Expected first argument to be of type array or string, but found ${ml(Ql(r))} instead.`,this.key)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}},qtt=class nre{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let o of t.slice(1)){let s=r.parse(o,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!s)return null;i||(i=s.type),a.push(s)}if(!i)throw Error("No output type");return n&&a.some(o=>Tk(n,o.type))?new nre(ha,a):new nre(i,a)}evaluate(t){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(t),r&&r instanceof Z1&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};hpr=zT("==",tpr,Ott),dpr=zT("!=",rpr,spr),ppr=zT("<",ipr,lpr),vpr=zT(">",npr,upr),gpr=zT("<=",apr,cpr),mpr=zT(">=",opr,fpr),Utt=class Vtt{constructor(t,r,i){this.type=xB,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");let i=t[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,La);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,La);if(!a)return null;let o=null;return i.locale&&(o=r.parse(i.locale,1,la),!o)?null:new Vtt(n,a,o)}evaluate(t){return new Cie(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}},ypr=class Gtt{constructor(t,r,i,n,a,o){this.type=la,this.number=t,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=o}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");let i=r.parse(t[1],1,Ei);if(!i)return null;let n=t[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,la),!a))return null;let o=null;if(n.currency&&(o=r.parse(n.currency,1,la),!o))return null;let s=null;if(n.unit&&(s=r.parse(n.unit,1,la),!s))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,Ei),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,Ei),!u)?null:new Gtt(i,a,o,s,l,u)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}},xpr=class Htt{constructor(t){this.type=Yk,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");let i=r.parse(t[1],1,la);return i?new Htt(i):r.error("No image name provided.")}evaluate(t){let r=this.input.evaluate(t),i=Z1.fromString(r);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(r)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}},_pr=class jtt{constructor(t,r){this.input=t,this.key=r,this.type=Ei}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${ml(i.type)} instead.`):new jtt(i,r.key):null}evaluate(t){let r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new al(`Expected value to be of type string or array, but found ${ml(Ql(r))} instead.`,this.key)}eachChild(t){t(this.input)}outputDefined(){return!1}},Y1=8192;Pie=class zz{constructor(t,r){this.type=La,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(MT(t[1])){let i=t[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:o,coordinates:s}=a.geometry;o==="Polygon"&&n.push(s),o==="MultiPolygon"&&n.push(...s)}if(n.length)return new zz(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new zz(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new zz(i,i)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return Ppr(t,this.geometries);if(t.geometryType()==="LineString")return Ipr(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Xtt=class{constructor(e=[],t=(r,i)=>ri)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)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(;e=0)break;t[e]=t[a],e=a}t[e]=n}},pQe=Math.PI/180,Iie=class{constructor(e){let t=pQe*6378.137*1e3,r=Math.cos(e*pQe),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*.9933056200098587}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=1/0,i,n,a,o;for(let s=0;s1?(l=e[s+1][0],u=e[s+1][1]):h>0&&(l+=c/this.kx*h,u+=f/this.ky*h)),c=this.wrap(t[0]-l)*this.kx,f=(t[1]-u)*this.ky;let d=c*c+f*f;d180;)e-=360;return e}};Bie=class Bz{constructor(t,r){this.type=Ei,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(MT(t[1])){let i=t[1];if(i.type==="FeatureCollection")return new Bz(i,i.features.map(n=>Gte(n.geometry)).flat());if(i.type==="Feature")return new Bz(i,Gte(i.geometry));if("type"in i&&"coordinates"in i)return new Bz(i,Gte(i))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return Npr(t,this.geometries);if(t.geometryType()==="LineString")return Upr(t,this.geometries);if(t.geometryType()==="Polygon")return Vpr(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},Gpr=class Ktt{constructor(t){let r=null;for(let i of t)if(!r)r=i.type;else{if(r===i.type)continue;r=ha;break}this.type=Lf(r!=null?r:ha,t.length),this.arr=t}static parse(t,r){if(t.length!==2)return r.error(`'semiliteral' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!MT(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let i=t[1],n=Ql(i);if(n.kind==="array"){let a=i.map(o=>r.parse(o,null,ha));return new Ktt(a)}return new ST(n,i)}evaluate(t){return this.arr.map(r=>r.evaluate(t))}eachChild(t){this.arr.forEach(t)}outputDefined(){return this.arr.every(t=>t.outputDefined())}},qie=class Jtt{constructor(t){this.key=t,this.type=ha}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=t[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Jtt(i):r.error(`Global state property must be string, but found ${typeof t[1]} instead.`)}evaluate(t){var i,n;let r=(i=t.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=gk(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},mT={"==":hpr,"!=":dpr,">":vpr,"<":ppr,">=":mpr,"<=":gpr,array:_m,at:Xdr,boolean:_m,case:Qdr,coalesce:qtt,collator:Utt,format:Mtt,image:xpr,in:Zdr,"index-of":Kdr,interpolate:Zd,"interpolate-hcl":Zd,"interpolate-lab":Zd,length:_pr,let:Dtt,literal:ST,match:Jdr,number:_m,"number-format":ypr,object:_m,semiliteral:Gpr,slice:epr,step:Die,string:_m,"to-boolean":pT,"to-color":pT,"to-number":pT,"to-string":pT,var:Ltt,within:Pie,distance:Bie,"global-state":qie},$1=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},Hpr=class Qtt{constructor(t,r=[]){this.parent=t,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(t){return new Qtt(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}},ert=class trt{constructor(t,r,i=[],n,a=new Hpr,o=[]){this.registry=t,this.path=i,this.key=i.map(s=>`[${s}]`).join(""),this.scope=a,this.errors=o,this.expectedType=n,this._isConstant=r}parse(t,r,i,n,a={}){return r?this.concat(r,i,n)._parse(t,a):this._parse(t,a)}_parse(t,r){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);let i=this.key;function n(a,o,s){return s==="assert"?new _m(o,[a],i):s==="coerce"?new pT(o,[a],i):a}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let a=t[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let o=this.registry[a];if(o){let s=o.parse(t,this);if(!s)return null;if(this.expectedType){let l=this.expectedType,u=s.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")s=n(s,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))s=n(s,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(s instanceof ST)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){let l=new Ttt;try{s=new ST(s.type,s.evaluate(l))}catch(u){return this.error(u.message),null}}return s}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return t===void 0?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,r,i){let n=typeof t=="number"?this.path.concat(t):this.path,a=i?this.scope.concat(i):this.scope;return new trt(this.registry,this._isConstant,n,r||null,a,this.errors)}error(t,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new $1(i,t))}checkSubtype(t,r){let i=Tk(t,r);return i&&this.error(i),i}},Jb=class fk{constructor(t,r,i,n,a){this.name=t,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(t){return this._evaluate(t,this.args,this.key)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){let i=t[0],n=fk.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=o.filter(([u])=>!Array.isArray(u)||u.length===t.length-1),l=null;for(let[u,c]of s){l=new ert(r.registry,jz,r.path,null,r.scope);let f=[],h=!1;for(let d=1;d$pr(f)).join(" | "),c=[];for(let f=1;f{throw new al(t.evaluate(e),r)}],typeof:[la,[ha],(e,[t])=>ml(Ql(t.evaluate(e)))],"to-rgba":[Lf(Ei,4),[xv],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[r*255,i*255,n*255,a]}],rgb:[xv,[Ei,Ei,Ei],yQe],rgba:[xv,[Ei,Ei,Ei,Ei],yQe],has:{type:La,overloads:[[[la],(e,[t])=>xQe(t.evaluate(e),e.properties())],[[la,Nb],(e,[t,r])=>xQe(t.evaluate(e),r.evaluate(e))]]},get:{type:ha,overloads:[[[la],(e,[t])=>Hte(t.evaluate(e),e.properties())],[[la,Nb],(e,[t,r])=>Hte(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ha,[la],(e,[t])=>Hte(t.evaluate(e),e.featureState||{})],properties:[Nb,[],e=>e.properties()],"geometry-type":[la,[],e=>e.geometryType()],id:[ha,[],e=>e.id()],zoom:[Ei,[],e=>e.globals.zoom],"heatmap-density":[Ei,[],e=>e.globals.heatmapDensity||0],elevation:[Ei,[],e=>e.globals.elevation||0],"line-progress":[Ei,[],e=>e.globals.lineProgress||0],accumulated:[ha,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[Ei,Pb(Ei),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[Ei,Pb(Ei),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:Ei,overloads:[[[Ei,Ei],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[Ei],(e,[t])=>-t.evaluate(e)]]},"/":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[Ei,[],()=>Math.LN2],pi:[Ei,[],()=>Math.PI],e:[Ei,[],()=>Math.E],"^":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)**+r.evaluate(e)],sqrt:[Ei,[Ei],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))],log2:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[Ei,[Ei],(e,[t])=>Math.sin(t.evaluate(e))],cos:[Ei,[Ei],(e,[t])=>Math.cos(t.evaluate(e))],tan:[Ei,[Ei],(e,[t])=>Math.tan(t.evaluate(e))],asin:[Ei,[Ei],(e,[t])=>Math.asin(t.evaluate(e))],acos:[Ei,[Ei],(e,[t])=>Math.acos(t.evaluate(e))],atan:[Ei,[Ei],(e,[t])=>Math.atan(t.evaluate(e))],min:[Ei,Pb(Ei),(e,t)=>Math.min(...t.map(r=>r.evaluate(e)))],max:[Ei,Pb(Ei),(e,t)=>Math.max(...t.map(r=>r.evaluate(e)))],abs:[Ei,[Ei],(e,[t])=>Math.abs(t.evaluate(e))],round:[Ei,[Ei],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ei,[Ei],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[Ei,[Ei],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[La,[la,ha],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[La,[ha],(e,[t])=>e.id()===t.value],"filter-type-==":[La,[la],(e,[t])=>e.geometryType()===t.value],"filter-<":[La,[la,ha],(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":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[La,[ha],(e,[t])=>{let r=t.value,i=e.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[La,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[La,[Lf(la)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[La,[Lf(ha)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[La,[la,Lf(ha)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[La,[la,Lf(ha)],(e,[t,r])=>jpr(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:La,overloads:[[[La,La],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Pb(La),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:La,overloads:[[[La,La],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Pb(La),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[La,[La],(e,[t])=>!t.evaluate(e)],"is-supported-script":[La,[la],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[la,[la],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[la,[la],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[la,Pb(ha),(e,t)=>t.map(r=>mk(r.evaluate(e))).join("")],split:[Lf(la),[la,la],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[la,[Lf(la),la],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[la,[xB],(e,[t])=>t.evaluate(e).resolvedLocale()]});Nie=/^(.*)-transition$/;Uie=class{constructor(e,t,r,i){this.expression=e,this._warningHistory={},this._evaluator=new Ttt,this._defaultValue=r?crt(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=t}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(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=kT(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 o=this.expression.evaluate(this._evaluator);if(o==null||typeof o=="number"&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new al(`Expected value to be one of ${Object.keys(this._enumValues).map(s=>JSON.stringify(s)).join(", ")}, but found ${JSON.stringify(o)} instead.`,"");return o}catch(o){let s=o instanceof al?o.path:"",l=`${s}|${o.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(art(this._rootKey,s,o.message,this._defaultValue))),this._defaultValue}}};Ek=class{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Mk(t.expression),this.globalStateRefs=Kk(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}},$z=class{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Mk(t.expression),this.globalStateRefs=Kk(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?Zd.interpolationFactor(this.interpolationType,e,t,r):0}};lrt=class urt{constructor(t,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,ort(r),this._parameters=t,this._specification=i,this._rootKey=r,this._defaultValue=crt(i),this._warningHistory={};let n=irt(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(t,r){try{return this._innerEvaluate(t,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(art(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(t){return new urt(t._parameters,t._rootKey,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification,_rootKey:t._rootKey}}};ovr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};TQe={promoteId:dvr};AQe=1114111,Avr=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i;MQe={"*"(){return[]},array:Hie,boolean:uvr,number:FB,color:ure,constants:prt,enum:kk,filter:jie,function:vrt,layer:_rt,object:I0,source:brt,light:wrt,sky:Trt,terrain:Art,projection:_vr,projectionDefinition:bvr,string:J2,formatted:pvr,resolvedImage:vvr,padding:gvr,numberArray:mvr,colorArray:yvr,variableAnchorOffsetCollection:xvr,sprite:Mrt,state:Srt,fontFaces:Ert};P0.source=jd(Hd(brt)),P0.sprite=jd(Hd(Mrt)),P0.glyphs=jd(Hd(krt)),P0.fontFaces=jd(Hd(Ert)),P0.light=jd(Hd(wrt)),P0.sky=jd(Hd(Trt)),P0.terrain=jd(Hd(Art)),P0.state=jd(Hd(Srt)),P0.layer=jd(Hd(_rt)),P0.filter=jd(Hd(jie)),P0.paintProperty=jd(Hd(yrt)),P0.layoutProperty=jd(Hd(xrt));Svr={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},Evr=class{constructor(e,t,r){this._rootKey=t,this._globalState=r,this.setValue(e)}evaluate(){var e;return(e=this._literalValue)!=null?e:this._compiledValue.evaluate({})}setValue(e){if(e==null||e==="visible"||e==="none"){this._literalValue=e==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let t=DB(e,this._rootKey,Svr,this._globalState);if(t.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=Kk(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};ch=P0,$ie=new Set(Object.keys(_r).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-")));fre=class Drt{constructor(t,r,i){let n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;let o=new Int32Array(this.arrayBuffer);t=o[0],r=o[1],i=o[2],this.d=r+2*i;for(let u=0;u=f[d+0]&&n>=f[d+1])?(s[h]=!0,o.push(c[h])):s[h]=!1}}}_forEachCell(t,r,i,n,a,o,s,l){let u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),f=this._convertToCellCoord(i),h=this._convertToCellCoord(n);for(let d=u;d<=f;d++)for(let p=c;p<=h;p++){let v=this.d*p+d;if((!l||l(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&a.call(this,t,r,i,n,v,o,s,l))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let t=this.cells,r=3+this.cells.length+1+1,i=0;for(let o of this.cells)i+=o.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let o=0;or?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}},PB="-transition",IB=class{constructor(e,t,r,i){this.property=e,this.value=t,this.expression=tvr(t===void 0?e.specification.default:t,r,e.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}},hre=class{constructor(e,t,r){this.property=e,this.value=new IB(e,void 0,t,r)}transitioned(e,t){return new SQe(this.property,this.value,t,ln({},e.transition,this.transition),e.now)}untransitioned(){return new SQe(this.property,this.value,null,{},0)}},Jk=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return lh(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hre(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new IB(this._values[e].property,t===null?void 0:lh(t),this._propertyRootKey(e),this._globalState)}getTransition(e){return lh(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hre(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=lh(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);r!==void 0&&(e[t]=r);let i=this.getTransition(t);i!==void 0&&(e[`${t}${PB}`]=i)}return e}transitioned(e,t){let r=new EQe(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 EQe(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}},SQe=class{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)return n;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}},Irt=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){if(e.value!==void 0){if(e.expression.kind==="constant"){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new Co(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Co(Math.floor(t.zoom),t)),e.expression.evaluate(new Co(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}},zB=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}},uc=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new IB(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[t]=new hre(r,r.name,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}};Ui("DataDrivenProperty",Sn),Ui("DataConstantProperty",Fi),Ui("CrossFadedDataDrivenProperty",Ck),Ui("CrossFadedProperty",Irt),Ui("ColorRampProperty",zB);CQe=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",Wte=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",Av=class extends mu{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=kvr(this.visibility,`layers[${this.id}].layout.visibility`,r),e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=CT(e.filter,`layers[${this.id}].filter`,r)),t.layout&&(this._unevaluatedLayout=new Fvr(t.layout,`layers[${this.id}].layout`,r)),t.paint)){this._transitionablePaint=new Jk(t.paint,`layers[${this.id}].paint`,r);for(let i in e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new RB(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=CT(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if(e==="visibility")return this.visibility;if((t=this._transitionablePaint)!=null&&t.hasProperty(e))throw Error(e+CQe);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){let r=this._unevaluatedLayout._values[t];for(let i of r.getGlobalStateRefs())e.add(i)}for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){var t;let e=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=(t=e.get(n))!=null?t:[];a.push({name:r,value:i.value}),e.set(n,a)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;if(e==="visibility"){this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(e)){this.fire(new An(Error(e+CQe)));return}t!=null&&this._validate(ch.layoutProperty,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith("-transition")){let i=e.slice(0,-11);if(i==="visibility"||(t=this._unevaluatedLayout)!=null&&t.hasProperty(i))throw Error(e+Wte);return this._transitionablePaint.getTransition(i)}if(e==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(e))throw Error(e+Wte);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if(e==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(e))return this.fire(new An(Error(e+Wte))),!1;if(t!=null&&this._validate(ch.paintProperty,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let n=this._transitionablePaint._values[e],a=n.property.specification["property-type"]==="cross-faded-data-driven",o=n.value.isDataDriven(),s=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)}}_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?!0:this._evaluatedVisibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,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 t,r;let e={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:(t=this._unevaluatedLayout)==null?void 0:t.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(e.layout||(e.layout={}),e.layout.visibility=this.visibility),bie(e,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(e,t,r,i,n={}){return qT(this,e,{key:t,layerType:this.type,objectKey:r,value:i},n)}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 Yd&&ET(t.property.specification)&&(t.value.kind==="source"||t.value.kind==="composite")&&t.value.isStateDependent)return!0}return!1}},Pvr=()=>Lvr||(Lvr=new uc({"raster-opacity":new Fi(_r.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new Fi(_r.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new Fi(_r.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new Fi(_r.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new Fi(_r.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new Fi(_r.paint_raster["raster-contrast"],"raster-contrast"),resampling:new Fi(_r.paint_raster.resampling,"resampling"),"raster-resampling":new Fi(_r.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new Fi(_r.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Ivr={get paint(){return Pvr()}},BB=e=>e.type==="raster",Rvr=class extends Av{constructor(e,t){super(e,Ivr,t)}},zvr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Qk=class{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}},yl=class{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(this.capacity*5),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()}};Dk=class extends yl{_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=e*2;return this.int16[i+0]=t,this.int16[i+1]=r,e}};Dk.prototype.bytesPerElement=4,Ui("StructArrayLayout2i4",Dk);Xz=class extends yl{_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=e*3;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}};Xz.prototype.bytesPerElement=6,Ui("StructArrayLayout3i6",Xz);dre=class extends yl{_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=e*4;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}};dre.prototype.bytesPerElement=8,Ui("StructArrayLayout4i8",dre);pre=class extends yl{_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=e*6;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}};pre.prototype.bytesPerElement=12,Ui("StructArrayLayout2i4i12",pre);vre=class extends yl{_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=e*4,l=e*8;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}};vre.prototype.bytesPerElement=8,Ui("StructArrayLayout2i4ub8",vre);Fk=class extends yl{_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=e*2;return this.float32[i+0]=t,this.float32[i+1]=r,e}};Fk.prototype.bytesPerElement=8,Ui("StructArrayLayout2f8",Fk);gre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l,u)}emplace(e,t,r,i,n,a,o,s,l,u,c){let f=e*10;return this.uint16[f+0]=t,this.uint16[f+1]=r,this.uint16[f+2]=i,this.uint16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint16[f+8]=u,this.uint16[f+9]=c,e}};gre.prototype.bytesPerElement=20,Ui("StructArrayLayout10ui20",gre);mre=class extends yl{_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 u=e*8;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e}};mre.prototype.bytesPerElement=16,Ui("StructArrayLayout8ui16",mre);yre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,a,o,s,l,u,c,f,h)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d){let p=e*14,v=e*7;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=i,this.int16[p+3]=n,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,this.float32[v+6]=d,e}};yre.prototype.bytesPerElement=28,Ui("StructArrayLayout4i4ui4i1f28",yre);xre=class extends yl{_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=e*3;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}};xre.prototype.bytesPerElement=12,Ui("StructArrayLayout3f12",xre);_re=class extends yl{_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){let r=e*1;return this.uint32[r+0]=t,e}};_re.prototype.bytesPerElement=4,Ui("StructArrayLayout1ul4",_re);bre=class extends yl{_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 u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,u){let c=e*10,f=e*5;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.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}};bre.prototype.bytesPerElement=20,Ui("StructArrayLayout6i1ul2ui20",bre);wre=class extends yl{_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=e*6;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}};wre.prototype.bytesPerElement=12,Ui("StructArrayLayout2i2i2i12",wre);Tre=class extends yl{_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=e*4,s=e*8;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}};Tre.prototype.bytesPerElement=16,Ui("StructArrayLayout2f1f2i16",Tre);Are=class extends yl{_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=e*16,l=e*4,u=e*8;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=o,e}};Are.prototype.bytesPerElement=16,Ui("StructArrayLayout2ub2f2i16",Are);Zz=class extends yl{_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=e*3;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}};Zz.prototype.bytesPerElement=6,Ui("StructArrayLayout3ui6",Zz);Mre=class extends yl{_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,u,c,f,h,d,p,v,m,g){let w=this.length;return this.resize(w+1),this.emplace(w,e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w){let b=e*26,_=e*13,M=e*52;return this.int16[b+0]=t,this.int16[b+1]=r,this.uint16[b+2]=i,this.uint16[b+3]=n,this.uint32[_+2]=a,this.uint32[_+3]=o,this.uint32[_+4]=s,this.uint16[b+10]=l,this.uint16[b+11]=u,this.uint16[b+12]=c,this.float32[_+7]=f,this.float32[_+8]=h,this.uint8[M+36]=d,this.uint8[M+37]=p,this.uint8[M+38]=v,this.uint32[_+10]=m,this.int16[b+22]=g,this.float32[_+12]=w,e}};Mre.prototype.bytesPerElement=52,Ui("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Mre);Sre=class extends yl{_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,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C){let k=this.length;return this.resize(k+1),this.emplace(k,e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k){let D=e*34,F=e*17;return this.int16[D+0]=t,this.int16[D+1]=r,this.int16[D+2]=i,this.int16[D+3]=n,this.int16[D+4]=a,this.int16[D+5]=o,this.int16[D+6]=s,this.int16[D+7]=l,this.uint16[D+8]=u,this.uint16[D+9]=c,this.uint16[D+10]=f,this.uint16[D+11]=h,this.uint16[D+12]=d,this.uint16[D+13]=p,this.uint16[D+14]=v,this.uint16[D+15]=m,this.uint16[D+16]=g,this.uint16[D+17]=w,this.uint16[D+18]=b,this.uint16[D+19]=_,this.uint16[D+20]=M,this.uint16[D+21]=x,this.uint16[D+22]=T,this.uint32[F+12]=A,this.float32[F+13]=y,this.float32[F+14]=E,this.uint16[D+30]=S,this.uint16[D+31]=C,this.float32[F+16]=k,e}};Sre.prototype.bytesPerElement=68,Ui("StructArrayLayout8i15ui1ul2f2ui1f68",Sre);Kz=class extends yl{_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){let r=e*1;return this.float32[r+0]=t,e}};Kz.prototype.bytesPerElement=4,Ui("StructArrayLayout1f4",Kz);Ere=class extends yl{_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=e*6,a=e*3;return this.uint16[n+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,e}};Ere.prototype.bytesPerElement=12,Ui("StructArrayLayout1ui2f12",Ere);kre=class extends yl{_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=e*2,a=e*4;return this.uint32[n+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=i,e}};kre.prototype.bytesPerElement=8,Ui("StructArrayLayout1ul2ui8",kre);Cre=class extends yl{_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=e*2;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}};Cre.prototype.bytesPerElement=4,Ui("StructArrayLayout2ui4",Cre);Dre=class extends yl{_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){let r=e*1;return this.uint16[r+0]=t,e}};Dre.prototype.bytesPerElement=2,Ui("StructArrayLayout1ui2",Dre);Fre=class extends yl{_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=e*4;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}};Fre.prototype.bytesPerElement=16,Ui("StructArrayLayout4f16",Fre);Rrt=class extends Qk{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 tr(this.anchorPointX,this.anchorPointY)}};Rrt.prototype.size=20;Xie=class extends bre{get(e){return new Rrt(this,e)}};Ui("CollisionBoxArray",Xie);zrt=class extends Qk{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};zrt.prototype.size=52;Brt=class extends Mre{get(e){return new zrt(this,e)}};Ui("PlacedSymbolArray",Brt);qrt=class extends Qk{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};qrt.prototype.size=68;Ort=class extends Sre{get(e){return new qrt(this,e)}};Ui("SymbolInstanceArray",Ort);Nrt=class extends Kz{getoffsetX(e){return this.float32[e*1+0]}};Ui("GlyphOffsetArray",Nrt);Urt=class extends Xz{getx(e){return this.int16[e*3+0]}gety(e){return this.int16[e*3+1]}gettileUnitDistanceFromAnchor(e){return this.int16[e*3+2]}};Ui("SymbolLineVertexArray",Urt);Vrt=class extends Qk{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]}};Vrt.prototype.size=12;Grt=class extends Ere{get(e){return new Vrt(this,e)}};Ui("TextAnchorOffsetArray",Grt);Hrt=class extends Qk{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]}};Hrt.prototype.size=8;jrt=class extends kre{get(e){return new Hrt(this,e)}};Ui("FeatureIndexArray",jrt);Pm=class extends Dk{},$rt=class extends Xz{},Wrt=class extends dre{},qvr=class extends Dk{},Ovr=class extends Dk{},Nvr=class extends pre{},Uvr=class extends vre{},Vvr=class extends Fk{},sT=class extends gre{},FQe=class extends mre{},Gvr=class extends yre{},Hvr=class extends xre{},jvr=class extends _re{},LQe=class extends wre{},Yrt=class extends Tre{},$vr=class extends Are{},Xrt=class extends Zz{},Mv=class extends Zz{},Lre=class extends Cre{},Zrt=class extends Dre{},Pre=ol([{name:"a_pos",components:2,type:"Int16"}],4),Wvr=Pre.members;Pre.size,Pre.alignment;Ws=class hT{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,i,n){let a=this.segments[this.segments.length-1];return t>hT.MAX_VERTEX_ARRAY_LENGTH&&Ma(`Max vertices per segment is ${hT.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${hT.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+t>hT.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(t,r,i){let n={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(t,r,i){return this.prepareSegment(0,t,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let t of this.segments)for(let r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,i,n){return new hT([{vertexOffset:t,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};Ws.MAX_VERTEX_ARRAY_LENGTH=2**16-1,Ui("SegmentVector",Ws);Yvr=ol([{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"}]),Xvr=ol([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),Zvr=cie(((e,t)=>{function r(i,n){for(var a=i.length&3,o=i.length-a,s=n,l,u=3432918353,c=461845907,f,h=0;h>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f,s=s<<13|s>>>19,l=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(f=0,a){case 3:f^=(i.charCodeAt(h+2)&255)<<16;case 2:f^=(i.charCodeAt(h+1)&255)<<8;case 1:f^=i.charCodeAt(h)&255,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f}return s^=i.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0}t!==void 0&&(t.exports=r)})),Kvr=cie(((e,t)=>{function r(i,n){for(var a=i.length,o=n^a,s=0,l;a>=4;)l=i.charCodeAt(s)&255|(i.charCodeAt(++s)&255)<<8|(i.charCodeAt(++s)&255)<<16|(i.charCodeAt(++s)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)^l,a-=4,++s;switch(a){case 3:o^=(i.charCodeAt(s+2)&255)<<16;case 2:o^=(i.charCodeAt(s+1)&255)<<8;case 1:o^=i.charCodeAt(s)&255,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>15,o>>>0}t.exports=r})),Ire=cdr(cie(((e,t)=>{var r=Zvr(),i=Kvr();t.exports=r,t.exports.murmur3=r,t.exports.murmur2=i}))(),1),Krt=class Jrt{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,i,n){this.ids.push(IQe(t)),this.positions.push(r,i,n)}getPositions(t){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=IQe(t),i=0,n=this.ids.length-1;for(;i>1;this.ids[o]>=r?n=o:i=o+1}let a=[];for(;this.ids[i]===r;){let o=this.positions[3*i],s=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:o,start:s,end:l}),i++}return a}static serialize(t,r){let i=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Rre(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(t){let r=new Jrt;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}};Ui("FeaturePositionMap",Krt);Im=class{constructor(e,t){this.gl=e.gl,this.location=t}},wn=class extends Im{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},qi=class extends Im{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},pa=class extends Im{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]))}},Rf=class extends Im{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]))}},OT=class extends Im{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},Rm=class extends Im{constructor(e,t){super(e,t),this.current=ea.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},Zie=class extends Im{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e.length*4);for(let r=0;r`u_${i}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return this.type==="color"?new Rm(e,t):new qi(e,t)}},zb=class{constructor(e,t){this.uniformNames=t.map(r=>`u_${r}`),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;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new OT(e,t):new qi(e,t)}},xm=class{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new Co(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 Co(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if(this.type==="color"){let i=zre(r);for(let n=e;n`u_${o}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(o=>({name:`a_${o}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new Co(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new Co(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 Co(this.zoom,n),r,i),o=this.expression.evaluate(new Co(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if(this.type==="color"){let n=zre(r),a=zre(i);for(let o=e;o`#define HAS_UNIFORM_${i}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof xm||r instanceof mv)for(let i of r.paintVertexAttributes)e.push(i.name);else if(r instanceof j2){let i=r.getVertexAttributes();for(let n of i)e.push(n.name)}}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof hk||r instanceof zb||r instanceof mv)for(let i of r.uniformNames)e.push(i)}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 hk||n instanceof zb||n instanceof mv){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:n,property:a,binding:o}of t)this.binders[a].setUniform(o,i,r.get(a),n)}updatePaintBuffers(e){this._buffers=[];for(let t in this.binders){let r=this.binders[t];if(e&&r instanceof j2){let i=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof xm||r instanceof mv)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof xm||r instanceof mv||r instanceof j2)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof xm||t instanceof mv||t instanceof j2)&&t.destroy()}}},$b=class{constructor(e,t,r=()=>!0){this.programConfigurations={};for(let i of e)this.programConfigurations[i.id]=new tit(i,t,r);this.needsUpload=!1,this._featureMap=new Krt,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(e,t,i);t.id!==void 0&&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()}};Ui("ConstantBinder",hk),Ui("CrossFadedConstantBinder",zb),Ui("SourceExpressionBinder",xm),Ui("CrossFadedPatternBinder",Qrt),Ui("CrossFadedDasharrayBinder",eit),Ui("CompositeExpressionBinder",mv),Ui("ProgramConfiguration",tit,{omit:["_buffers"]}),Ui("ProgramConfigurationSet",$b);Bre=2**14-1,zQe=-Bre-1;BQe=-32768;Jie=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new qvr,this.indexArray=new Mv,this.segments=new Ws,this.programConfigurations=new $b(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s=i.type==="heatmap";if(i.type==="circle"){let f=i;a=f.layout.get("circle-sort-key"),o=!a.isConstant(),s||(s=f.paint.get("circle-pitch-alignment")==="map")}let l=s?t.subdivisionGranularity.circle:1,u=new Co(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:f,id:h,index:d,sourceLayerIndex:p}of e){let v=tx(f,c);if(!this.layers[0]._featureFilter.filter(u,v,r))continue;let m=o?a.evaluate(v,{},r):void 0,g={id:h,properties:f.properties,type:f.type,sourceLayerIndex:p,index:d,geometry:c?v.geometry:Qb(f),patterns:{},sortKey:m};n.push(g)}o&&n.sort((f,h)=>f.sortKey-h.sortKey);for(let f of n){let{geometry:h,index:d,sourceLayerIndex:p}=f,v=e[d].feature;this.addFeature(f,h,d,r,l),t.featureIndex.insert(v,h,d,p,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Wvr),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 s of t)for(let l of s){let u=l.x,c=l.y;if(u<0||u>=8192||c<0||c>=8192)continue;let f=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),h=f.vertexLength;for(let d=0;dp1r||(p1r=new uc({"circle-sort-key":new Sn(_r.layout_circle["circle-sort-key"],"circle-sort-key")})),m1r=()=>g1r||(g1r=new uc({"circle-radius":new Sn(_r.paint_circle["circle-radius"],"circle-radius"),"circle-color":new Sn(_r.paint_circle["circle-color"],"circle-color"),"circle-blur":new Sn(_r.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new Sn(_r.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new Fi(_r.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new Fi(_r.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new Fi(_r.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new Fi(_r.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new Sn(_r.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new Sn(_r.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new Sn(_r.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),y1r={get paint(){return m1r()},get layout(){return v1r()}},ait=e=>e.type==="circle",x1r=class extends Av{constructor(e,t){super(e,y1r,t)}createBucket(e){return new Jie(e)}queryRadius(e){let t=e;return yT("circle-radius",this,t)+yT("circle-stroke-width",this,t)+OB(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=NB(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),c=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment"),h,d;return f==="map"?(h=l,d=u*a):(h=d1r(l,n,o,s),d=u),nit({queryGeometry:h,size:d,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:f,pitchScale:c},i)}},oit=class extends Jie{};Ui("HeatmapBucket",oit,{omit:["layers"]});b1r=()=>_1r||(_1r=new uc({"heatmap-radius":new Sn(_r.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new Sn(_r.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new Fi(_r.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new zB(_r.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new Fi(_r.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),w1r={get paint(){return b1r()}};UB=class lit{constructor(t,r){rne(this,t,1,r)}resize(t){sit(this,t,1)}clone(){return new lit({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){ine(t,r,i,n,a,1)}},As=class uit{constructor(t,r){rne(this,t,4,r)}resize(t){sit(this,t,4)}replace(t,r){r?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new uit({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){ine(t,r,i,n,a,4)}setPixel(t,r,i){let n=(t*this.width+r)*4;this.data[n+0]=Math.round(i.r*255/i.a),this.data[n+1]=Math.round(i.g*255/i.a),this.data[n+2]=Math.round(i.b*255/i.a),this.data[n+3]=Math.round(i.a*255)}};Ui("AlphaImage",UB),Ui("RGBAImage",As);e8="big-fb",cit=e=>e.type==="heatmap",T1r=class extends Av{createBucket(e){return new oit(e)}constructor(e,t){super(e,w1r,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=nne({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(e8)}queryRadius(e){return yT("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){return nit({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*a,transform:n,unwrappedTileID:o,getElevation:s},i)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},M1r=()=>A1r||(A1r=new uc({"hillshade-illumination-direction":new Fi(_r.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new Fi(_r.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new Fi(_r.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new Fi(_r.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new Fi(_r.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new Fi(_r.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new Fi(_r.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new Fi(_r.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new Fi(_r.paint_hillshade.resampling,"resampling")})),S1r={get paint(){return M1r()}},fit=e=>e.type==="hillshade",E1r=class extends Av{constructor(e,t){super(e,S1r,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(e.length,t.length,r.length,i.length);e=e.concat(Array(n-e.length).fill(e.at(-1))),t=t.concat(Array(n-t.length).fill(t.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=t.map(js);return{directionRadians:e.map(js),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},C1r=()=>k1r||(k1r=new uc({"color-relief-opacity":new Fi(_r["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new zB(_r["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new Fi(_r["paint_color-relief"].resampling,"resampling")})),D1r={get paint(){return C1r()}};vu=class{constructor(e,t,r,i){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,i)}update(e,t,r){var u;let{width:i,height:n}=e,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:o}=this,{gl:s}=o;this.useMipmap=!!(t!=null&&t.useMipmap),a&&this.size&&this.format===s.RGBA&&(s.deleteTexture(this.texture),this.texture=s.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1);let l=this.format===s.RGBA&&(t==null?void 0:t.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===s.RGBA&&i>0&&n>0){let c=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(s.texStorage2D(s.TEXTURE_2D,c,s.RGBA8,i,n),wz(e)){o.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:f}=e;l&&f&&(f=Yte(f)),f&&s.texSubImage2D(s.TEXTURE_2D,0,0,0,i,n,s.RGBA,s.UNSIGNED_BYTE,f)}else o.pixelStoreUnpackPremultiplyAlpha.set(l),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,e)}else wz(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,l,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(e,s));else{let{x:c,y:f}=r||{x:0,y:0};wz(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,l,c,f,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(e,c,f,s))}this.useMipmap&&!(wz(e)&&e.data===null)&&s.generateMipmap(s.TEXTURE_2D),o.pixelStoreUnpackFlipY.setDefault(),o.pixelStoreUnpack.setDefault(),o.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,i,n){let{data:a}=e;t&&a&&(a=Yte(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(e,t,r,i){i.texSubImage2D(i.TEXTURE_2D,0,t,r,i.RGBA,i.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,i,n,a,o){let{data:s}=e;t&&s&&(s=Yte(s)),o.texSubImage2D(o.TEXTURE_2D,0,r,i,n,a,o.RGBA,o.UNSIGNED_BYTE,s)}bind(e,t,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||e;e!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,e),this.magFilter=e),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),t!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,t),this.wrap=t)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},F1r=(Am=class{constructor(t,r,i,n=1,a=1,o=1,s=0){if(this.uid=t,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Ma(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Am.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let c=-2;c=l)&&this.data.copyWithin(this._idx(0,c),f,f+l),this.data.fill(this.data[f],this._idx(-2,c),this._idx(0,c)),this.data.fill(this.data[f+l-1],this._idx(l,c),this._idx(l+1,c)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let c=0;cthis.max&&(this.max=d),d=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),o=((n+2)*this.stride+i+2)*4,s=this.stride*4,l=t-i,u=r-n,c=this._unpackAtIndex(a,o),f=this._unpackAtIndex(a,o+4),h=this._unpackAtIndex(a,o+s),d=this._unpackAtIndex(a,o+s+4);return c*(1-l)*(1-u)+f*l*(1-u)+h*(1-l)*u+d*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,r){if(t<-2||t>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(t+2)}unpack(t,r,i){return t*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(t){return hit(t,this.getUnpackVector())}getPixels(){return new As({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(t,r,i){if(this.dim!==t.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,o=i*this.dim,s=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:o=s-2;break;case 1:s=o+2}let l=-r*this.dim,u=-i*this.dim;for(let c=o;ce.type==="color-relief",L1r=class extends Av{constructor(e,t){super(e,D1r,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof Ek&&r._styleExpression.expression instanceof Zd){this.colorRampExpression=r;let a=r._styleExpression.expression;t.elevationStops=a.labels,t.colorStops=[];for(let o of t.elevationStops)t.colorStops.push(a.evaluate({globals:{elevation:o}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[ea.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let i={elevationStops:[],colorStops:[]},n=(t.elevationStops.length-1)/(e-1);for(let a=0;ae)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){let t=1<32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(e)|0,i=Math.round(t)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(e){if(this._granularity<2)return tgr(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i=1||_<=0)||m&&(ln)){c>=i&&c<=n&&a.push(r[(o+1)%3]);continue}if(!m&&b>0){let T=s+d*b,A=l+p*b;a.push(this._vertexToIndex(T,A))}let M=s+d*Math.max(b,0),x=s+d*Math.min(_,1);if(v||this._generateIntraEdgeVertices(a,s,l,u,c,M,x),!m&&_<1){let T=s+d*_,A=l+p*_;a.push(this._vertexToIndex(T,A))}(m||c>=i&&c<=n)&&a.push(r[(o+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,s,l,u,c,f,h,x,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,u=l===0,c=u?Math.min(t,i):Math.min(a,o),f=u?Math.max(t,i):Math.max(a,o),h=Math.floor(c/this._granularityCellSize)+1,d=Math.ceil(f/this._granularityCellSize)-1;if(u?t=h;p--){let v=p*this._granularityCellSize,m=r+l*(v-t)/s;e.push(this._vertexToIndex(v,m))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,u){let c=n-r,f=a-i,h=o-n,d=(l-n)/h,p=(u-n)/h,v=Math.min(d,p),m=Math.max(d,p),g=i+f*v,w=Math.floor(Math.min(g,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(g,s)/this._granularityCellSize)-1,_=s=1||m<=0){let T=t-a,A=r-o,y=(l-o)/A,E=(u-o)/A,S=a+T*Math.min(y,E);w=Math.floor(Math.min(S,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(S,s)/this._granularityCellSize)-1,_=s0?u:l;if(_)for(let T=w;T<=b;T++){let A=T*this._granularityCellSize;e.push(this._vertexToIndex(A,x))}else for(let T=b;T>=w;T--){let A=T*this._granularityCellSize;e.push(this._vertexToIndex(A,x))}}_generateOutline(e){let t=[];for(let r of e){let i=qb(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let o=1;on==(a===-32768)?(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))):(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a)),e.push(this._vertexToIndex(i,a)))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=zr,a=e.length;for(let o=2;o=2&&((o=this._canonical)==null?void 0:o.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(s=>this._removeLinesOutsideTileX(s))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(e){let t=this._vertexBuffer[e*2];return t<0||t>8192}_removeTrianglesOutsideTileX(e){let t=[];for(let r=0;rt.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Ovr,this.indexArray=new Mv,this.indexArray2=new Lre,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.segments2=new Ws,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=Jz("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],o=new Co(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=tx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let d=n?i.evaluate(h,{},r,t.availableImages):void 0,p={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:Qb(l),patterns:{},sortKey:d};a.push(p)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;if(this.hasDependencies){let d=ane("fill",this.layers,l,{zoom:this.zoom},t);this.patternFeatures.push(d)}else this.addFeature(l,u,c,r,{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:e,canonical:t,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,e.subdivisionGranularity)}detectSdfPatterns(e){for(let t of this.patternFeatures)for(let r in t.patterns){let i=t.patterns[r];this.recordSdfPattern(r,e[i.min]),this.recordSdfPattern(r,e[i.mid]),this.recordSdfPattern(r,e[i.max])}for(let t of this.layers){let r=t.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(t.id,e[r.from.toString()]),this.recordSdfPattern(t.id,e[r.to.toString()]))}}recordSdfPattern(e,t){if(!t)return;let r=t.sdf===!0,i=this.sdfPatterns[e];i===void 0?this.sdfPatterns[e]=r:i!==r&&Ma(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,P1r),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 o of AB(t,500)){let s=yit(o,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;xit((u,c)=>{l.emplaceBack(u,c)},this.segments,this.layoutVertexArray,this.indexArray,s.verticesFlattened,s.indicesTriangles,this.segments2,this.indexArray2,s.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}};Ui("FillBucket",_it,{omit:["layers","patternFeatures"]});ogr=()=>agr||(agr=new uc({"fill-sort-key":new Sn(_r.layout_fill["fill-sort-key"],"fill-sort-key")})),lgr=()=>sgr||(sgr=new uc({"fill-antialias":new Fi(_r.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new Sn(_r.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new Fi(_r.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new Sn(_r.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new Sn(_r.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new Fi(_r.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new Fi(_r.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new Ck(_r.paint_fill["fill-pattern"],"fill-pattern")})),ugr={get paint(){return lgr()},get layout(){return ogr()}},bit=e=>e.type==="fill",cgr=class extends Av{constructor(e,t){super(e,ugr,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new _it(e)}queryRadius(){return OB(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return rit(NB(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}},Wre=ol([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),fgr=ol([{name:"a_centroid",components:2,type:"Int16"}],4),hgr=Wre.members;Wre.size,Wre.alignment;Jd=class Yre{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){let r=new Yre;return r.extend(t(new tr(this.minX,this.minY))),r.extend(t(new tr(this.maxX,this.minY))),r.extend(t(new tr(this.minX,this.maxY))),r.extend(t(new tr(this.maxX,this.maxY))),r}static fromPoints(t){let r=new Yre;for(let i of t)r.extend(i);return r}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}},wit=Jd.fromPoints([new tr(0,0),new tr(zr,zr)]);t8=class{constructor(e,t,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n;e.pos>3,a===0)continue}if(a--,n===1)o+=e.readSVarint(),s+=e.readSVarint(),i&&r.push(i),i=[new tr(o,s)];else if(n===2)o+=e.readSVarint(),s+=e.readSVarint(),i&&i.push(new tr(o,s));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let 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,u=-1/0;for(;e.pos>3,i===0)continue}if(i--,r===1||r===2)n+=e.readSVarint(),a+=e.readSVarint(),ns&&(s=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[o,l,s,u]}toGeoJSON(e,t,r){let i=this.extent*2**r,n=this.extent*e,a=this.extent*t,o=this.loadGeometry();function s(f){return[(f.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(f.y+a)*2/i)*Math.PI))-90]}function l(f){return f.map(s)}let u;if(this.type===1){let f=[];for(let d of o)f.push(d[0]);let h=l(f);u=f.length===1?{type:"Point",coordinates:h[0]}:{type:"MultiPoint",coordinates:h}}else if(this.type===2){let f=o.map(l);u=f.length===1?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}}else if(this.type===3){let f=Tit(o),h=[];for(let d of f)h.push(d.map(l));u=h.length===1?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}else throw Error("unknown feature type");let c={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(c.id=this.id),c}};t8.types=["Unknown","Point","LineString","Polygon"];pgr=class{constructor(e,t){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],t===void 0&&(t=e.length);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 t8(this._pbf,t,this.extent,this._keys,this._values)}};ggr=class{constructor(e,t=e.length){let r=Object.create(null);for(;e.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dk(B0(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){let r=Math.PI/180,i=this.lat*r,n=t.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((t.lng-this.lng)*r);return zf*Math.acos(Math.min(a,1))}static convert(t){if(t instanceof dk)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new dk(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t)return new dk(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},Ait=2*Math.PI*zf;wo=class Sit{constructor(t,r,i=0){this.x=+t,this.y=+r,this.z=+i}static fromLngLat(t,r=0){let i=mn.convert(t);return new Sit(e3(i.lng),t3(i.lat),rx(r,i.lat))}toLngLat(){return new mn(GB(this.x),LT(this.y))}toAltitude(){return one(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Ait*mgr(LT(this.y))}},ix=89.25;Xte=8192;kit=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new Nvr,this.centroidVertexArray=new Pm,this.indexArray=new Mv,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.features=[],this.hasDependencies=Jz("fill-extrusion",this.layers,t);let i=new Co(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),o=n._featureFilter.needGeometry;for(let{feature:s,id:l,index:u,sourceLayerIndex:c}of e){let f=tx(s,o);if(!n._featureFilter.filter(i,f,r))continue;let h=o?f.geometry:Qb(s),d={id:l,sourceLayerIndex:c,index:u,geometry:a>0?GQe(h,a,r):h,properties:s.properties,type:s.type,patterns:{}};this.hasDependencies?this.features.push(ane("fill-extrusion",this.layers,d,{zoom:this.zoom},t)):this.addFeature(d,d.geometry,u,r,{},t.subdivisionGranularity),t.featureIndex.insert(s,d.geometry,u,c,this.index,!0)}}addFeatures({options:e,canonical:t,patternPositions: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 this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,hgr),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,fgr.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){let o=this.layers[0],s=o.layout?o.layout.get("fill-extrusion-rounded-corner-distance"):0,l=s>0?GQe(t,s,i):t;for(let u of AB(l,500)){let c={x:0,y:0,sampleCount:0},f=this.layoutVertexArray.length;this.processPolygon(c,i,e,u,a);let h=this.layoutVertexArray.length-f,d=Math.floor(c.x/c.sampleCount),p=Math.floor(c.y/c.sampleCount);for(let v=0;v{ok(u,c,f,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let i=1;iWs.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let o=n.sub(a)._perp()._unit(),s=a.dist(n);r+s>32768&&(r=0),ok(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,0,r),ok(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,1,r),r+=s,ok(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,0,r),ok(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}};Ui("FillExtrusionBucket",kit,{omit:["layers","features"]});Mgr=()=>Agr||(Agr=new uc({"fill-extrusion-rounded-corner-distance":new Fi(_r["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Egr=()=>Sgr||(Sgr=new uc({"fill-extrusion-opacity":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new Ck(_r["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),kgr={get paint(){return Egr()},get layout(){return Mgr()}},Cit=e=>e.type==="fill-extrusion",Cgr=class extends Av{constructor(e,t){super(e,kgr,t)}createBucket(e){return new kit(e)}queryRadius(){return OB(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=NB(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),u=this.paint.get("fill-extrusion-base").evaluate(t,r),c=Lgr(s,o,0),f=Fgr(i,u,l,o),h=f[0],d=f[1];return Dgr(h,d,c)}};IXr=new Uint32Array(96),Pgr="geojsonvt_clip_start",Igr="geojsonvt_clip_end",Zre=ol([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),Rgr=Zre.members;Zre.size,Zre.alignment;Kre=ol([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),zgr=Kre.members;Kre.size,Kre.alignment;Bgr=Math.cos(75/2*(Math.PI/180)),Dit=1/2,jQe=2**14/Dit,Fit=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let t of this.layers)this.gradients[t.id]={};this.layoutVertexArray=new Uvr,this.layoutVertexArray2=new Vvr,this.indexArray=new Mv,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=Jz("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],o=new Co(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=tx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let d=n?i.evaluate(h,{},r):void 0,p={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:Qb(l),patterns:{},dashes:{},sortKey:d};a.push(p)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;this.hasDependencies?(Jz("line",this.layers,t)?ane("line",this.layers,l,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,t),this.patternFeatures.push(l)):this.addFeature(l,u,c,r,{},{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:e,canonical:t,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,zgr)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Rgr),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[Pgr],end:+e.properties[Igr]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),u=s.get("line-cap").evaluate(e,{}),c=s.get("line-miter-limit").evaluate(e,{}),f=s.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let h of t)this.addLine(h,e,l,u,c,f,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){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=o?s.line.getGranularityForZoomLevel(o.z):1;if(e=qb(e,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let b=0;b=2&&e[c-1].equals(e[c-2]);)c--;let f=0;for(;f0;if(y&&b>f){let k=p.dist(v);if(k>2*h){let D=p.sub(p.sub(v)._mult(h/k)._round());this.updateDistance(v,D),this.addCurrentVertex(D,g,0,0,d),v=D}}let S=v&&m,C=S?r:u?"butt":i;if(S&&C==="round"&&(Tn&&(C="bevel"),C==="bevel"&&(T>2&&(C="flipbevel"),T100)_=w.mult(-1);else{let k=T*g.add(w).mag()/g.sub(w).mag();_._perp()._mult(k*(E?-1:1))}this.addCurrentVertex(p,_,0,0,d),this.addCurrentVertex(p,_.mult(-1),0,0,d)}else if(C==="bevel"||C==="fakeround"){let k=-Math.sqrt(T*T-1),D=E?k:0,F=E?0:k;if(v&&this.addCurrentVertex(p,g,D,F,d),C==="fakeround"){let P=Math.round(A*180/Math.PI/20);for(let R=1;R2*h){let D=p.add(m.sub(p)._mult(h/k)._round());this.updateDistance(p,D),this.addCurrentVertex(D,w,0,0,d),p=D}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*i,u=-t.y-t.x*i;this.addHalfVertex(e,o,s,a,!1,r,n),this.addHalfVertex(e,l,u,a,!0,-i,n),this.distance>jQe/2&&this.totalDistance===0&&(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=(this.lineClips?this.scaledDistance*(jQe-1):this.scaledDistance)*Dit;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(o===0?0:o<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}let u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),s.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let r=t.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let o=n.layout.get("line-cap").evaluate(t,{})==="round",s={dasharray:a.value.evaluate({zoom:r-1},t,{}),round:o},l={dasharray:a.value.evaluate({zoom:r},t,{}),round:o},u={dasharray:a.value.evaluate({zoom:r+1},t,{}),round:o},c=`${s.dasharray.join(",")},${s.round}`,f=`${l.dasharray.join(",")},${l.round}`,h=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[c]=s,i.dashDependencies[f]=l,i.dashDependencies[h]=u,t.dashes[n.id]={min:c,mid:f,max:h}}}};Ui("LineBucket",Fit,{omit:["layers","patternFeatures"]});Ogr=()=>qgr||(qgr=new uc({"line-cap":new Sn(_r.layout_line["line-cap"],"line-cap"),"line-join":new Sn(_r.layout_line["line-join"],"line-join"),"line-miter-limit":new Sn(_r.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new Sn(_r.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new Sn(_r.layout_line["line-sort-key"],"line-sort-key")})),Ugr=()=>Ngr||(Ngr=new uc({"line-opacity":new Sn(_r.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new Fi(_r.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new Sn(_r.paint_line["line-color"],"line-color"),"line-translate":new Fi(_r.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new Fi(_r.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new Sn(_r.paint_line["line-width"],"line-width"),"line-gap-width":new Sn(_r.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new Sn(_r.paint_line["line-offset"],"line-offset"),"line-blur":new Sn(_r.paint_line["line-blur"],"line-blur"),"line-dasharray":new Ck(_r.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new Ck(_r.paint_line["line-pattern"],"line-pattern"),"line-gradient":new zB(_r.paint_line["line-gradient"],"line-gradient")})),$Qe={get paint(){return Ugr()},get layout(){return Ogr()}},Vgr=class extends Sn{possiblyEvaluate(e,t){return t=new Co(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=ln({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}},Lit=e=>e.type==="line",Ggr=class extends Av{constructor(e,t){super(e,$Qe,t),this.gradientVersion=0,Mz||(Mz=new Vgr($Qe.paint.properties["line-width"].specification,"line-floorwidth"),Mz.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let t=this.gradientExpression();this.stepInterpolant=evr(t)?t._styleExpression.expression instanceof Die:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=Mz.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Fit(e)}queryRadius(e){let t=e,r=WQe(yT("line-width",this,t),yT("line-gap-width",this,t)),i=yT("line-offset",this,t);return r/2+Math.abs(i)+OB(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let o=NB(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),s=a/2*WQe(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),l=this.paint.get("line-offset").evaluate(t,r);return l&&(i=l1r(i,l*a)),r1r(o,i,s)}isTileClipped(){return!0}};Hgr=ol([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),jgr=ol([{name:"a_projected_pos",components:3,type:"Float32"}],4);ol([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);$gr=ol([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ol([{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"}]);YQe=ol([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Pit=ol([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ol([{name:"triangle",components:3,type:"Uint16"}]),ol([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Float32",name:"heightOffset"}]),ol([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"},{type:"Float32",name:"heightOffset"}]),ol([{type:"Float32",name:"offsetX"}]),ol([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ol([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);tB=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(tB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return Ki(this,null,function*(){if(this.isParsed())return this.getState();if(e.pluginStatus!=="loading")return this.setState(e),e;let r=e.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield t(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};Qgr={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},emr={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},tmr={\u0644\u0622:[65269,65270],\u0644\u0623:[65271,65272],\u0644\u0625:[65273,65274],\u0644\u0627:[65275,65276]},ZQe=1604,rmr=/[\u0600-\u06ff\u0750-\u077f\u0870-\u089f\u08a0-\u08ff\ufb50-\ufdff\ufe70-\ufeff]/;Rit=new Map;for(let[e,t]of Object.entries(Qgr))imr(t,e,Rit);zit=typeof Intl<"u"&&"Segmenter"in Intl;vT={"!":"\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"};bmr={10:!0,13:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},wmr={40:!0};cne=class eie{constructor(t="",r=[],i=[]){this.text=t,this.sections=r,this.sectionIndex=i,this.imageSectionID=null,this._graphemes=null}graphemes(){var t;return(t=this._graphemes)!=null||(this._graphemes=Jre(this.text)),this._graphemes}static fromFeature(t,r){let i=new eie;for(let n of t.sections)n.image?i.addImageSection(n):i.addTextSection(n,r);return i}length(){return this.graphemes().length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=_mr(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200B")}trim(){let t=this.graphemes(),r=0;for(;rr&&eet(t[i-1]);)i--;this.text=t.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(t,r){let i=this.graphemes().slice(t,r).join(""),n=this.sectionIndex.slice(t,r);return new eie(i,this.sections,n)}toCodeUnitIndex(t){return this.graphemes().slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,r)=>Math.max(t,this.sections[r].scale),0)}getMaxImageSize(t){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=Jre(n+t);this.text+=t,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let o=a.length-+!!n;for(let s=0;s=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,r,i,n,a){let o=[],s=this.determineAverageLineWidth(t,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),c=null,f=0,h=0;for(let d=0;d0){let v=u[d-1].codePointAt(0),m=p.codePointAt(0),g=Xgr(v),w=XQe(v)&&XQe(m);(bmr[v]||g||"imageName"in this.getSection(d-1)||u[d+1]!==void 0&&wmr[m]||w&&(c!=null?c:c=mmr(this.text)).has(h))&&o.push(tet(d,f,s,o,Tmr(v,m,g&&l),!1))}une(p.codePointAt(0))||(f+=JQe(p,this.getSection(d),i,n,t,a)),h+=p.length}return Nit(tet(this.length(),f,s,o,0,!0))}determineAverageLineWidth(t,r,i,n,a){let o=0,s=0;for(let u of this.graphemes()){let c=this.getSection(s);o+=JQe(u,c,i,n,t,a),s++}let l=Math.max(1,Math.ceil(o/r));return o/l}};fne=Amr(),Mmr=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/,Smr=new Set(["WS","FSI","LRI","RLI","PDI"]),Emr=new Set(["S","B"]);tie=4294967296,RXr=1/tie,ret=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Vit=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,t,r=this.length){let i;for(;i=this.nextField(r);)e(i,t,this);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)+this.dataView.getUint32(this.pos+4,!0)*tie;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*tie;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=t[this.pos++];if(r<128)return r;let i=r&127,n;return n=t[this.pos++],i|=(n&127)<<7,n<128||(n=t[this.pos++],i|=(n&127)<<14,n<128)||(n=t[this.pos++],i|=(n&127)<<21,n<128)?i:(n=t[this.pos],i|=(n&15)<<28,Bmr(i,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&ret?ret.decode(this.buf.subarray(t,e)):Omr(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.pos=e)return 0;let t=this.readVarint();return this.type=t&7,this._valueStart=this.pos,t>>>3}skip(e){let t=e&7;if(t===0)for(;this.buf[this.pos++]>127;);else if(t===2)this.pos=this.readVarint()+this.pos;else if(t===5)this.pos+=4;else if(t===1)this.pos+=8;else throw Error(`Unimplemented type: ${t}`)}};WB=class{constructor(e,{pixelRatio:t,version:r,isWebGLImage:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=n,this.stretchY=a,this.content=o,this.version=r,this.needsFirstWebGLRender=i,this.textFitWidth=s,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},Gmr=class{constructor(e,t){let r={},i={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let n=[];this.addImages(e,r,n),this.addImages(t,i,n);let{w:a,h:o}=hne(n),s=new As({width:a||1,height:o||1});for(let l in e){let u=e[l];if(u.isWebGLImage)continue;let c=r[l].paddedRect;As.copy(u.data,s,{x:0,y:0},{x:c.x+1,y:c.y+1},u.data)}for(let l in t){let u=t[l],c=i[l].paddedRect,f=c.x+1,h=c.y+1,d=u.data.width,p=u.data.height;As.copy(u.data,s,{x:0,y:0},{x:f,y:h},u.data),As.copy(u.data,s,{x:0,y:p-1},{x:f,y:h-1},{width:d,height:1}),As.copy(u.data,s,{x:0,y:0},{x:f,y:h+p},{width:d,height:1}),As.copy(u.data,s,{x:d-1,y:0},{x:f-1,y:h},{width:1,height:p}),As.copy(u.data,s,{x:0,y:0},{x:f+d,y:h},{width:1,height:p})}this.image=s,this.iconPositions=r,this.patternPositions=i}addImages(e,t,r){for(let i in e){let n=e[i],a={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(a),t[i]=new WB(a,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(e,t){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUpdateVersion=e.updateVersion;for(let r in this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}}patchUpdatedImage(e,t,r){var l;if(!e||!t||!e.needsFirstWebGLRender&&e.version===t.version)return;e.needsFirstWebGLRender=!1,e.version=t.version;let[i,n]=e.tl,a=(l=t.userImage)==null?void 0:l.data;if(!i8(a)){r.update(t.data,void 0,{x:i,y:n});return}let{width:o,height:s}=t.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:i,y:n,width:o,height:s}),r.context.setDirty()}};Ui("ImagePosition",WB),Ui("ImageAtlas",Gmr);jit=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(jit||{});iet=new RegExp("^\\p{gc=M}$","u");oet=32640;bT=class Zit extends tr{constructor(t,r,i,n){super(t,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Zit(this.x,this.y,this.angle,this.segment)}};Ui("Anchor",bT);Lz=class{constructor(e,t,r,i,n,a,o,s,l,u){var c;if(this.boxStartIndex=e.length,l){let f=a.top,h=a.bottom,d=a.collisionPadding;d&&(f-=d[1],h+=d[3]);let p=h-f;p>0&&(p=Math.max(10,p),this.circleDiameter=p)}else{let f=(c=a.image)!=null&&c.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xit(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};f.y1=f.y1*o-s[0],f.y2=f.y2*o+s[2],f.x1=f.x1*o-s[3],f.x2=f.x2*o+s[1];let h=a.collisionPadding;if(h&&(f.x1-=h[0]*o,f.y1-=h[1]*o,f.x2+=h[2]*o,f.y2+=h[3]*o),u){let d=new tr(f.x1,f.y1),p=new tr(f.x2,f.y1),v=new tr(f.x1,f.y2),m=new tr(f.x2,f.y2),g=u*Math.PI/180;d._rotate(g),p._rotate(g),v._rotate(g),m._rotate(g),f.x1=Math.min(d.x,p.x,v.x,m.x),f.x2=Math.max(d.x,p.x,v.x,m.x),f.y1=Math.min(d.y,p.y,v.y,m.y),f.y2=Math.max(d.y,p.y,v.y,m.y)}e.emplaceBack(t.x,t.y,f.x1,f.y1,f.x2,f.y2,r,i,n)}this.boxEndIndex=e.length}},gyr=class{constructor(e=[],t=(r,i)=>ri)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)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(;e=0)break;t[e]=t[a],e=a}t[e]=n}};dT=class{constructor(e,t,r,i){this.p=new tr(e,t),this.h=r,this.d=xyr(this.p,i),this.max=this.d+this.h*Math.SQRT2}};XB=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({}),pne=1/0;Syr=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];iie=class{constructor(e){this.layoutVertexArray=new Gvr,this.indexArray=new Mv,this.programConfigurations=e,this.segments=new Ws,this.dynamicLayoutVertexArray=new Hvr,this.opacityVertexArray=new jvr,this.hasVisibleVertices=!1,this.placedSymbolArray=new Brt}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,t,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Hgr.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,jgr.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Syr,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};Ui("SymbolBuffers",iie);nie=class{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Ws,this.collisionVertexArray=new $vr}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,$gr.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};Ui("CollisionBuffers",nie);s8=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(o=>o.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=set(this.zoom,t["text-size"]),this.iconSizeData=set(this.zoom,t["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=zk(r,"text-overlap","text-allow-overlap")!=="never"||zk(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(o=>jit[o])),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id),this.sourceID=e.sourceID}createArrays(){this.text=new iie(new $b(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new iie(new $b(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new Nrt,this.lineVertexArray=new Urt,this.symbolInstances=new Ort,this.textAnchorOffsets=new Grt}calculateGlyphDependencies(e,t,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,o=cne.fromFeature(e,r),s=o.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=s.value.kind!=="constant"||!!s.value.value||Object.keys(s.parameters).length>0,c=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let f=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,p=new Co(this.zoom);for(let{feature:m,id:g,index:w,sourceLayerIndex:b}of e){let _=i._featureFilter.needGeometry,M=tx(m,_);if(!i._featureFilter.filter(p,M,r))continue;_||(M.geometry=Qb(m));let x;if(l){let E=i.getValueAndResolveTokens("text-field",M,r,d),S=Mm.factory(E);this.hasRTLText||(this.hasRTLText=Eyr(S)),x=vmr(S,i,M)}let T;if(u){let E=i.getValueAndResolveTokens("icon-image",M,r,d);T=E instanceof Z1?E:Z1.fromString(E)}if(!x&&!T)continue;let A=this.sortFeaturesByKey?c.evaluate(M,{},r):void 0,y={id:g,text:x,icon:T,index:w,sourceLayerIndex:b,geometry:M.geometry,properties:m.properties,type:t8.types[m.type],sortKey:A};if(this.features.push(y),T&&(f[T.name]=!0),x){let E=a.evaluate(M,{},r).join(","),S=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(v=this.writingModes)==null?void 0:v.includes(2);let C=Qre(x.toString());this.calculateGlyphDependencies(x,h,E,S,C);for(let k of x.sections)k.image&&(f[k.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=gmr(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.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}))}addFeatures({options:e,canonical:t,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:o}){byr({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:o,canonical:t,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(e.segment!==void 0){let i=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),a={};for(let o=e.segment+1;o=0;o--)a[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:n},o>0&&(n+=t[o-1].dist(t[o]));for(let o=0;o0}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+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[o]-i[s]||n[s]-n[o]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0: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)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let t of this.symbolInstanceIndexes){let r=this.symbolInstances.get(t);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};Ui("SymbolBucket",s8,{omit:["layers","collisionBoxArray","features","compareText"]});Dyr=()=>Cyr||(Cyr=new uc({"symbol-placement":new Fi(_r.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new Fi(_r.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new Fi(_r.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new Sn(_r.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new Fi(_r.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new Fi(_r.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new Fi(_r.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new Fi(_r.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new Fi(_r.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new Sn(_r.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new Sn(_r.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new Fi(_r.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new Fi(_r.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new Sn(_r.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new Sn(_r.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new Sn(_r.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new Fi(_r.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new Sn(_r.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new Sn(_r.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new Fi(_r.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new Fi(_r.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new Fi(_r.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new Sn(_r.layout_symbol["text-field"],"text-field"),"text-font":new Sn(_r.layout_symbol["text-font"],"text-font"),"text-size":new Sn(_r.layout_symbol["text-size"],"text-size"),"text-max-width":new Sn(_r.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new Fi(_r.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new Sn(_r.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new Sn(_r.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new Sn(_r.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new Fi(_r.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new Sn(_r.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new Sn(_r.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new Fi(_r.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new Fi(_r.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new Sn(_r.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new Fi(_r.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new Fi(_r.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new Sn(_r.layout_symbol["text-transform"],"text-transform"),"text-offset":new Sn(_r.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new Fi(_r.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new Fi(_r.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new Fi(_r.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new Fi(_r.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new Sn(_r.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new Fi(_r.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Lyr=()=>Fyr||(Fyr=new uc({"icon-opacity":new Sn(_r.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new Sn(_r.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new Sn(_r.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new Sn(_r.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new Sn(_r.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new Fi(_r.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new Fi(_r.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new Sn(_r.paint_symbol["text-opacity"],"text-opacity"),"text-color":new Sn(_r.paint_symbol["text-color"],"text-color",{runtimeType:xv,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new Sn(_r.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new Sn(_r.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new Sn(_r.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new Fi(_r.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new Fi(_r.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Zte={get paint(){return Lyr()},get layout(){return Dyr()}},ant=class{constructor(e){if(e.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:$k,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t!=null&&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){if(!this.defaultValue.isConstant()){let t=this.defaultValue.value;e(t._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};Ui("FormatSectionOverride",ant,{omit:["defaultValue"]});vne=e=>e.type==="symbol",Pyr=class aie extends Av{constructor(t,r){super(t,Zte,r)}recalculate(t,r){super.recalculate(t,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new Yd(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let o of n)a.includes(o)||a.push(o);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,i,n){let a=this.layout.get(t).evaluate(r,{},i,n),o=this._unevaluatedLayout._values[t];return!o.isDataDriven()&&!CB(o.value)&&a?kyr(r.properties,a):a}createBucket(t){return new s8(t)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of Zte.paint.overridableProperties){if(!aie.hasPaintOverride(this.layout,t))continue;let r=this.paint.get(t),i=new Uie(new ant(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new Ek("source",i):new $z("composite",i,r.value.zoomStops),this.paint._values[t]=new Yd(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:aie.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){let i=t.get("text-field"),n=Zte.paint.properties[r],a=!1,o=s=>{var l;for(let u of s)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof Mm)o(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let s=u=>{if(!a)if(u instanceof ST&&Ql(u.value)===Wk){let c=u.value;o(c.sections)}else u instanceof Mtt?o(u.sections):u.eachChild(s)},l=i.value;l._styleExpression&&s(l._styleExpression.expression)}return a}};zyr=()=>Ryr||(Ryr=new uc({"background-color":new Fi(_r.paint_background["background-color"],"background-color"),"background-pattern":new Irt(_r.paint_background["background-pattern"],"background-pattern"),"background-opacity":new Fi(_r.paint_background["background-opacity"],"background-opacity")})),Byr={get paint(){return zyr()}},ont=e=>e.type==="background",qyr=class extends Av{constructor(e,t){super(e,Byr,t)}};lnt=e=>e.type==="custom",Oyr=class extends Av{constructor(e,t){super(e,{},t),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};Nyr=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,(e=this._channel)==null||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},Uyr={once:!0},unt=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Nyr(()=>this.process()),this.subscription=Nz(this.target,"message",r=>this.receive(r),!1),this.globalScope=Hb(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(Math.random()*1e18).toString(36).substring(0,10),a=t?Nz(t.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new RT(t.signal.reason))},Uyr):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let o=[],s=ma(fn({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:xk(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(s=>i.includes(s));if((a||o)&&!(t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[r];let s=this.abortControllers[r];delete this.abortControllers[r],s&&s.abort();return}if(Hb(self)||t.mustQueue){this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,t)}}process(){if(this.taskQueue.length===0)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 Ki(this,null,function*(){if(t.type===""){let n=this.resolveRejects[e];if(delete this.resolveRejects[e],!n)return;t.error?n.reject(Ic(_k(t.error))):n.resolve(_k(t.data));return}if(!this.messageHandlers[t.type]){this.completeTask(e,null,null);return}let r=_k(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(n){this.completeTask(e,Ic(n))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?xk(t):null,data:xk(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};l8=class{constructor(e,t,r){if(!Vyr(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=Vb(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let i=Gyr(this.x,this.y,this.z),n=Hyr(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}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=2**this.z;return new tr((e.x*t-this.x)*zr,(e.y*t-this.y)*zr)}toString(){return`${this.z}/${this.x}/${this.y}`}},u8=class{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Vb(e,t.z,t.z,t.x,t.y)}},Bc=class $d{constructor(t,r,i,n,a){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${i}`);this.overscaledZ=t,this.wrap=r,this.canonical=new l8(i,+n,+a),this.key=Vb(r,t,i,n,a)}clone(){return new $d(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-t;return t>this.canonical.z?new $d(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $d(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,r){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-t;return t>this.canonical.z?Vb(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):Vb(this.wrap*+r,t,t,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(t){if(t.wrap!==this.wrap||this.overscaledZ-t.overscaledZ<=0)return!1;if(t.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-t.canonical.z;return r<0?!1:t.canonical.x===this.canonical.x>>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new $d(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new $d(r,this.wrap,r,i,n),new $d(r,this.wrap,r,i+1,n),new $d(r,this.wrap,r,i,n+1),new $d(r,this.wrap,r,i+1,n+1)]}isLessThan(t){return this.wrapt.wrap?!1:this.overscaledZt.overscaledZ?!1:this.canonical.xt.canonical.x?!1:this.canonical.y=0&&t=0&&r=u)return null;let f=this.canonical.x+n,h=this.wrap;return f<0?(h-=Math.ceil(-f/u),f=(f%u+u)%u):f>=u&&(h+=Math.floor(f/u),f%=u),{tileID:new $d(this.overscaledZ,h,l,f,c),x:o,y:s}}};Kte=Math.PI*6378137;Ui("CanonicalTileID",l8),Ui("OverscaledTileID",Bc,{omit:["terrainRttPosMatrix32f"]});c8="_geojsonTileLayer",jyr=class{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]}},yne=class{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t;for(let a in e.properties)typeof e.properties[a]=="string"&&e.properties[a].startsWith("__$json__:")&&(e.properties[a]=JSON.parse(e.properties[a].slice(10)));this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[(e.x+t)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+r)*2/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(n=>this.projectPoint(n,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*2**this._z,r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let a=[];for(let s of n)a.push(s[0]);let o=this.projectLine(a,r,i,t);this._geometry=a.length===1?{type:"Point",coordinates:o[0]}:{type:"MultiPoint",coordinates:o};break}case 2:{let a=n.map(o=>this.projectLine(o,r,i,t));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=Tit(n),o=[];for(let s of a)o.push(s.map(l=>this.projectLine(l,r,i,t)));this._geometry=o.length===1?{type:"Polygon",coordinates:o[0]}:{type:"MultiPolygon",coordinates:o};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)t!=="_geometry"&&t!=="_vectorTileFeature"&&t!=="_x"&&t!=="_y"&&t!=="_z"&&(e[t]=this[t]);return e}},r3=class{constructor(e,t,r){this._name=e,this.dataBuffer=t,typeof r=="number"?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((t=this.nullabilityBuffer)==null?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},KB=class extends r3{},xne=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},_ne=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},cnt=class extends r3{constructor(e,t,r,i){super(e,t,i),this.delta=r}},bne=class extends cnt{constructor(e,t,r,i,n){super(e,n?Int32Array.of(t):Uint32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},wne=class extends r3{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},$yr=class{constructor(e,t,r,i,n=4096){if(this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n,e.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var e;return(e=this._propertyVectors)!=null?e:[]}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(t=>[t.name,t]))),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;oie=Tne,dnt=65536;sie=Yyr(dnt),y2r=3*sie/256+sie|0;(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(pu||(pu={}));(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(sh||(sh={}));(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(wm||(wm={}));(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(lc||(lc={}));lxr=[pu.PRESENT,pu.DATA,pu.OFFSET,pu.LENGTH],met=[da.NONE,da.DELTA,da.COMPONENTWISE_DELTA,da.RLE,da.MORTON],uxr=[Kd.NONE,Kd.FAST_PFOR,Kd.VARINT],cxr=[sh.NONE,sh.SINGLE,sh.SHARED,sh.VERTEX,sh.MORTON,sh.FSST],fxr=[wm.VERTEX,wm.INDEX,wm.STRING,wm.KEY],hxr=[lc.VAR_BINARY,lc.GEOMETRIES,lc.PARTS,lc.RINGS,lc.TRIANGLES,lc.SYMBOL,lc.DICTIONARY];(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Gs||(Gs={}));bv=class{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8),r=e%8;return(this.values[t]>>r&1)==1}set(e,t){let r=Math.floor(e/8),i=e%8;this.values[r]=this.values[r]|+!!t<>r&1}size(){return this._size}getBuffer(){return this.values}};_xr=new TextDecoder;Snt=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},Ent=class extends cnt{constructor(e,t,r,i,n){super(e,n?BigInt64Array.of(t):BigUint64Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}};(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(uf||(uf={}));(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(Lxr||(Lxr={}));(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(n3||(n3={}));knt=class{constructor(e,t,r,i,n){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=i,this._mortonSettings=n}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let r=this.vertexOffsets[e],i=this.vertexBuffer[r],n=Dne(i,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[n.x,n.y]}let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return Pxr(this)}get mortonSettings(){return this._mortonSettings}};Cnt=class extends knt{constructor(e,t,r,i,n,a,o){super(r,i,n,a,o),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===uf.POLYGON||this._geometryType===uf.MULTIPOLYGON}containsSingleGeometryType(){return!0}};Fnt=class extends knt{constructor(e,t,r,i,n,a){super(e,r,i,n,a),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;ema(fn({},r),{[i.name]:new S_r(i)}),{})}},k_r=class{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new fre(zr,16,0),this.grid3D=new fre(zr,16,0),this.featureIndexArray=new jrt,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 l of t){let u=[1/0,1/0,-1/0,-1/0];for(let c of l)u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new E_r(this.rawTileData).layers:this.vtLayers=new ggr(new Vit(this.rawTileData)).layers,this.sourceLayerCoder=new jyr(this.vtLayers?Object.keys(this.vtLayers).sort():[c8])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=zr/e.tileSize/e.scale,o=CT(n.filter,"queryRenderedFeatures filter",n.globalState),s=e.queryGeometry,l=e.queryPadding*a,u=Jd.fromPoints(s),c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),f=Jd.fromPoints(e.cameraQueryGeometry).expandBy(l),h=this.grid3D.query(f.minX,f.minY,f.maxX,f.maxY,(v,m,g,w)=>a1r(e.cameraQueryGeometry,v-l,m-l,g+l,w+l));for(let v of h)c.push(v);c.sort(D_r);let d={},p;for(let v of c){if(v===p)continue;p=v;let m=this.featureIndexArray.get(v),g=null;this.loadMatchingFeature(d,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,o,n.layers,n.availableImages,t,r,i,(w,b,_)=>(g||(g=Qb(w)),b.queryIntersectsFeature({queryGeometry:s,feature:w,featureState:_,geometry:g,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,u,c){let f=this.bucketLayerIDs[t];if(a&&!f.some(v=>a.has(v)))return;let h=this.sourceLayerCoder.decode(r),d=this.vtLayers[h].feature(i);if(n.needGeometry){let v=tx(d,!0);if(!n.filter(new Co(this.tileID.overscaledZ),v,this.tileID.canonical))return}else if(!n.filter(new Co(this.tileID.overscaledZ),d))return;let p=this.getId(d,h);for(let v of f){if(a&&!a.has(v))continue;let m=s[v];if(!m)continue;let g={};p&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",p));let w=ln({},l[v]);w.paint=Eet(w.paint,m.paint,d,g,o),w.layout=Eet(w.layout,m.layout,d,g,o);let b=!c||c(d,m,g);if(!b)continue;let _=new yne(d,this.z,this.x,this.y,p);_.layer=w;let M=e[v];M===void 0&&(M=e[v]=[]),M.push({featureIndex:i,feature:_,intersectionZ:b})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let u=CT(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let c of e)this.loadMatchingFeature(l,r,i,c,u,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 i;let r=e.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[t];r=e.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=e.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(e.properties.cluster_id))}return r}};Ui("FeatureIndex",k_r,{omit:["rawTileData","sourceLayerCoder"]});Unt=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;this.data[i]===void 0&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(r!==void 0&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}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),this.data[e].length===0&&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=t===void 0?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),this.data[r].length===0&&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 t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}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 r of t)this.remove(r.value.tileID,r)}}});var Pst={};Fp(Pst,{AJAXError:()=>TT,AttributionControl:()=>Mst,BoxZoomHandler:()=>dst,CanvasSource:()=>vot,CooperativeGesturesHandler:()=>Tst,DoubleClickZoomHandler:()=>xst,DragPanHandler:()=>_st,DragRotateHandler:()=>bst,EXTENT:()=>zr,EdgeInsets:()=>cae,ErrorEvent:()=>An,Event:()=>e0,Evented:()=>mu,FullscreenControl:()=>YTr,FullscreenEvent:()=>mae,GPUInitializationError:()=>cst,GeoJSONSource:()=>cot,GeolocateControl:()=>GTr,GeolocateErrorEvent:()=>Fst,GeolocateEvent:()=>s3,GeolocatePositionEvent:()=>gae,GlobeControl:()=>ZTr,Hash:()=>hst,ImageSource:()=>XT,KeyboardHandler:()=>mst,LngLat:()=>mn,LngLatBounds:()=>Ev,LogoControl:()=>Sst,Map:()=>RTr,MapBoxZoomEvent:()=>eae,MapContextEvent:()=>pq,MapLibreEvent:()=>cc,MapLibreMap:()=>RTr,MapMouseEvent:()=>O0,MapMovementEvent:()=>Mn,MapProjectionEvent:()=>Kat,MapSourceDataEvent:()=>Is,MapStyleDataEvent:()=>rp,MapStyleImageMissingEvent:()=>Jat,MapStyleLoadEvent:()=>Qne,MapTerrainEvent:()=>Zat,MapTouchEvent:()=>b8,MapWheelEvent:()=>Xat,Marker:()=>vae,MarkerClickEvent:()=>Dst,MarkerDragEvent:()=>o3,MercatorCoordinate:()=>wo,NavigationControl:()=>BTr,Point:()=>tr,Popup:()=>QTr,PopupEvent:()=>yae,RasterDEMTileSource:()=>lot,RasterTileSource:()=>Tae,ScaleControl:()=>jTr,ScrollZoomHandler:()=>yst,Style:()=>hae,TerrainControl:()=>XTr,TwoFingersTouchPitchHandler:()=>gst,TwoFingersTouchRotateHandler:()=>vst,TwoFingersTouchZoomHandler:()=>pst,TwoFingersTouchZoomRotateHandler:()=>wst,VectorTileSource:()=>sot,VideoSource:()=>pot,addProtocol:()=>ltt,addSourceType:()=>$br,clearPrewarmedResources:()=>ybr,config:()=>Qh,createTileMesh:()=>hot,getGlobalDispatcher:()=>wae,getMaxParallelImageRequests:()=>s6r,getRTLTextPluginStatus:()=>i6r,getVersion:()=>n6r,getWorkerCount:()=>a6r,getWorkerUrl:()=>u6r,importScriptInWorkers:()=>f6r,isTimeFrozen:()=>z_r,now:()=>Oo,prewarm:()=>mbr,removeProtocol:()=>utt,restoreNow:()=>R_r,setMaxParallelImageRequests:()=>l6r,setNow:()=>I_r,setRTLTextPlugin:()=>r6r,setWorkerCount:()=>o6r,setWorkerUrl:()=>c6r});function Yat(){var e=new Nu(4);return Nu!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function F_r(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*a-n*i;return o?(o=1/o,e[0]=a*o,e[1]=-i*o,e[2]=-n*o,e[3]=r*o,e):null}function L_r(e){return e[0]*e[3]-e[2]*e[1]}function P_r(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=i*l+a*s,e[1]=n*l+o*s,e[2]=i*-s+a*l,e[3]=n*-s+o*l,e}function Oo(){return Eq.getCurrentTime()}function I_r(e){Eq.setNow(e)}function R_r(){Eq.restoreNow()}function z_r(){return Eq.isFrozen()}function q_r(e,t){let r={};for(let i in e)i!=="ref"&&(r[i]=e[i]);return htt.forEach(i=>{i in t&&(r[i]=t[i])}),r}function Gnt(e){e=e.slice();let t=Object.create(null);for(let r=0;r{"source"in o&&i[o.source]?r.push({command:"removeLayer",args:[o.id]}):a.push(o)}),r=r.concat(n),V_r(a,t.layers,r)}catch(i){console.warn("Unable to compute style diff:",i),r=[{command:"setStyle",args:[t]}]}return r}function H_r(){let e={},t=_r.$version;for(let r in _r.$root){let i=_r.$root[r];if(i.required){let n=null;n=r==="version"?t:i.type==="array"?[]:{},n!=null&&(e[r]=n)}}return e}function vq(e){let t=[];if(typeof e=="string")t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let a=`${i}${n}`;r.includes(a)||(r.push(a),t.push({id:i,url:n}))}}return t}function $nt(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch(i){throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function j_r(e,t,r,i){return Ki(this,null,function*(){let n=vq(e),a=r>1?"@2x":"",o={},s={};for(let{id:l,url:u}of n){let c=yield t.transformRequest($nt(u,a,".json"),"SpriteJSON");o[l]=jk(c,i);let f=yield t.transformRequest($nt(u,a,".png"),"SpriteImage");s[l]=rg.getImage(f,i)}return yield Promise.all([...Object.values(o),...Object.values(s)]),$_r(o,s)})}function $_r(e,t){return Ki(this,null,function*(){let r={};for(let i in e){r[i]={};let n=(yield t[i]).data;if(!n)throw Error(`Could not load sprite image for ${i}: the response is empty`);let a=fh.getImageCanvasContext(n),o=(yield e[i]).data;for(let s in o){let{width:l,height:u,x:c,y:f,sdf:h,pixelRatio:d,stretchX:p,stretchY:v,content:m,textFitWidth:g,textFitHeight:w}=o[s],b={width:l,height:u,x:c,y:f,context:a};r[i][s]={data:null,pixelRatio:d,sdf:h,stretchX:p,stretchY:v,content:m,textFitWidth:g,textFitHeight:w,spriteData:b}}}return r})}function K_r(e){let t=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(t){let[,n,a]=t;return n.length+a.length>6?null:Wnt(parseInt(`${n}${"0".repeat(a.length)}`,16),parseInt(`${n}${"f".repeat(a.length)}`,16))}let r=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!r)return null;let i=parseInt(r[1],16);return Wnt(i,r[2]===void 0?i:parseInt(r[2],16))}function Wnt(e,t){return e>t||e>tae?null:{start:e,end:Math.min(t,tae)}}function J_r(e,t){return e.ranges.some(({start:r,end:i})=>t>=r&&t<=i)}function Ynt(e,t,r,i,n,a,o,s,l){for(let u=t;u-1);l++,a[l]=s,o[l]=u,o[l+1]=rae}for(let s=0,l=0;sHk(t,r))),tq}function xbr(e,t){let r=Em();return eu(r,r,[1,1,0]),Rc(r,r,[e.width*.5,e.height*.5,1]),e.calculatePosMatrix?Yb(r,r,e.calculatePosMatrix(t.toUnwrapped())):r}function _br(e,t,r){if(e)for(let i of e){let n=t[i];if((n==null?void 0:n.source)===r&&n.type==="fill-extrusion")return!0}else for(let i in t){let n=t[i];if(n.source===r&&n.type==="fill-extrusion")return!0}return!1}function bbr(e,t,r,i,n,a,o){var f;let s=_br((f=n==null?void 0:n.layers)!=null?f:null,t,e.id),l=a.maxPitchScaleFactor(),u=e.tilesIn(i,l,s);u.sort(iot);let c=[];for(let h of u)c.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(t,r,e.getState(),h.queryGeometry,h.cameraQueryGeometry,h.scale,n,a,l,xbr(a,h.tileID),o?(d,p)=>o(h.tileID,d,p):void 0)});return Mbr(Abr(c),e)}function wbr(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),u=[];for(let c of Object.keys(l).map(Number))u.push(o[c]);u.sort(iot);for(let c of u){let f=c.featureIndex.lookupSymbolFeatures(l[c.bucketInstanceId],t,c.bucketIndex,c.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let h in f){s[h]||(s[h]=[]);let d=f[h];d.sort((p,v)=>{let m=c.featureSortOrder;if(m){let g=m.indexOf(p.featureIndex);return m.indexOf(v.featureIndex)-g}return v.featureIndex-p.featureIndex});for(let p of d)s[h].push(p)}}return Sbr(s,e,r)}function Tbr(e,t){let r=e.getRenderableIds().map(a=>e.getTileByID(a)),i=[],n={};for(let a of r){let o=a.tileID.canonical.key;n[o]||(n[o]=!0,a.querySourceFeatures(i,t))}return i}function iot(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 Abr(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let a=r[n];for(let o in i){let s=i[o];a[o]||(a[o]={});let l=a[o];t[o]||(t[o]=[]);for(let u of s)l[u.featureIndex]||(l[u.featureIndex]=!0,t[o].push(u))}}return t}function Mbr(e,t){for(let r in e)for(let i of e[r])not(i,t);return e}function Sbr(e,t,r){for(let i in e)for(let n of e[i]){let a=r[t[i].source];not(n,a)}return e}function not(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 aot(e,t,r,i){return Ki(this,null,function*(){let n=e;if(e.url?n=(yield jk(yield t.transformRequest(e.url,"Source"),r)).data:yield fh.frameAsync(r,i),!n)return null;let a=IT(ln(n,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in n&&n.vector_layers&&(a.vectorLayerIds=n.vector_layers.map(o=>o.id)),a})}function T8(e,t){return t?e.properties[t]:e.id}function Ebr(e,t){let r=new Map;if(e==null||e.type==null)return r;if(e.type==="Feature"){let i=T8(e,t);return i==null?void 0:(r.set(i,e),r)}if(e.type==="FeatureCollection"){let i=new Set;for(let n of e.features){let a=T8(n,t);if(a==null||i.has(a))return;i.add(a),r.set(a,n)}return r}}function kbr(e,t,r){var n,a;let i=[];if(t.removeAll)e.clear();else if(t.remove)for(let o of t.remove){let s=e.get(o);s&&(i.push(s.geometry),e.delete(o))}if(t.add)for(let o of t.add){let s=T8(o,r);if(s==null)continue;let l=e.get(s);l&&i.push(l.geometry),i.push(o.geometry),e.set(s,o)}if(t.update)for(let o of t.update){let s=e.get(o.id);if(!s)continue;let l=!!o.newGeometry,u=o.removeAllProperties||((n=o.removeProperties)==null?void 0:n.length)>0||((a=o.addOrUpdateProperties)==null?void 0:a.length)>0;if(!l&&!u)continue;i.push(s.geometry);let c=fn({},s);if(e.set(o.id,c),l&&(i.push(o.newGeometry),c.geometry=o.newGeometry),u){if(c.properties=o.removeAllProperties?{}:fn({},c.properties||{}),o.removeProperties)for(let f of o.removeProperties)delete c.properties[f];if(o.addOrUpdateProperties)for(let{key:f,value:h}of o.addOrUpdateProperties)c.properties[f]=h}}return i}function Cbr(e,t,r){if(!e)return t||{};if(!t)return e||{};r&&(Znt(e.add,r),Znt(t.add,r));let i=Knt(e),n=Knt(t);Dbr(i,n);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 s of a.add.keys())a.remove.delete(s);let o=Pbr(a);return r&&Lbr(o.add,r),o}function Dbr(e,t){t.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),t.remove.clear());for(let r of t.remove)e.add.delete(r),e.update.delete(r);for(let[r,i]of t.update){let n=e.update.get(r);n&&(t.update.set(r,Fbr(n,i)),e.update.delete(r))}}function Fbr(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties&&e.addOrUpdateProperties){let i=new Set(t.removeProperties);e.addOrUpdateProperties=e.addOrUpdateProperties.filter(n=>!i.has(n.key))}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}function Znt(e,t){if(e)for(let r of e){let i=T8(r,t);i!=null&&(r.id=i)}}function Lbr(e,t){if(e)for(let r of e)T8(r,t)!=null&&delete r.id}function Knt(e){var r,i;if(!e)return{};let t={};return t.removeAll=e.removeAll,t.remove=new Set(e.remove||[]),t.add=new Map((r=e.add)==null?void 0:r.map(n=>[n.id,n])),t.update=new Map((i=e.update)==null?void 0:i.map(n=>[n.id,n])),t}function Pbr(e){let t={};return e.removeAll&&(t.removeAll=e.removeAll),e.remove&&(t.remove=Array.from(e.remove)),e.add&&(t.add=Array.from(e.add.values())),e.update&&(t.update=Array.from(e.update.values())),t}function uot(e){return!e||e.length===0?[]:typeof e[0]=="number"?[e]:e.flatMap(t=>uot(t))}function gq(e){return e.type==="GeometryCollection"?e.geometries.flatMap(t=>gq(t)):uot(e.coordinates)}function Jnt(e){let t=new Ev,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(i=>gq(i.geometry));break;case"Feature":r=gq(e.geometry);break;default:r=gq(e)}if(r.length===0)return t;for(let i of r){let[n,a]=i;t.extend([n,a])}return t}function Ibr({x:e,y:t,z:r},i=0){let n=GB((e-i)/2**r),a=LT((t+1+i)/2**r),o=GB((e+1+i)/2**r),s=LT((t-i)/2**r);return new Ev([n,a],[o,s])}function Bbr(e){e*=Math.PI/180;let t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}function qbr(e){return e>0?1/(1-e):1+e}function Obr(e){return e>0?1-1/(1.001-e):-e}function fot(e,t){let r=hot(t,"16bit"),i=Pm.deserialize({arrayBuffer:r.vertices,length:r.vertices.byteLength/2/2}),n=Mv.deserialize({arrayBuffer:r.indices,length:r.indices.byteLength/2/3});return new M8(e.createVertexBuffer(i,l3.members),e.createIndexBuffer(n),Ws.simpleSegment(0,0,i.length,n.length))}function hot(e,t){let r=e.granularity===void 0?1:Math.max(e.granularity,1),i=r+(e.generateBorders?2:0),n=r+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),a=i+1,o=n+1,s=e.generateBorders?-1:0,l=e.generateBorders||e.extendToNorthPole?-1:0,u=r+ +!!e.generateBorders,c=r+(e.generateBorders||e.extendToSouthPole?1:0),f=a*o,h=i*n*6,d=a*o>65536;if(d&&t==="16bit")throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=d||t==="32bit",v=new Int16Array(f*2),m=0;for(let b=l;b<=c;b++)for(let _=s;_<=u;_++){let M=_/r*zr;_===-1&&(M=-rq),_===r+1&&(M=zr+rq);let x=b/r*zr;b===-1&&(x=e.extendToNorthPole?xT:-rq),b===r+1&&(x=e.extendToSouthPole?_T:zr+rq),v[m++]=M,v[m++]=x}let g=p?new Uint32Array(h):new Uint16Array(h),w=0;for(let b=0;b=1&&g<=512)||w>=1?$T:[p,v,w]}function Gbr(e){let t=(1-4/e)/.9921875;return Math.max(0,t)}function dot(e){let[t,r,i,n]=e;return t.x+i.x===r.x+n.x&&t.y+i.y===r.y+n.y}function Wbr(e,t){let r={};if(!t)return r;for(let i of e){let n=i.layerIds.map(a=>t.getLayer(a)).filter(Boolean);if(n.length!==0){i.layers=n,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(a=>n.filter(o=>o.id===a)[0]));for(let a of n)r[a.id]=i}}return r}function A8(){return Qnt||(Qnt=new Ybr),Qnt}function eat(e){let t=[];for(let r in e)t.push({id:r,state:e[r]});return t}function Zbr(e,t,r,i){let n=Uu([],e,t),a=1/n[3]/r*i;return Vet(n,n,[a,a,1/n[3],a])}function Kbr(e,t,r,i){let n=i?4:0,a=i?0:4,o=0,s=[],l=[];for(let f=0;f<4;f++){let h=J1([],e[f+a],e[f+n]),d=K1(h);Ps(h,h,1/d),s.push(d),l.push(h)}for(let f=0;f<4;f++){let h=jet(e[f+n],l[f],r);o=h!==null&&h>=0?Math.max(o,h):Math.max(o,s[f])}let u=Jbr(e,t),c=Qbr(r,u);if(c!==null){let f=c/gu(l[0],u);o=Math.min(o,f)}for(let f=0;f<4;f++){let h=Math.min(o,s[f]);e[f+a]=[e[f+n][0]+l[f][0]*h,e[f+n][1]+l[f][1]*h,e[f+n][2]+l[f][2]*h,1]}}function Jbr(e,t){let r=J1([],e[t[0]],e[t[1]]),i=J1([],e[t[2]],e[t[1]]),n=[0,0,0,0];return Pf(n,uh([],r,i)),n[3]=-gu(n,e[t[0]]),n}function Qbr(e,t){let r=Ok(e),i=Uet([],e,1/r),n=J1([],t,Ps([],i,gu(t,i))),a=Ok(n);if(a>0){let o=Math.sqrt(1-i[3]*i[3]),s=Ps([],i,-i[3]),l=R0([],s,Ps([],n,o/a));return hB(t,l)}return null}function e3r(e,t,r){let i=t.intersectsFrustum(e);if(!r||i===0)return i;let n=t.intersectsPlane(r);return n===0?0:i===2&&n===2?2:1}function tat(e,t,r){let i=0,n=(r-t)/10;for(let a=0;a<10;a++){let o=t+(a+.5)/10*(r-t);i+=n*Math.cos(o)**+e}return i}function nae(e,t){return function(r,i,n,a,o){let s=2*((e-1)/zc(Math.cos(js(ix-o))/Math.cos(js(ix)))-1),l=Math.acos(n/a),u=2*tat(s-1,0,js(o/2)),c=Math.min(js(ix),l+js(o/2)),f=Math.min(c,l-js(o/2)),h=tat(s-1,f,c),d=Math.atan(i/n),p=Math.hypot(i,n),v=r;return v+=zc(a/p/Math.max(.5,Math.cos(js(o/2)))),v+=s*zc(Math.cos(d))/2,v-=zc(Math.max(1,h/u/t))/2,v}}function Sae(e,t){let r=(t.roundZoom?Math.round:Math.floor)(e.zoom+zc(e.tileSize/t.tileSize));return Math.max(0,r)}function r3r(e,t){let r=ix-e.pitch-e.fov/2,i=Jn((15-r)/15,0,1),n=Math.max(500,t!=null?t:0);return e.elevation+i*n}function i3r(e,t,r){let i=e.planes[1],n=e.points.map(l=>{let u=i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3];if(Math.abs(u)>1e-6)return l;let c=[l[0]-r[0],l[1]-r[1],l[2]-r[2]],f=i[0]*c[0]+i[1]*c[1]+i[2]*c[2];if(f>=-1e-9)return l;let h=t/-f;return[l[0]+c[0]*h,l[1]+c[1]*h,l[2]+c[2]*h,l[3]]}),a=e.planes.map((l,u)=>u===1?[l[0],l[1],l[2],l[3]+t]:l),o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0];for(let l of n)for(let u=0;u<3;u++)o[u]=Math.min(o[u],l[u]),s[u]=Math.max(s[u],l[u]);return new Mae(n,a,new Aae(o,s))}function ZT(e,t){let r=e.getCameraFrustum(),i=e.getClippingPlane();if(i&&t.maxContentElevation>0){let x=Math.hypot(i[0],i[1],i[2]);if(x>0){let T=1+t.maxContentElevation/zf,A=Jn(-i[3]/x,-1,1),y=Math.cos(Math.acos(A)+Math.acos(1/T));i=[i[0],i[1],i[2],-y*x],r=i3r(r,Math.sqrt(T*T-1),e.cameraPosition)}}let n=Eit(e),a=wo.fromLngLat(e.center,e.elevation),o=r3r(e,t.maxContentElevation),s=e.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(e,t),u=Sae(e,t),c=t.minzoom||0,f=t.maxzoom===void 0?e.maxZoom:t.maxzoom,h=Math.min(Math.max(0,u),f),d=2**h,p=[d*n.x,d*n.y,0],v=[d*a.x,d*a.y,0],m=Math.hypot(a.x-n.x,a.y-n.y),g=Math.abs(a.z-n.z),w=Math.hypot(m,g),b=x=>({zoom:0,x:0,y:0,wrap:x,fullyVisible:!1}),_=[],M=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let x=1;x<=3;x++)_.push(b(-x)),_.push(b(x));for(_.push(b(0));_.length>0;){let x=_.pop(),T=x.x,A=x.y,y=x.fullyVisible,E={x:T,y:A,z:x.zoom},S=s.getTileBoundingVolume(E,x.wrap,o,t);if(!y){let F=e3r(r,S,i);if(F===0)continue;y=F===2}let C=s.distanceToTile2d(n.x,n.y,E,S),k=u;l&&(k=(t.calculateTileZoom||t3r)(e.zoom+zc(e.tileSize/t.tileSize),C,g,w,e.fov)),k=(t.roundZoom?Math.round:Math.floor)(k),k=Math.max(0,k);let D=Math.min(k,f);if(x.wrap=s.getWrap(a,E,x.wrap),x.zoom>=D){if(x.zoom>1),L=x.zoom+1;_.push({zoom:L,x:P,y:R,wrap:x.wrap,fullyVisible:y})}}return M.sort((x,T)=>x.distanceSq-T.distanceSq).map(x=>x.tileID)}function rat(e){return e==="raster"||e==="image"||e==="video"}function n3r(e,t,r,i,n,a,o){let s=Oo(),l=Wet(t);for(let u of t){let c=e.getTileById(u.key);(c.fadingDirection===0||c.fadeOpacity===0)&&c.resetFadeLogic(),!a3r(e,c,r,s,i,n,o)&&(o3r(e,c,r,s,a,o)||s3r(c,l,s,o)||c.resetFadeLogic())}}function a3r(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:u,fadingParentID:c}=t;if(l===0&&u===1&&c)return r[c.key]=c,!0;let f=Math.max(s.overscaledZ-n,a);for(let h=s.overscaledZ-1;h>=f;h--){let d=s.scaledTo(h),p=e.getLoadedTile(d);if(p)return t.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:p.tileID,fadeEndTime:i+o}),p.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:i+o}),r[d.key]=d,!0}return!1}function o3r(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=iat(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)iat(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}function iat(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let l of r){let u=e.getLoadedTile(l);if(!u)continue;let{fadingRole:c,fadingDirection:f,fadingParentID:h}=u;(c!==0||f!==0||!h)&&(u.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:n+o})),i[l.key]=l,s=!0}return s}function s3r(e,t,r,i){let n=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(t.has(n)){let a=r+i;return e.setSelfFadeLogic(a),!0}return!1}function l3r(e,t){if(t<=0)return!1;let r=Oo();for(let i of e.getAllTiles())if(i.fadeEndTime>=r)return!0;return!1}function u3r(e,t){var i,n,a;let r=t.getRenderableIds();for(let o of r){if(!((i=e.neighboringTiles)!=null&&i[o]))continue;let s=t.getTileById(o);e.neighboringTiles[o].backfilled||nat(e,s),!((a=(n=s.neighboringTiles)==null?void 0:n[e.tileID.key])!=null&&a.backfilled)&&nat(s,e)}}function nat(e,t){var o;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let r=t.tileID.canonical.x-e.tileID.canonical.x,i=t.tileID.canonical.y-e.tileID.canonical.y,n=2**e.tileID.canonical.z,a=t.tileID.key;(r!==0||i!==0)&&(Math.abs(i)>1||(Math.abs(r)>1&&(Math.abs(r+n)===1?r+=n:Math.abs(r-n)===1&&(r-=n)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,i),(o=e.neighboringTiles)!=null&&o[a]&&(e.neighboringTiles[a].backfilled=!0))))}function mq(e,t,r,i,n){return n?e?e(t,r)+i:i===0?void 0:i:i}function iq(e,t){let r=!0;return e==="always"||(e==="never"||t==="never")&&(r=!1),r}function f3r(e,t){let r=1/(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),i=1/(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]),n=t[0]*r,a=t[4]*r,o=t[8]*i,s=t[1]*r,l=t[5]*r,u=t[9]*i,c=t[2]*r,f=t[6]*r,h=t[10]*i;e[0]=n,e[1]=a,e[2]=o,e[4]=s,e[5]=l,e[6]=u,e[8]=c,e[9]=f,e[10]=h;let d=t[12],p=t[13],v=t[14];return e[12]=-n*d-s*p-c*v,e[13]=-a*d-l*p-f*v,e[14]=-o*d-u*p-h*v,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function h3r(e,t){return e[0]=1/t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/t[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/t[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=t[10]/t[14],e}function d3r(e,t){let r=1/(t[0]*t[5]-t[1]*t[4]);return e[0]=t[5]*r,e[1]=-t[1]*r,e[2]=0,e[3]=0,e[4]=-t[4]*r,e[5]=t[0]*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/t[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/t[15],e}function Eae(e,t,r){let i=Em();if(!e){let{vecSouth:n,vecEast:a}=kae(t),o=Yat();o[0]=a[0],o[1]=a[1],o[2]=n[0],o[3]=n[1],F_r(o,o),i[0]=o[0],i[1]=o[1],i[4]=o[2],i[5]=o[3]}return Rc(i,i,[1/r,1/r,1]),i}function v3r(e,t,r,i){if(e){let n=Em();if(!t){let{vecSouth:a,vecEast:o}=kae(r);n[0]=o[0],n[1]=o[1],n[4]=a[0],n[5]=a[1]}return Rc(n,n,[i,i,1]),n}return r.pixelsToClipSpaceMatrix}function kae(e){let t=Math.cos(e.rollInRadians),r=Math.sin(e.rollInRadians),i=Math.cos(e.pitchInRadians),n=Math.cos(e.bearingInRadians),a=Math.sin(e.bearingInRadians),o=fB();o[0]=-n*i*r-a*t,o[1]=-a*i*r+n*t;let s=mie(o);s<1e-9?yie(o):gie(o,o,1/s);let l=fB();l[0]=n*i*t-a*r,l[1]=a*i*t+n*r;let u=mie(l);return u<1e-9?yie(l):gie(l,l,1/u),{vecEast:l,vecSouth:o}}function c3(e,t,r){var i,n;return mq(e.getElevation,t,r,(i=e.heightOffset)!=null?i:0,(n=e.heightAnchorGround)!=null?n:!0)}function Cae(e,t,r,i){let n;i==null?(n=[e,t,0,1],Dae(n,n,r)):(n=[e,t,i,1],Uu(n,n,r));let a=n[3];return{point:new tr(n[0]/a,n[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}function bot(e,t){return .5+e/t*.5}function g3r(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function m3r(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=r?e.textSizeData:e.iconSizeData,p=a8(d,t.transform.zoom),v=[256/t.width*2+1,256/t.height*2+1],m=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();let g=e.lineVertexArray,w=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=t.transform.width/t.transform.height,_=!1;for(let M=0;MMath.abs(r.x-t.x)*i?{useVertical:!0}:(e===2?t.yr.x)?{needsFlipping:!0}:null}function lat(e){let{projectionContext:t,pitchedLabelPlaneMatrixInverse:r,symbol:i,fontSize:n,flip:a,keepUpright:o,glyphOffsetArray:s,dynamicLayoutVertexArray:l,aspectRatio:u,rotateToLine:c}=e,f=n/24,h=i.lineOffsetX*f,d=i.lineOffsetY*f,p;if(i.numGlyphs>1){let v=i.glyphStartIndex+i.numGlyphs,m=i.lineStartIndex,g=i.lineStartIndex+i.lineLength,w=wot(f,s,h,d,a,i,c,t);if(!w)return{notEnoughRoom:!0};let b=nq(w.first.point.x,w.first.point.y,t,r),_=nq(w.last.point.x,w.last.point.y,t,r);if(o&&!a){let M=sat(i.writingMode,b,_,u);if(M)return M}p=[w.first];for(let M=i.glyphStartIndex+1;M0?b.point:Tot(t.tileAnchorPoint,w,m,1,t),M=nq(m.x,m.y,t,r),x=nq(_.x,_.y,t,r),T=sat(i.writingMode,M,x,u);if(T)return T}let v=bq(f*s.getoffsetX(i.glyphStartIndex),h,d,a,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,t,c);if(!v||t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};p=[v]}for(let v of p)o8(l,v.point,v.angle);return{}}function Tot(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=f3(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function oae(e,t,r){let i=t.projectionCache;if(i.projections[e])return i.projections[e];let n=new tr(t.lineVertexArray.getx(e),t.lineVertexArray.gety(e)),a=f3(n.x,n.y,t);if(a.signedDistanceFromCamera>0)return i.projections[e]=a.point,i.anyProjectionOccluded||(i.anyProjectionOccluded=a.isOccluded),a.point;let o=e-r.direction,s=r.distanceFromAnchor===0?t.tileAnchorPoint:new tr(t.lineVertexArray.getx(o),t.lineVertexArray.gety(o)),l=r.absOffsetX-r.distanceFromAnchor+1;return Tot(s,n,r.previousVertex,l,t)}function f3(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=Cae(i,n,r.pitchedLabelPlaneMatrix,c3(r,i,n)),a.isOccluded=!1):(a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,c3(r,i,n)),a.point.x=(a.point.x*.5+.5)*r.width,a.point.y=(-a.point.y*.5+.5)*r.height),a}function nq(e,t,r,i){if(r.pitchWithMap){let n=[e,t,0,1];Uu(n,n,i);let a=n[0]/n[3],o=n[1]/n[3];return r.transform.projectTileCoordinates(a,o,r.unwrappedTileID,c3(r,a,o)).point}return{x:e/r.width*2-1,y:1-t/r.height*2}}function Aot(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,c3(r,e,t))}function sae(e,t,r){return e._unit()._perp()._mult(t*r)}function y3r(e,t,r,i,n,a,o,s,l){if(s.projectionCache.offsets[e])return s.projectionCache.offsets[e];let u=r.add(t);if(e+l.direction=n)return s.projectionCache.offsets[e]=u,u;let c=oae(e+l.direction,s,l),f=sae(c.sub(r),o,l.direction),h=r.add(f),d=c.add(f);return s.projectionCache.offsets[e]=Xet(a,u,h,d)||u,s.projectionCache.offsets[e]}function bq(e,t,r,i,n,a,o,s,l){let u=i?e-t:e+t,c=u>0?1:-1,f=0;i&&(c*=-1,f=Math.PI),c<0&&(f+=Math.PI);let h=c>0?a+n:a+n+1,d;s.projectionCache.cachedAnchorPoint?d=s.projectionCache.cachedAnchorPoint:(d=f3(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=d);let p=d,v=d,m,g,w=0,b=0,_=Math.abs(u),M=[],x;for(;w+b<=_;){if(h+=c,h=o)return null;w+=b,v=p,g=m;let E={absOffsetX:_,direction:c,distanceFromAnchor:w,previousVertex:v};if(p=oae(h,s,E),r===0)M.push(v),x=p.sub(v);else{let S,C=p.sub(v);S=C.mag()===0?sae(oae(h+c,s,E).sub(p),r,c):sae(C,r,c),g||(g=v.add(S)),m=y3r(h,S,p,a,o,g,r,s,E),M.push(g),x=m.sub(g)}b=x.mag()}let T=(_-w)/b,A=x._mult(T)._add(g||v),y=f+Math.atan2(p.y-v.y,p.x-v.x);return M.push(A),{point:A,angle:l?y:0,path:M}}function WT(e,t){for(let r=0;r{let n=Cae(i.x,i.y,r,c3(t,i.x,i.y)),a=t.transform.projectTileCoordinates(n.point.x,n.point.y,t.unwrappedTileID,c3(t,n.point.x,n.point.y));return a.point.x=(a.point.x*.5+.5)*t.width,a.point.y=(-a.point.y*.5+.5)*t.height,a})}function b3r(e){let t=0,r=0,i=0,n=0;for(let a=0;ar&&(r=n,t=i));return e.slice(t,t+r)}function fat(e,t,r,i,n){let{horizontalAlign:a,verticalAlign:o}=n8(e),s=-(a-.5)*t,l=-(o-.5)*r;return new tr(s+i[0]*n,l+i[1]*n)}function hat(e,t,r,i,n,a){(!i||i.length===0)&&(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,u=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,u),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,u)}function dat(e){if(e.opacity===0&&!e.placed)return 0;if(e.opacity===1&&e.placed)return 4294967295;let t=+!!e.placed,r=Math.floor(e.opacity*127);return r*S3r+t*E3r+r*k3r+t*C3r+r*512+t*256+r*2+t}function lae(e,t,r,i,n,a){if(n-i<=r)return;let o=i+n>>1;Sot(e,t,o,i,n,a),lae(e,t,r,i,o-1,1-a),lae(e,t,r,o+1,n,1-a)}function Sot(e,t,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,c=r-i+1,f=Math.log(u),h=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*h*(u-h)/u)*(c-u/2<0?-1:1);Sot(e,t,r,Math.max(i,Math.floor(r-c*h/u+d)),Math.min(n,Math.floor(r+(u-c)*h/u+d)),a)}let o=t[2*r+a],s=i,l=n;for(v8(e,t,i,r),t[2*n+a]>o&&v8(e,t,i,n);so;)l--}t[2*i+a]===o?v8(e,t,i,l):(l++,v8(e,t,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function v8(e,t,r,i){Bne(e,r,i),Bne(t,2*r,2*i),Bne(t,2*r+1,2*i+1)}function Bne(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function vat(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function fo(e,t){let r=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=t.match(/in ([\w]+) ([\w]+)/g),n=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(n):n,s=i?i.length:0,l={};return e=e.replace(r,(u,c,f,h,d)=>(l[d]=!0,c==="define"?` #ifndef HAS_UNIFORM_u_${d} in ${f} ${h} ${d}; #else uniform ${f} ${h} u_${d}; #endif `:` #ifdef HAS_UNIFORM_u_${d} ${f} ${h} ${d} = u_${d}; #endif `)),t=t.replace(r,(u,c,f,h,d)=>{let p=h==="float"?"vec2":"vec4",v=d.match(/color/)?"color":p;return l[d]?c==="define"?` #ifndef HAS_UNIFORM_u_${d} uniform lowp float u_${d}_t; layout(location = ${s++}) in ${f} ${p} a_${d}; out ${f} ${h} ${d}; #else uniform ${f} ${h} u_${d}; #endif `:v==="vec4"?` #ifndef HAS_UNIFORM_u_${d} ${d} = a_${d}; #else ${f} ${h} ${d} = u_${d}; #endif `:` #ifndef HAS_UNIFORM_u_${d} ${d} = unpack_mix_${v}(a_${d}, u_${d}_t); #else ${f} ${h} ${d} = u_${d}; #endif `:c==="define"?` #ifndef HAS_UNIFORM_u_${d} uniform lowp float u_${d}_t; layout(location = ${s++}) in ${f} ${p} a_${d}; #else uniform ${f} ${h} u_${d}; #endif `:v==="vec4"?` #ifndef HAS_UNIFORM_u_${d} ${f} ${h} ${d} = a_${d}; #else ${f} ${h} ${d} = u_${d}; #endif `:` #ifndef HAS_UNIFORM_u_${d} ${f} ${h} ${d} = unpack_mix_${v}(a_${d}, u_${d}_t); #else ${f} ${h} ${d} = u_${d}; #endif `}),{fragmentSource:e,vertexSource:t,staticAttributes:i,staticUniforms:o}}function wq(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}function mat(e){return Math.max(0,Math.floor(e))}function Lae(e,t,r,i){if(i<0||i>=1)return xat;let n=Math.floor(r),a=r-n;for(let o of e.zooms){let s=1<n;a++){let o=(r+i)/2;t(e,o)?i=o:r=o}return{lo:r,hi:i}}function yq(e,t){return Lae(e.index,e.exaggeration,(e.near[0]+t*e.dx)/e.worldSize,(e.near[1]+t*e.dy)/e.worldSize)}function aq(e,t){return Fot(yq(e,t),e.near[2]+t*e.dz)}function Iot(){Ma("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Rot(e){if(e.useSlerp)if(e.k<1){let t=Aie(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),r=Aie(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),i=new Float64Array(4);vk(i,t,r,e.k);let n=rtt(i);e.tr.setRoll(n.roll),e.tr.setPitch(n.pitch),e.tr.setBearing(n.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll($s.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch($s.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing($s.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function zot(e,t,r,i,n){let a=n.padding,o=Sv(n.worldSize,r.getNorthWest()),s=Sv(n.worldSize,r.getNorthEast()),l=Sv(n.worldSize,r.getSouthEast()),u=Sv(n.worldSize,r.getSouthWest()),c=js(-i),f=o.rotate(c),h=s.rotate(c),d=l.rotate(c),p=u.rotate(c),v=new tr(Math.max(f.x,h.x,p.x,d.x),Math.max(f.y,h.y,p.y,d.y)),m=new tr(Math.min(f.x,h.x,p.x,d.x),Math.min(f.y,h.y,p.y,d.y)),g=v.sub(m),w=n.width-(a.left+a.right+t.left+t.right),b=n.height-(a.top+a.bottom+t.top+t.bottom),_=w/g.x,M=b/g.y;if(M<0||_<0){Iot();return}let x=Math.min(zc(n.scale*Math.min(_,M)),e.maxZoom),T=tr.convert(e.offset),A=(t.left-t.right)/2,y=(t.top-t.bottom)/2,E=new tr(A,y).rotate(js(i)),S=T.add(E).mult(n.scale/If(x));return{center:NT(n.worldSize,o.add(l).div(2).sub(S)),zoom:x,bearing:i}}function qot(e){let t=YT(e.worldSize,e.center.lat);return 2*Math.PI*t}function Z3r(e,t,r){let i=Vu(t),n=Vu(r),a=gu(i,n),o=Math.acos(a),s=qot(e);return o/(2*Math.PI)*s}function K3r(e,t){return[K2(e*Math.PI*2+Math.PI,Math.PI*2),2*Math.atan(Math.exp(Math.PI-t*Math.PI*2))-Math.PI*.5]}function J3r(e,t){let r=Math.cos(t),i=new Float64Array(3);return i[0]=Math.sin(e)*r,i[1]=Math.sin(t),i[2]=Math.cos(e)*r,i}function nx(e,t,r,i,n){let a=1/(1<1e-6){let i=e[0]/r,n=e[2]/r,a=Math.acos(n),o=(i>0?a:-a)/Math.PI*180;return new mn(B0(o,-180,180),t)}return new mn(0,t)}function Q3r(e,t){return cB(Cm(),-e.lng,-e.lat,t)}function ewr(e){let t=e[0],r=e[1],i=e[2],n=e[3];return{lng:-Math.atan2(2*(n*t+r*i),1-2*(t*t+r*r))*180/Math.PI,lat:-Math.asin(Jn(2*(n*r-i*t),-1,1))*180/Math.PI,bearing:Math.atan2(2*(n*i+t*r),1-2*(r*r+i*i))*180/Math.PI}}function bat(e,t){let r=e.cameraPosition,i=K1(r);if(i<=1)return e.screenPointToLocation(t);let n=Do();Pf(n,r);let a=e.getRayDirectionFromPixel(t),o=-gu(a,n),s=Do();qk(s,a,n,o);let l=K1(s);if(l<1e-9)return e.screenPointToLocation(t);let u=Math.atan2(l,o),c=Math.asin(1/i)*.9;if(u=0?90:-90,s=e.locationToScreenPoint(new mn(0,o)),l=t.x-s.x,u=t.y-s.y,c=l*l+u*u,f=Jn(1-(Tv-Math.abs(a))/12,0,1),h=f*f*(3-2*f),d=K2(i-n+180,360)-180,p=0;if(h>0&&r){let v=(l*r.y-u*r.x)/Math.max(c,400);p=(o>0?1:-1)*v*180/Math.PI}return n+(1-h)*d+h*p}function iwr(e){let t=Do();return t[0]=e[0]*-e[3],t[1]=e[1]*-e[3],t[2]=e[2]*-e[3],{center:t,radius:Math.sqrt(1-e[3]*e[3])}}function nwr(e,t,r){let i=Do();J1(i,r,e);let n=Do();return qk(n,e,i,t/Ok(i)),n}function Mq(e){return Math.cos(e*Math.PI/180)}function qc(e,t){let r=Mq(e),i=Mq(t);return zc(i/r)}function awr(e,t){return 360/qot({worldSize:e,center:{lat:t}})}function owr(e,t){let r=e.rotate(t.bearingInRadians),i=t.zoom+qc(t.center.lat,0),n=Kb(1/Mq(t.center.lat),1/Mq(Math.min(Math.abs(t.center.lat),60)),Gk(i,7,3,0,1)),a=awr(t.worldSize,t.center.lat);return new mn(t.center.lng-r.x*a*n,Jn(t.center.lat+r.y*a,-Tv,Tv))}function Nne(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function wat(e,t,r,i){let n=e.lat+r*i;if(Math.abs(r)>1){let a=e.lat+r,o=(Math.sign(a)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+r)*Math.PI/180,l=Nne(o+i*(s-o)),u=Nne(o),c=Nne(s),f=(l-u)/(c-u),h=e.lng+t*f;return new mn(h,n)}{let a=e.lng+t*i;return new mn(a,n)}}function oq(e,t,r=1){let i=gu(e,t),n=r*r,a=Do(),o=Do();Ps(o,t,i),J1(a,e,o);let s=n-gu(a,a);if(s<0)return null;let l=gu(e,e)-n,u=-i+(i<0?1:-1)*Math.sqrt(s),c=l/u,f=u;return{tMin:Math.min(c,f),tMax:Math.max(c,f)}}function xq(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function Vne(e,t,r,i,n){let a=e-r,o;return o=a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,Math.max(o,xq(t,i,n))}function Tat(e,t){let r=1/0,i=-1/0;for(let n of t){let a=gu(e,n);r=Math.min(r,a),i=Math.max(i,a)}return{min:r,max:i}}function Vot(e,t){let r=Do();qk(r,e.origin,e.direction,t);let i=K1(r),n=Do();Ps(n,r,1/i);let a=w8(n),o=wo.fromLngLat(a),s=new wo(o.x,Jn(o.y,0,.999999999)),l=Lae(e.index,e.exaggeration,s.x,s.y),u=Math.abs(a.lat)>85.051129?0:l.elevation;return{sample:ma(fn({},l),{elevation:u}),radius:i,mercator:s}}function Mat(e,t){let{sample:r,radius:i}=Vot(e,t);return Fot(r,(i-1)*zf)}function uwr(e,t,r){let i={constrainOverride:t};if(Array.isArray(e)){let n=new _at({type:e},r);return{projection:n,transform:new Sat(i),cameraHelper:new Eat(n)}}switch(e){case"mercator":return{projection:new uae,transform:new Tq(i),cameraHelper:new Aq};case"globe":{let n=new _at({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:n,transform:new Sat(i),cameraHelper:new Eat(n)}}case"vertical-perspective":return{projection:new Bot,transform:new Not(i),cameraHelper:new Hot};default:return Ma(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new uae,transform:new Tq(i),cameraHelper:new Aq}}}function ywr(e,t){for(let[r,i]of Object.entries(Cq)){let n=e.getUniformBlockIndex(t,r);n!==e.INVALID_INDEX&&e.uniformBlockBinding(t,n,i)}}function Pae(e){let t={},r=0;for(let{name:i,type:n}of e){let[a,o]=xwr[n];r=Math.ceil(r/o)*o,t[i]=r,r+=a}return{offsets:t,contentWords:r,sizeWords:Math.ceil(r/4)*4}}function _wr(e){return new Iae(e,Cq.ProjectionUBO,jot)}function bwr(e,t){let r=e.pending;r.set(t.mainMatrix,HT.u_projection_matrix),r.set(t.fallbackMatrix,HT.u_projection_fallback_matrix),r.set(t.tileMercatorCoords,HT.u_projection_tile_mercator_coords),r.set(t.clippingPlane,HT.u_projection_clipping_plane),r[HT.u_projection_transition]=t.projectionTransition,e.pendingWords[HT.u_projection_clip_antimeridian]=+!!t.clipAntimeridian,e.upload()}function wwr(e){return new Iae(e,Cq.TerrainUBO,$ot)}function Twr(e,t){let r=e.pending;r.set(t.u_terrain_matrix,sq.u_terrain_matrix),r.set(t.u_terrain_unpack,sq.u_terrain_unpack),r[sq.u_terrain_dim]=t.u_terrain_dim,r[sq.u_terrain_exaggeration]=t.u_terrain_exaggeration,e.upload()}function Gne(e){let t=[];for(let r of e){if(r===null)continue;let i=r.split(" ");t.push(i.pop())}return t}function Awr(e,t){let r=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),i=new Set,n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a>16,s>>16],u_pixel_coord_lower:[o&65535,s&65535]}}function Swr(e,t,r,i){let n=r.patternAtlas.getPattern(e.from.toString()),a=r.patternAtlas.getPattern(e.to.toString()),{width:o,height:s}=r.patternAtlas.getPixelSize(),l=2**i.tileID.overscaledZ,u=i.tileSize*2**r.transform.tileZoom/l,c=u*(i.tileID.canonical.x+i.tileID.wrap*l),f=u*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[o,s],u_mix:t.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Zh(i,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[c&65535,f&65535]}}function $wr(e,t){let r=2**t.canonical.z,i=t.canonical.y;return[new wo(0,i/r).toLngLat().lat,new wo(0,(i+1)/r).toLngLat().lat]}function Rae(e,t){return 1/Zh(e,1,t.tileZoom)}function Jot(e,t,r){return Dm(e.transform,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function r4r(e){return new Iae(e,Cq.FrameUBO,tst)}function i4r(e,t){let r=e.pending,{transform:i}=t,n=t.context.gl;r[q0.u_units_to_pixels]=1/i.pixelsToGLUnits[0],r[q0.u_units_to_pixels+1]=1/i.pixelsToGLUnits[1],r[q0.u_world_size]=n.drawingBufferWidth,r[q0.u_world_size+1]=n.drawingBufferHeight,r[q0.u_camera_to_center_distance]=i.cameraToCenterDistance,r[q0.u_symbol_fade_change]=t.options.fadeDuration?t.symbolFadeChange:1,r[q0.u_aspect_ratio]=i.width/i.height,r[q0.u_device_pixel_ratio]=t.pixelRatio,r[q0.u_viewport_size]=i.width,r[q0.u_viewport_size+1]=i.height,r[q0.u_pixel_extrude_scale]=1/i.width,r[q0.u_pixel_extrude_scale+1]=1/i.height,r[q0.u_pitch]=i.pitch/360*2*Math.PI,e.upload()}function Fat(e,t,r,i,n){var g,w;let a=e.context,o=e.transform,s=a.gl,l=e.useProgram("collisionBox"),u=[],c=0,f=0;for(let b of i){let _=t.getTile(b).getBucket(r);if(!_)continue;let M=n?_.textCollisionBox:_.iconCollisionBox,x=_.collisionCircleArray;x.length>0&&(u.push({circleArray:x,circleOffset:f,coord:b}),c+=x.length/4,f=c),M&&l.draw(a,s.LINES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,null,(g=e.style.map.terrain)==null?void 0:g.getTerrainData(b),o.getProjectionData({overscaledTileID:b,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,M.layoutVertexBuffer,M.indexBuffer,M.segments,null,e.transform.zoom,null,null,M.collisionVertexBuffer)}if(!n||!u.length)return;let h=e.useProgram("collisionCircle"),d=new Yrt;d.resize(c*4),d._trim();let p=0;for(let b of u)for(let _=0;_c.getElevation(p,A,y):void 0;f4r(m,f,h,l,u,_,x,w,M,Dm(u,v,o,s),p.toUnwrapped(),T,r.layout.get("symbol-height-anchor")==="ground")}}}function c4r(e,t,r,i,n,a){let o=t.tileAnchorPoint.add(new tr(t.translation[0],t.translation[1]));if(t.pitchWithMap){let s=i.mult(a);r||(s=s.rotate(-n));let l=o.add(s);return Cae(l.x,l.y,t.pitchedLabelPlaneMatrix,c3(t,l.x,l.y)).point}if(r){let s=f3(t.tileAnchorPoint.x+1,t.tileAnchorPoint.y,t).point.sub(e),l=Math.atan(s.y/s.x)+(s.x<0?Math.PI:0);return e.add(i.rotate(l))}return e.add(i)}function f4r(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,v=e.icon.dynamicLayoutVertexArray,m={};p.clear();for(let g=0;g=0&&(m[w.associatedIconIndex]={shiftedAnchor:R,angle:L})}}if(l){v.clear();let g=e.icon.placedSymbolArray;for(let w=0;we.style.map.terrain.getElevation(D,pe,we):void 0;m3r(P,e,n,G,xe,g,u,r.layout.get("text-rotation-alignment")==="map",D.toUnwrapped(),v.width,v.height,te,re)}let oe=n&&T||Ce,Ee=g?G:e.transform.clipSpaceToPixelsMatrix,ye=w||oe?o4r:Ee,ue=I&&r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ee;ee=I?P.iconsInText?u5r(B.kind,Y,b,g,w,oe,e,ye,Q,te,j,q,y,be,he):est(B.kind,Y,b,g,w,oe,e,ye,Q,te,n,j,ue,y,be,he):Qot(B.kind,Y,b,g,w,oe,e,ye,Q,te,n,j,y,be,he);let ae={program:$,buffers:R,uniformValues:ee,projectionData:ce,atlasTexture:J,atlasTextureIcon:V,atlasInterpolation:U,atlasInterpolationIcon:X,isSDF:I,hasHalo:ue};if(_&&P.canOverlap){M=!0;let xe=R.segments.get();for(let re of xe)A.push({segments:new Ws([re]),sortKey:re.sortKey,state:ae,terrainData:K})}else A.push({segments:R.segments,sortKey:0,state:ae,terrainData:K})}M&&A.sort((D,F)=>D.sortKey-F.sortKey);let E=(k=r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(null))!=null?k:1/0,S=r.layout.get("text-letter-spacing").constantOr(0)*24<0||E>1;for(let D of A){let F=D.state;d.activeTexture.set(p.TEXTURE0),F.atlasTexture.bind(F.atlasInterpolation,p.CLAMP_TO_EDGE),F.atlasTextureIcon&&(d.activeTexture.set(p.TEXTURE1),F.atlasTextureIcon&&F.atlasTextureIcon.bind(F.atlasInterpolationIcon,p.CLAMP_TO_EDGE));let P=F.isSDF&&F.hasHalo;if(P){let R=F.uniformValues;R.u_is_halo=1,S&&(R.u_is_plain=0,Pat(F.buffers,D.segments,r,e,F.program,x,c,f,R,F.projectionData,D.terrainData),R.u_is_halo=0,R.u_is_plain=1)}Pat(F.buffers,D.segments,r,e,F.program,x,c,f,F.uniformValues,F.projectionData,D.terrainData),P&&!S&&(F.uniformValues.u_is_halo=0)}}function Pat(e,t,r,i,n,a,o,s,l,u,c){let f=i.context,h=f.gl;n.draw(f,h.TRIANGLES,a,o,s,To.backCCW,l,c,u,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function d4r(e,t,r,i,n){var w;if(n.currentPass!=="translucent")return;let{isRenderingToTexture:a}=n,o=r.paint.get("circle-opacity"),s=r.paint.get("circle-stroke-width"),l=r.paint.get("circle-stroke-opacity"),u=!r.layout.get("circle-sort-key").isConstant();if(o.constantOr(1)===0&&(s.constantOr(1)===0||l.constantOr(1)===0))return;let c=e.context,f=c.gl,h=e.transform,d=e.getDepthModeForSublayer(0,Ba.ReadOnly),p=Fo.disabled,v=e.colorModeForRenderPass(),m=[],g=h.getCircleRadiusCorrection();for(let b of i){let _=t.getTile(b),M=_.getBucket(r);if(!M)continue;let x=r.paint.get("circle-translate"),T=r.paint.get("circle-translate-anchor"),A=Dm(h,_,x,T),y=M.programConfigurations.get(r.id),E=e.useProgram("circle",y),S=M.layoutVertexBuffer,C=M.indexBuffer,k=(w=e.style.map.terrain)==null?void 0:w.getTerrainData(b),D={programConfiguration:y,program:E,layoutVertexBuffer:S,indexBuffer:C,uniformValues:qwr(e,_,r,A,g),terrainData:k,projectionData:h.getProjectionData({overscaledTileID:b,applyGlobeMatrix:!a,applyTerrainMatrix:!0})};if(u){let F=M.segments.get();for(let P of F)m.push({segments:new Ws([P]),sortKey:P.sortKey,state:D})}else m.push({segments:M.segments,sortKey:0,state:D})}u&&m.sort((b,_)=>b.sortKey-_.sortKey);for(let b of m){let{programConfiguration:_,program:M,layoutVertexBuffer:x,indexBuffer:T,uniformValues:A,terrainData:y,projectionData:E}=b.state,S=b.segments;M.draw(c,f.TRIANGLES,d,p,v,To.backCCW,A,y,E,r.id,x,T,S,r.paint,e.transform.zoom,_)}}function p4r(e,t,r,i,n){if(r.paint.get("heatmap-opacity")===0)return;let a=e.context,{isRenderingToTexture:o,isRenderingGlobe:s}=n;if(e.style.map.terrain){for(let l of i){let u=t.getTile(l);t.hasRenderableParent(l)||(n.currentPass==="offscreen"?m4r(e,u,r,l,s):n.currentPass==="translucent"&&y4r(e,r,l,o,s))}a.viewport.set([0,0,e.width,e.height])}else n.currentPass==="offscreen"?v4r(e,t,r,i):n.currentPass==="translucent"&&g4r(e,r)}function v4r(e,t,r,i){let n=e.context,a=n.gl,o=e.transform,s=Fo.disabled,l=new ql([a.ONE,a.ONE],ea.transparent,[!0,!0,!0,!0]);x4r(n,e,r),n.clear({color:ea.transparent});for(let u of i){if(t.hasRenderableParent(u))continue;let c=t.getTile(u),f=c.getBucket(r);if(!f)continue;let h=f.programConfigurations.get(r.id),d=e.useProgram("heatmap",h),p=o.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),v=o.getCircleRadiusCorrection();d.draw(n,a.TRIANGLES,Ba.disabled,s,l,To.backCCW,Zot(c,o.zoom,r.paint.get("heatmap-intensity"),v),null,p,r.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,r.paint,o.zoom,h)}n.viewport.set([0,0,e.width,e.height])}function g4r(e,t){let r=e.context,i=r.gl;r.setColorMode(e.colorModeForRenderPass());let n=t.heatmapFbos.get(e8);n&&(r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1),ist(r,t).bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,Kot(e,t,0,1),null,null,t.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,t.paint,e.transform.zoom))}function m4r(e,t,r,i,n){let a=e.context,o=a.gl,s=Fo.disabled,l=new ql([o.ONE,o.ONE],ea.transparent,[!0,!0,!0,!0]),u=t.getBucket(r);if(!u)return;let c=i.key,f=r.heatmapFbos.get(c);f||(f=rst(a,t.tileSize,t.tileSize),r.heatmapFbos.set(c,f)),a.bindFramebuffer.set(f.framebuffer),a.viewport.set([0,0,t.tileSize,t.tileSize]),a.clear({color:ea.transparent});let h=u.programConfigurations.get(r.id),d=e.useProgram("heatmap",h,!n),p=e.transform.getProjectionData({overscaledTileID:t.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),v=e.style.map.terrain.getTerrainData(i);d.draw(a,o.TRIANGLES,Ba.disabled,s,l,To.disabled,Zot(t,e.transform.zoom,r.paint.get("heatmap-intensity"),1),v,p,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,h)}function y4r(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform;a.setColorMode(e.colorModeForRenderPass());let l=ist(a,t),u=r.key,c=t.heatmapFbos.get(u);if(!c)return;a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,c.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),l.bind(o.LINEAR,o.CLAMP_TO_EDGE);let f=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,Kot(e,t,0,1),null,f,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),c.destroy(),t.heatmapFbos.delete(u)}function x4r(e,t,r){let i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let n=r.heatmapFbos.get(e8);n?(i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),e.bindFramebuffer.set(n.framebuffer)):(n=rst(e,t.width/4,t.height/4),r.heatmapFbos.set(e8,n))}function rst(e,t,r){let i=e.gl,n=i.createTexture();i.bindTexture(i.TEXTURE_2D,n),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.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texStorage2D(i.TEXTURE_2D,1,i.RGBA16F,t,r);let a=e.createFramebuffer(t,r,!1,!1);return a.colorAttachment.set(n),a}function ist(e,t){return t.colorRampTexture||(t.colorRampTexture=new vu(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function nst(e,t,r,i){let n=e.context,a=n.bindFramebuffer.get(),o=n.viewport.get(),[,,s,l]=o;return _4r(e,s,l),n.viewport.set([0,0,s,l]),n.clear({color:ea.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(t,r,i),{compositeTarget:a,compositeViewport:o}}function _4r(e,t,r){let i=e.context.gl;if(!e.layerOpacityFbo){let a=e.context.createFramebuffer(t,r,!0,!0),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.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),a.colorAttachment.set(o),a.depthAttachment.set(e.context.createRenderbuffer(i.DEPTH_STENCIL,t,r)),e.layerOpacityFbo=a,e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}if(e.layerOpacityFbo.width===t&&e.layerOpacityFbo.height===r){e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}let n=e.layerOpacityFbo;i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(n.depthAttachment.get()),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t,r),e.context.bindRenderbuffer.set(null),n.width=t,n.height=r,e.context.bindFramebuffer.set(n.framebuffer)}function ast(e,t,r,i){let n=e.context,a=n.gl;n.bindFramebuffer.set(r.compositeTarget),n.viewport.set(r.compositeViewport),n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(n,a.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,a5r(t,0),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom),e.currentStencilSource=void 0}function ost(e,t,r,i,n,a,o,s){let l=256;if(n.stepInterpolant){let u=t.getSource().maxzoom,c=o.canonical.z===u?Math.ceil(1<e.options.anisotropicFilterPitch&&p.texParameterf(p.TEXTURE_2D,d.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,d.extTextureFilterAnisotropicMax);let F=e.getTerrainDataForTile(A,c),P=m.getProjectionData({overscaledTileID:A,aligned:b,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),R=zbr(k,C,D.fadeMix,r,s,l),L=f!=null?f:g.getMeshFromTileID(d,A.canonical,a,o,"raster"),I=n?n[A.overscaledZ]:Fo.disabled;v.draw(d,p.TRIANGLES,y,I,w,u?To.frontCCW:To.backCCW,R,F,P,r.id,L.vertexBuffer,L.indexBuffer,L.segments)}}function L4r(e,t,r,i){let n={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(r===0||i)return n;if(e.fadingParentID){let a=t.getLoadedTile(e.fadingParentID);if(!a)return n;let o=2**(a.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:a,parentScaleBy:o,parentTopLeft:[e.tileID.canonical.x*o%1,e.tileID.canonical.y*o%1],fadeValues:P4r(e,a,r)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:I4r(e,r)}:n}function P4r(e,t,r){let i=Oo(),n=(i-e.timeAdded)/r,a=(i-t.timeAdded)/r,o=e.fadingDirection===1,s=Jn(n,0,1),l=Jn(1-a,0,1),u=o?s:l;return{tileOpacity:u,parentTileOpacity:o?l:s,fadeMix:{opacity:1,mix:1-u}}}function I4r(e,t){let r=(Oo()-e.timeAdded)/t,i=Jn(r,0,1);return{tileOpacity:i,fadeMix:{opacity:i,mix:0}}}function R4r(e,t,r,i,n){let a=r.paint.get("background-color"),o=r.paint.get("background-opacity");if(o===0)return;let{isRenderingToTexture:s}=n,l=e.context,u=l.gl,c=e.style.projection,f=e.transform,h=f.tileSize,d=r.paint.get("background-pattern");if(e.isPatternMissing(d))return;let p=!d&&a.a===1&&o===1&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(n.currentPass!==p)return;let v=Fo.disabled,m=e.getDepthModeForSublayer(0,p==="opaque"?Ba.ReadWrite:Ba.ReadOnly),g=e.colorModeForRenderPass(),w=e.useProgram(d?"backgroundPattern":"background"),b=i||ZT(f,{tileSize:h,terrain:e.style.map.terrain});d&&(l.activeTexture.set(u.TEXTURE0),e.patternAtlas.bind(e.context));let _=r.getCrossfadeParameters();for(let M of b){let x=f.getProjectionData({overscaledTileID:M,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),T=d?d5r(o,e,d,{tileID:M,tileSize:h},_):h5r(o,a),A=e.getTerrainDataForTile(M,s),y=c.getMeshFromTileID(l,M.canonical,!1,!0,"raster");w.draw(l,u.TRIANGLES,m,v,g,To.backCCW,T,A,x,r.id,y.vertexBuffer,y.indexBuffer,y.segments)}}function U4r(e){let t=e.transform.padding;Bat(e,e.transform.height-(t.top||0),3,z4r),Bat(e,t.bottom||0,3,B4r),qat(e,t.left||0,3,q4r),qat(e,e.transform.width-(t.right||0),3,O4r);let r=e.transform.centerPoint;V4r(e,r.x,e.transform.height-r.y,N4r)}function V4r(e,t,r,i){Sq(e,t-1,r-10,2,20,i),Sq(e,t-10,r-1,20,2,i)}function Bat(e,t,r,i){Sq(e,0,t+r/2,e.transform.width,r,i)}function qat(e,t,r,i){Sq(e,t-r/2,0,r,e.transform.height,i)}function Sq(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 G4r(e,t,r){for(let i of r)H4r(e,t,i)}function H4r(e,t,r){var g,w;let i=e.context,n=i.gl,a=e.useProgram("debug"),o=Ba.disabled,s=Fo.disabled,l=e.colorModeForRenderPass(),u="$debug",c=(g=e.style.map.terrain)==null?void 0:g.getTerrainData(r);i.activeTexture.set(n.TEXTURE0);let f=((w=t.getTileByID(r.key).latestRawTileData)==null?void 0:w.byteLength)||0,h=Math.floor(f/1024),d=t.getTile(r).tileSize,p=512/Math.min(d,512)*(r.overscaledZ/e.transform.zoom)*.5,v=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(v+=` => ${r.overscaledZ}`),j4r(e,`${v} ${h}kB`);let m=e.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(i,n.TRIANGLES,o,s,ql.alphaBlended,To.disabled,kat(ea.transparent,p),null,m,u,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),a.draw(i,n.LINE_STRIP,o,s,l,To.disabled,kat(ea.red),c,m,u,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function j4r(e,t){e.initDebugOverlayCanvas();let r=e.debugOverlayCanvas,i=e.context.gl,n=e.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,r.width,r.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(t,5,5),n.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}function $4r(e,t){let r=null,i=Object.values(e._layers).flatMap(s=>s.source&&!s.isHidden(t)?[e.tileManagers[s.source]]:[]),n=i.filter(s=>s.getSource().type==="vector"),a=i.filter(s=>s.getSource().type!=="vector"),o=s=>{(!r||r.getSource().maxzoom{var d;return l.getProjectionData({overscaledTileID:new Bc(h.tileID.canonical.z,(d=h.tileID.wrap)!=null?d:0,h.tileID.canonical.z,h.tileID.canonical.x,h.tileID.canonical.y),aligned:h.aligned,applyGlobeMatrix:h.applyGlobeMatrix,applyTerrainMatrix:h.applyTerrainMatrix})}},f=o.renderingMode?o.renderingMode:"2d";if(i.currentPass==="offscreen"){let h=o.prerender;h&&(e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),h.call(o,a.gl,c),a.setDirty(),e.setBaseState())}else if(i.currentPass==="translucent"){e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),a.setStencilMode(Fo.disabled);let h=f==="3d"?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Ba.ReadOnly);a.setDepthMode(h),o.render(a.gl,c),a.setDirty(),e.setBaseState(),a.bindFramebuffer.set(null)}}function Y4r(e,t){let r=e.context,i=r.gl,n=e.transform,a=ql.unblended,o=new Ba(i.LEQUAL,Ba.ReadWrite,[0,1]),s=t.tileManager.getRenderableTiles(),l=e.useProgram("terrainDepth");r.bindFramebuffer.set(t.getFramebuffer().framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:ea.white,depth:1});for(let u of s){let c=t.getTerrainMesh(u.tileID),f=t.getTerrainData(u.tileID),h=n.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),d=mwr(t.getSkirtLength(n.zoom));l.draw(r,i.TRIANGLES,o,Fo.disabled,a,To.backCCW,d,f,h,"terrain",c.vertexBuffer,c.indexBuffer,c.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}function X4r(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]);for(let f of r){let h=t.getTerrainMesh(f.tileID),d=e.renderToTexture.getTexture(f),p=t.getTerrainData(f.tileID);a.activeTexture.set(o.TEXTURE0),d.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_LINEAR);let v=t.getSkirtLength(s.zoom),m=s.calculateFogMatrix(f.tileID.toUnwrapped()),g=gwr(v,m,e.style.sky,s.pitch,n),w=s.getProjectionData({overscaledTileID:f.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(a,o.TRIANGLES,u,Fo.disabled,l,To.backCCW,g,p,w,"terrain",h.vertexBuffer,h.indexBuffer,h.segments)}}function ust(e,t){if(!t.mesh){let r=new Pm;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);let i=new Mv;i.emplaceBack(0,1,2),i.emplaceBack(0,2,3),t.mesh=new M8(e.createVertexBuffer(r,l3.members),e.createIndexBuffer(i),Ws.simpleSegment(0,0,r.length,i.length))}return t.mesh}function Z4r(e,t){let r=e.context,i=r.gl,n=m5r(t,e.transform,e.pixelRatio),a=new Ba(i.LEQUAL,Ba.ReadWrite,[0,1]),o=Fo.disabled,s=e.colorModeForRenderPass(),l=e.useProgram("sky"),u=ust(r,t);l.draw(r,i.TRIANGLES,a,o,s,To.disabled,n,null,void 0,"sky",u.vertexBuffer,u.indexBuffer,u.segments)}function K4r(e,t){let r=e.getCartesianPosition();Bet(r,r);let i=Qd(new Float64Array(16));return e.properties.get("anchor")==="map"&&(km(i,i,t.rollInRadians),Xb(i,i,-t.pitchInRadians),km(i,i,t.bearingInRadians),Xb(i,i,t.center.lat*Math.PI/180),die(i,i,-t.center.lng*Math.PI/180)),qet(r,r,i),r}function J4r(e,t,r){let i=e.context,n=i.gl,a=e.useProgram("atmosphere"),o=new Ba(n.LEQUAL,Ba.ReadOnly,[0,1]),s=e.transform,l=K4r(r,e.transform),u=s.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=t.properties.get("atmosphere-blend")*u.projectionTransition;if(c===0)return;let f=YT(s.worldSize,s.center.lat),h=Oot(s),d=v5r(l,c,h,f,s.inverseProjectionMatrix),p=ust(i,t);a.draw(i,n.TRIANGLES,o,Fo.disabled,ql.alphaBlended,To.disabled,d,null,null,"atmosphere",p.vertexBuffer,p.indexBuffer,p.segments)}function eTr(e,t,r){var n;let i=(n=t==null?void 0:t.transitionState)!=null?n:0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:r,projectionTransition:i,isRenderingGlobe:i>0}}function fst(e,t){let r=!1,i=null,n,a=()=>{i=null,r&&(r=(e(...n),i=setTimeout(a,t),!1))};return(...o)=>(r=!0,n=o,i||a(),i)}function m8(e,t){(!e.duration||e.duration({around:i,panDelta:i.sub(r)}),activateOnStart:!0,moveStateManager:new k8({checkCorrectEvent:r=>r.button===0&&!r.ctrlKey}),enable:e,assignEvents:Fq})}function yTr({enable:e,clickTolerance:t,aroundCenter:r=!0,minPixelCenterThreshold:i=100,rotateSpeed:n=.8},a){return new E8({clickTolerance:t,move:(o,s)=>{let l=a();if(r&&Math.abs(l.y-o.y)>i)return{bearingDelta:Tie(new tr(o.x,s.y),s,l)};let u=(s.x-o.x)*n;return r&&s.yo.button===0&&o.ctrlKey||o.button===2&&!o.ctrlKey}),enable:e,assignEvents:Fq})}function xTr({enable:e,clickTolerance:t,pitchSpeed:r=-.5}){return new E8({clickTolerance:t,move:(i,n)=>({pitchDelta:(n.y-i.y)*r}),moveStateManager:new k8({checkCorrectEvent:i=>i.button===0&&i.ctrlKey||i.button===2}),enable:e,assignEvents:Fq})}function _Tr({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new E8({clickTolerance:t,move:(n,a)=>{let o=i(),s=(a.x-n.x)*r;return a.yn.button===2&&n.ctrlKey}),enable:e,assignEvents:Fq})}function fq(e,t,r){for(let i=0;iMath.abs(e.x)}function TTr(e){return e*(2-e)}function Kne(e){var t;return((t=e.panDelta)==null?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}function OTr(e=!1){return Ki(this,null,function*(){if(a3!==void 0&&!e)return a3;if(window.navigator.permissions===void 0)return a3=!!window.navigator.geolocation,a3;try{a3=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(t){a3=!!window.navigator.geolocation}return a3})}function Est(e,t,r,i=!1){if(i||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return e==null?void 0:e.wrap();let n=new mn(e.lng,e.lat);if(e=new mn(e.lng,e.lat),t){let a=new mn(e.lng-360,e.lat),o=new mn(e.lng+360,e.lat),s=r.locationToScreenPoint(e).distSqr(t);r.locationToScreenPoint(a).distSqr(t)180;){let a=r.locationToScreenPoint(e);if(a.x>=0&&a.y>=0&&a.x<=r.width&&a.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e.lng!==n.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(e))?e:n}function kst(e,t,r){let i=e.classList;for(let n in Oae)i.remove(`maplibregl-${r}-anchor-${n}`);i.add(`maplibregl-${r}-anchor-${t}`)}function tp(e,t,r=[]){let i=$n.createNS("http://www.w3.org/2000/svg",e);for(let n in t)i.setAttributeNS(null,n,t[n]);for(let n of r)i.appendChild(n);return i}function NTr(){return Jne||(Jne=tp("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[tp("g",{"fill-rule":"nonzero"},[tp("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,t])=>tp("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:t}))),tp("g",{fill:Cst},[tp("path",{d:"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"})]),tp("g",{opacity:"0.25",fill:"#000000"},[tp("path",{d:"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"})]),tp("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),tp("g",{transform:"translate(8.0, 8.0)"},[tp("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),tp("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),Jne)}function UTr(e){return e.firstElementChild.children[1]}function $at(e,t,r){let i=(r==null?void 0: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.round(e.project(s).x-e.project(o).x),u=Math.min(i,l,e._container.clientWidth),c=o.distanceTo(s);if((r==null?void 0:r.unit)==="imperial"){let f=3.2808*c;f>5280?_8(t,u,f/5280,e._getUIString("ScaleControl.Miles")):_8(t,u,f,e._getUIString("ScaleControl.Feet"))}else(r==null?void 0:r.unit)==="nautical"?_8(t,u,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?_8(t,u,c/1e3,e._getUIString("ScaleControl.Kilometers")):_8(t,u,c,e._getUIString("ScaleControl.Meters"))}function _8(e,t,r,i){let n=WTr(r),a=n/r;e.style.width=`${t*a}px`,e.innerHTML=`${n} ${i}`}function $Tr(e){let t=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*t)/t}function WTr(e){let t=10**(`${Math.floor(e)}`.length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:$Tr(r),t*r}function Lst(e){if(!e)return Lst(new tr(0,0));if(typeof e=="number"){let t=Math.round(Math.abs(e)/Math.SQRT2);return{center:new tr(0,0),top:new tr(0,e),"top-left":new tr(t,t),"top-right":new tr(-t,t),bottom:new tr(0,-e),"bottom-left":new tr(t,-t),"bottom-right":new tr(-t,-t),left:new tr(e,0),right:new tr(-e,0)}}if(e instanceof tr||Array.isArray(e)){let t=tr.convert(e);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:tr.convert(e.center||[0,0]),top:tr.convert(e.top||[0,0]),"top-left":tr.convert(e["top-left"]||[0,0]),"top-right":tr.convert(e["top-right"]||[0,0]),bottom:tr.convert(e.bottom||[0,0]),"bottom-left":tr.convert(e["bottom-left"]||[0,0]),"bottom-right":tr.convert(e["bottom-right"]||[0,0]),left:tr.convert(e.left||[0,0]),right:tr.convert(e.right||[0,0])}}function e6r(e){var t,r,i,n;return e?{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}:{top:0,right:0,bottom:0,left:0}}function r6r(e,t){return A8().setRTLTextPlugin(e,t)}function i6r(){return A8().getRTLTextPluginStatus()}function n6r(){return t6r}function a6r(){return kq.workerCount}function o6r(e){kq.workerCount=e}function s6r(){return Qh.MAX_PARALLEL_IMAGE_REQUESTS}function l6r(e){Qh.MAX_PARALLEL_IMAGE_REQUESTS=e}function u6r(){return Qh.WORKER_URL}function c6r(e){Qh.WORKER_URL=e}function f6r(e){return Ki(this,null,function*(){yield wae().broadcast("IS",e)})}var Ist,Wat,Ine,QB,Rne,fh,Eq,t,Bo,$n,rg,B_r,cc,Mn,Qne,rp,Is,O0,b8,Xat,eae,Zat,Kat,pq,Jat,W_r,Y_r,tae,X_r,Z_r,Q_r,rae,xae,ebr,tbr,rbr,ibr,nbr,abr,obr,sbr,lbr,ubr,cbr,_ae,kq,gbr,_q,rot,tq,Ev,oot,sot,Tae,lot,cot,$T,Rbr,zbr,M8,l3,rq,XT,pot,vot,got,Hbr,mot,jbr,$br,iae,Ybr,Qnt,yot,Xbr,Aae,Mae,t3r,aat,qm,aae,c3r,oat,p3r,x3r,w3r,uat,d8,cat,T3r,A3r,M3r,S3r,E3r,k3r,C3r,p8,D3r,F3r,pat,xl,L3r,g8,P3r,I3r,R3r,Eot,z3r,B3r,q3r,O3r,N3r,U3r,V3r,G3r,gat,tg,kot,Cot,uae,cae,Fae,H3r,j3r,$3r,yat,W3r,xat,Tq,Aq,Y3r,X3r,qne,Bot,_at,One,swr,Une,lwr,Aat,Not,Sat,Hot,Eat,cwr,hae,fwr,hwr,dwr,pwr,vwr,gwr,mwr,Cq,xwr,Iae,jot,HT,$ot,sq,Mwr,Ewr,kwr,Yot,Cwr,Dwr,Fwr,Lwr,Pwr,Xot,Iwr,Rwr,zwr,Bwr,qwr,Owr,kat,Nwr,Uwr,Zot,Kot,Vwr,Gwr,Hwr,jwr,Wwr,Ywr,Xwr,Zwr,Kwr,Jwr,Qwr,Dq,e5r,t5r,r5r,i5r,n5r,a5r,o5r,s5r,l5r,Qot,est,u5r,c5r,f5r,h5r,d5r,p5r,v5r,g5r,m5r,lq,y5r,x5r,Cat,_5r,No,b5r,w5r,T5r,A5r,M5r,S5r,E5r,k5r,C5r,D5r,F5r,L5r,P5r,I5r,R5r,z5r,B5r,q5r,O5r,N5r,U5r,V5r,G5r,H5r,j5r,$5r,W5r,Y5r,X5r,Z5r,K5r,zae,J5r,Q5r,e4r,t4r,tst,q0,ql,n4r,Ba,Hne,Fo,Dat,jne,To,uq,o4r,zat,Xne,z4r,B4r,q4r,O4r,N4r,Q4r,u3,tTr,cst,hst,S8,rTr,iTr,nTr,aTr,oTr,sTr,lTr,uTr,dst,fTr,pae,hTr,E8,dTr,k8,vTr,gTr,Fq,bTr,qae,Oat,pst,vst,gst,wTr,mst,Vat,yst,xst,ATr,MTr,_st,bst,wst,Tst,STr,hq,ETr,kTr,CTr,Ast,Mst,Sst,DTr,Gat,FTr,jT,LTr,PTr,ITr,Hat,RTr,zTr,BTr,qTr,a3,Oae,jat,Cst,Jne,o3,Dst,vae,VTr,dq,x8,s3,gae,Fst,GTr,HTr,jTr,mae,YTr,XTr,ZTr,KTr,JTr,yae,QTr,t6r,Rst=Ea(()=>{Vnt();Ist={};Wat="6.9.0";fh={frame(e,t,r,i){let n=i||window,a=n.requestAnimationFrame(s=>{o(),t(s)}),{unsubscribe:o}=Nz(e.signal,"abort",()=>{o(),n.cancelAnimationFrame(a),r(new RT(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;if(nB()&&!fie())t=new OffscreenCanvas(e.width,e.height).getContext("2d",{willReadFrequently:!0});else{let r=window.document.createElement("canvas");r.width=e.width,r.height=e.height,t=r.getContext("2d",{willReadFrequently:!0})}if(!t)throw Error("failed to create canvas 2d context");return t.drawImage(e,0,0,e.width,e.height),t},resolveURL(e){return Ine||(Ine=document.createElement("a")),Ine.href=e,Ine.href},get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return Rne===void 0?matchMedia?(QB!=null||(QB=matchMedia("(prefers-reduced-motion: reduce)")),QB.matches):!1:Rne},set prefersReducedMotion(e){Rne=e}},Eq=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt===null?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};$n=(Bo=class{static create(t,r,i){let n=window.document.createElement(t);return r!==void 0&&(n.className=r),i&&i.appendChild(n),n}static createNS(t,r){return window.document.createElementNS(t,r)}static disableDrag(){Bo.docStyle&&Bo.selectProp&&(Bo.userSelect=Bo.docStyle[Bo.selectProp],Bo.docStyle[Bo.selectProp]="none")}static enableDrag(){Bo.docStyle&&Bo.selectProp&&(Bo.docStyle[Bo.selectProp]=Bo.userSelect)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",Bo.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Bo.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Bo.suppressClickInternal,!0)},0)}static getScale(t){let r=t.getBoundingClientRect();return{x:r.width/t.offsetWidth||1,y:r.height/t.offsetHeight||1,boundingClientRect:r}}static getPoint(t,r,i){let n=r.boundingClientRect;return new tr((i.clientX-n.left)/r.x-t.clientLeft,(i.clientY-n.top)/r.y-t.clientTop)}static mousePos(t,r){let i=Bo.getScale(t);return Bo.getPoint(t,i,r)}static touchPos(t,r){let i=[],n=Bo.getScale(t);for(let a of r)i.push(Bo.getPoint(t,n,a));return i}static sanitize(t){let r=new DOMParser().parseFromString(t,"text/html").body||document.createElement("body"),i=r.querySelectorAll("script, iframe");for(let n of i)n.remove();return Bo.clean(r),r.innerHTML}static isPossiblyDangerous(t,r){let i=r.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(t)&&(i.includes("javascript:")||i.includes("data:"))||t==="srcdoc"||t.startsWith("on"))return!0}static clean(t){let r=t.children;for(let i of r)Bo.removeAttributes(i),Bo.clean(i)}static removeAttributes(t){for(let{name:r,value:i}of Array.from(t.attributes))Bo.isPossiblyDangerous(r,i)&&t.removeAttribute(r)}},Bo.docStyle=typeof window<"u"&&((t=window.document)==null?void 0:t.documentElement.style),Bo.selectProp=!Bo.docStyle||"userSelect"in Bo.docStyle?"userSelect":"webkitUserSelect",Bo);(function(e){let t,r,i,n;e.resetRequestQueue=()=>{t=[],r=0,i=0,n={}},e.addThrottleControl=f=>{let h=i++;return n[h]=f,h},e.removeThrottleControl=f=>{delete n[f],u()};let a=()=>{for(let f of Object.keys(n))if(n[f]())return!0;return!1};function o(f,h,d,p,v=!0,m){return Ki(this,null,function*(){let g=yield f.transformRequest(h,d);return gB(p.signal),rg.getImage(g,p,v,m)})}e.transformAndGetImage=o,e.getImage=(f,h,d=!0,p)=>new Promise((v,m)=>{f.headers||(f.headers={}),f.headers.accept="image/webp,*/*",ln(f,{type:"image"});let g={abortController:h,requestParameters:f,supportImageRefresh:d,imageBitmapOptions:p,state:"queued",onError:w=>{m(w)},onSuccess:w=>{v(w)}};t.push(g),u()});let s=(f,h)=>typeof createImageBitmap=="function"?Qet(f,h):ett(f),l=f=>Ki(null,null,function*(){f.state="running";let{requestParameters:h,supportImageRefresh:d,imageBitmapOptions:p,onError:v,onSuccess:m,abortController:g}=f,w=d===!1&&!p&&!Hb(self)&&!Mie(h.url)&&(!h.headers||Object.keys(h.headers).reduce((_,M)=>_&&M==="accept",!0));r++;let b=w?c(h,g):Hk(h,g);try{let _=yield b;delete f.abortController,f.state="completed",_.data instanceof HTMLImageElement||ex(_.data)?m(_):!_.data||_.data.byteLength===0?m({data:null,cacheControl:_.cacheControl,expires:_.expires}):m({data:yield s(_.data,p),cacheControl:_.cacheControl,expires:_.expires})}catch(_){delete f.abortController,v(Ic(_))}finally{r--,u()}}),u=()=>{let f=a()?Qh.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Qh.MAX_PARALLEL_IMAGE_REQUESTS;for(let h=r;h0;h++){let d=t.shift();if(d.abortController.signal.aborted){h--;continue}l(d)}},c=(f,h)=>new Promise((d,p)=>{let v=new Image,m=f.url,g=f.credentials;g&&g==="include"?v.crossOrigin="use-credentials":(g&&g==="same-origin"||!Eie(m))&&(v.crossOrigin="anonymous"),h.signal.addEventListener("abort",()=>{v.src="",p(new RT(h.signal.reason))}),v.fetchPriority="high",v.onload=()=>{v.onerror=v.onload=null,d({data:v})},v.onerror=()=>{v.onerror=v.onload=null,!h.signal.aborted&&p(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},v.src=m})})(rg||(rg={})),rg.resetRequestQueue();B_r=class{constructor(e){this._transformRequestFn=e!=null?e:null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},cc=class extends e0{},Mn=class extends cc{},Qne=class extends cc{constructor(e={}){super("style.load",e)}},rp=class extends cc{constructor(e,t={}){super(e,t),this.dataType="style"}},Is=class extends cc{constructor(e,t={}){super(e,t),this.dataType="source"}},O0=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r,i={}){r=r instanceof MouseEvent?r:new MouseEvent(e,r);let n=$n.mousePos(t.getCanvas(),r),a=t.unproject(n);super(e,ln({point:n,lngLat:a,originalEvent:r},i)),this._defaultPrevented=!1,this.target=t}},b8=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){let i=e==="touchend"?r.changedTouches:r.touches,n=$n.touchPos(t.getCanvasContainer(),i),a=n.map(l=>t.unproject(l)),o=n.reduce((l,u,c,f)=>l.add(u.div(f.length)),new tr(0,0)),s=t.unproject(o);super(e,{points:n,point:o,lngLats:a,lngLat:s,originalEvent:r}),this._defaultPrevented=!1}},Xat=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t){super("wheel",{originalEvent:t}),this._defaultPrevented=!1}},eae=class extends cc{},Zat=class extends cc{constructor(e={}){super("terrain",e)}},Kat=class extends cc{constructor(e={}){super("projectiontransition",e)}},pq=class extends cc{},Jat=class extends cc{constructor(e={}){super("styleimagemissing",e)}};W_r=class extends mu{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:t,promiseResolve:r}of this.requestors)r(this._getImagesForIds(t));this.requestors=[]}}getImage(e){let t=this.images[e];if(t&&!t.data&&t.spriteData){let r=t.spriteData;t.data=new As({width:r.width,height:r.height},r.context.getImageData(r.x,r.y,r.width,r.height).data),t.spriteData=null}return t}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,this._imagesIds=null,t.isWebGLImage&&this.updateImage(e,t,!1))}_validate(e,t){let r=!0,i=t.data||t.spriteData;return this._validateStretch(t.stretchX,i==null?void 0:i.width)||(this.fire(new An(Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(t.stretchY,i==null?void 0:i.height)||(this.fire(new An(Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(t.content,t)||(this.fire(new An(Error(`Image "${e}" has invalid "content" value`))),r=!1),r}_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){var n;let i=this.images[e];if(r){let a=i.data||i.spriteData;if(a.width!==t.data.width||a.height!==t.data.height)throw Error(`size mismatch between old image (${a.width}x${a.height}) and new image (${t.data.width}x${t.data.height}).`)}t.version=((n=i.version)!=null?n:0)+1,this.images[e]=t,this.updateVersion++}removeImage(e){var r;let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,(r=t.userImage)!=null&&r.onRemove&&t.userImage.onRemove())}listImages(){var e;return(e=this._imagesIds)!=null||(this._imagesIds=Object.keys(this.images)),this._imagesIds}_getSpriteImageId(e,t){return e==="default"?t:`${e}:${t}`}setSpriteImages(e,t){var o;let r=(o=this._spriteImagesIds[e])!=null?o:[],i=[];for(let s in t){let l=this._getSpriteImageId(e,s);i.push(l),l in this.images?this.updateImage(l,t[s],!1):this.addImage(l,t[s])}let n=new Set(i),a=r.filter(s=>!n.has(s));for(let s of a)this.removeImage(s);return this._spriteImagesIds[e]=i,{loaded:i,removed:a}}removeSpriteImages(e){var r;let t=(r=this._spriteImagesIds[e])!=null?r:[];for(let i of t)this.removeImage(i);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let t of e)this.removeImage(t);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let n of e)this.images[n]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){return Ki(this,null,function*(){var n;let t=new Set(e.filter(a=>!this.getImage(a))),r=this.missingImageResolver;r&&(yield Promise.allSettled(Array.from(t,a=>r(a))));let i={};for(let a of e){let o=this.getImage(a);o&&(t.delete(a),i[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf,version:o.version,stretchX:o.stretchX,stretchY:o.stretchY,content:o.content,textFitWidth:o.textFitWidth,textFitHeight:o.textFitHeight,hasRenderCallback:!!((n=o.userImage)!=null&&n.render),isWebGLImage:o.isWebGLImage})}for(let a of t)this.fire(new Jat({id:a})),Ma(`Image "${a}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return i})}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let t of e){if(this._renderCallbacksDispatchedThisFrame[t])continue;this._renderCallbacksDispatchedThisFrame[t]=!0;let r=this.getImage(t);r||Ma(`Image with ID: "${t}" was not found`),Hit(r)&&this.updateImage(t,r)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=ma(fn({},r),{data:r.data?r.data.clone():null})}return e}},Y_r=class{constructor(e){this._imageManager=e,this._entries={},this._image=new As({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&(this._texture=(this._texture.destroy(),null)),this._entries={},this._image=new As({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:t}=this._image;return{width:e,height:t}}getPattern(e){let t=this._imageManager.getImage(e);if(!t)return null;let r=this._entries[e];if((r==null?void 0:r.image)!==t){let i={w:t.data.width+2,h:t.data.height+2,x:0,y:0};this._entries[e]={bin:i,position:new WB(i,t),image:t}}else if(r.position.version!==t.version)r.position.version=t.version;else return r.position;return this._update(),this._entries[e].position}bind(e){let t=e.gl;this._texture?this._dirty&&(this._dirty=(this._texture.update(this._image),!1)):(this._texture=new vu(e,this._image,t.RGBA),this._dirty=!1),this._texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_update(){for(let n in this._entries)this._imageManager.getImage(n)||delete this._entries[n];let e=[];for(let n in this._entries)e.push(this._entries[n].bin);let{w:t,h:r}=hne(e),i=this._image;i.resize({width:t||1,height:r||1});for(let n in this._entries){let{bin:a}=this._entries[n],o=a.x+1,s=a.y+1,l=this._entries[n].image.data,u=l.width,c=l.height;As.copy(l,i,{x:0,y:0},{x:o,y:s},{width:u,height:c}),As.copy(l,i,{x:0,y:c-1},{x:o,y:s-1},{width:u,height:1}),As.copy(l,i,{x:0,y:0},{x:o,y:s+c},{width:u,height:1}),As.copy(l,i,{x:u-1,y:0},{x:o-1,y:s},{width:1,height:c}),As.copy(l,i,{x:0,y:0},{x:o+u,y:s},{width:1,height:c})}this._dirty=!0}},tae=1114111,X_r={start:0,end:tae},Z_r=0;Q_r=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[t,r]of Object.entries(e!=null?e:{})){let i=Array.isArray(r)?r:[r];this._faces[t]=i.map(n=>this._declareFontFace(t,n)).filter(n=>n!==null)}}hasFontFaces(){return Object.keys(this._faces).length>0}getFontFamily(e,t){return Ki(this,null,function*(){var r,i;for(let n of e.split(","))for(let a of(r=this._faces[n.trim()])!=null?r:[])if(J_r(a,t)&&((i=a.loaded)!=null||(a.loaded=this._loadFontFace(a)),yield a.loaded))return a.family;return null})}_declareFontFace(e,t){let r=typeof t=="string"?{url:t}:t;if(typeof(r==null?void 0:r.url)!="string")return Ma(`Ignoring the font face declared for "${e}": it has no URL.`),null;let i=`maplibre-gl-font-face-${Z_r++}`,n=r["unicode-range"];if(!(n!=null&&n.length))return{url:r.url,ranges:[X_r],family:i};let a=[];for(let o of n){let s=K_r(o);if(!s){Ma(`Ignoring the unicode range "${o}" of the font face at ${r.url}: it is not a valid range.`);continue}a.push(s)}return a.length?{url:r.url,ranges:a,family:i}:null}_loadFontFace(e){return Ki(this,null,function*(){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return Ma(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let t;try{return t=new FontFace(e.family,yield this._downloadFontFile(e.url)),Object.values(this._faces).some(r=>r.includes(e))?(document.fonts.add(t),this._registered.add(t),yield t.load(),!0):!1}catch(r){return t&&this._unregister(t),Ma(`Ignoring the font face at ${e.url}: ${Ic(r).message}`),!1}})}_downloadFontFile(e){return Ki(this,null,function*(){let t=yield this.requestManager.transformRequest(e,"Glyphs"),r=yield Sie(t,new AbortController);if(!(r!=null&&r.data))throw Error(`the response was empty for the font file at ${e}`);return r.data})}_unregister(e){var t;(t=document.fonts)==null||t.delete(e),this._registered.delete(e)}_unregisterAll(){var e;for(let t of this._registered)(e=document.fonts)==null||e.delete(t);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}},rae=1e20,xae=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-(e/255)**.45454545454545453;xae[e]=t*Math.abs(t)}xae[255]=-1e20;ebr=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+t*4,u=this._createCanvas(l),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${n}`,c.textBaseline="alphabetic",c.textAlign="left",c.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(typeof OffscreenCanvas<"u")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)),u=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),c=l+2*this.buffer,f=u+2*this.buffer,h=Math.max(c*f,0),d=new Uint8ClampedArray(h),p={data:d,width:c,height:f,glyphWidth:l,glyphHeight:u,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(l===0||u===0)return p;let{ctx:v,buffer:m,gridInner:g,gridOuter:w}=this;this.lang&&(v.lang=this.lang),v.clearRect(m,m,l,u),v.fillText(e,m-s,m+o);let b=v.getImageData(m,m,l,u);w.fill(rae,0,h),g.fill(0,0,h);let _=3;for(let A=0;A{let r=new ebr(e);return r.buffer=t,r},ibr=class{constructor(e,t,r,i=rbr){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={},this.lang=r,this.fontFaceManager=new Q_r(e),this.createRasterizer=i}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}getGlyphs(e){return Ki(this,null,function*(){let t=[];for(let n in e)for(let a of e[n])t.push(this._getAndCacheGlyphsPromise(n,a));let r=yield Promise.all(t),i={};for(let{stack:n,id:a,glyph:o}of r)i[n]||(i[n]={}),i[n][a]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics};return i})}_getAndCacheGlyphsPromise(e,t){return Ki(this,null,function*(){var o,s;(s=(o=this.entries)[e])!=null||(o[e]={glyphs:{},requests:{},ranges:{}});let r=this.entries[e],i=r.glyphs[t];if(i!==void 0)return{stack:e,id:t,glyph:i};let n=t.codePointAt(0),a=this.fontFaceManager.hasFontFaces()?yield this.fontFaceManager.getFontFamily(e,n):null;return a?(i=r.glyphs[t]=yield this._drawGlyph(r,e,t,a),{stack:e,id:t,glyph:i}):!this.url||r8(t)||this._charUsesLocalIdeographFontFamily(n)?(i=r.glyphs[t]=yield this._drawGlyph(r,e,t),{stack:e,id:t,glyph:i}):yield this._downloadAndCacheRangePromise(e,t)})}_downloadAndCacheRangePromise(e,t){return Ki(this,null,function*(){var a;let r=t.codePointAt(0),i=this.entries[e],n=Math.floor(r/256);if(i.ranges[n])return{stack:e,id:t,glyph:null};(a=i.requests)[n]||(a[n]=this._loadGlyphRange(e,n));try{let o=yield i.requests[n];for(let s in o)i.glyphs[String.fromCodePoint(+s)]=o[+s];return i.ranges[n]=!0,{stack:e,id:t,glyph:o[r]||null}}catch(o){let s=i.glyphs[t]=yield this._drawGlyph(i,e,t);return this._warnOnMissingGlyphRange(s,n,r,Ic(o)),{stack:e,id:t,glyph:s}}})}_loadGlyphRange(e,t){return Ki(this,null,function*(){let r=t*256,i=r+255,n=yield this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${r}-${i}`),"Glyphs"),a=yield Sie(n,new AbortController);if(!(a!=null&&a.data))throw Error(`Could not load glyph range. range: ${t}, ${r}-${i}`);let o={};for(let s of Git(a.data))o[s.id]=s;return o})}_warnOnMissingGlyphRange(e,t,r,i){let n=t*256,a=n+255,o=r.toString(16).padStart(4,"0").toUpperCase();Ma(`Unable to load glyph range ${t}, ${n}-${a}. Rendering codepoint U+${o} locally instead. ${i}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&Iit(e)}_drawGlyph(e,t,r,i){return Ki(this,null,function*(){let n=(yield this._getTinySDF(e,t,r,i)).draw(r),a=new RegExp("^\\p{gc=Cf}+$","u").test(r);return{id:r.codePointAt(0),bitmap:new UB({width:n.width||60,height:n.height||60},n.data),metrics:{width:a?0:n.glyphWidth/2||24,height:n.glyphHeight/2||24,left:n.glyphLeft/2+.5||0,top:n.glyphTop/2-27.5||-8,advance:a?0:n.glyphAdvance/2||24,isDoubleResolution:!0}}})}_getTinySDF(e,t,r,i){var l,u,c,f;let n=r8(r);if(i){let h=n?"clusterTinySDFs":"fontFaceTinySDFs";return(l=e[h])!=null||(e[h]={}),(u=e[h])[i]||(u[i]=this._createTinySDF(i,!1,n?3:1)),e[h][i]}let a=t===tbr&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(r.codePointAt(0)),o=a?this.localIdeographFontFamily:t;if(n)return(c=e.clusterTinySDFs)!=null||(e.clusterTinySDFs={}),(f=e.clusterTinySDFs)[o]||(f[o]=this._createTinySDF(o,!0,3)),e.clusterTinySDFs[o];let s=a?"ideographTinySDF":"tinySDF";return e[s]||(e[s]=this._createTinySDF(o)),e[s]}_createTinySDF(e,t=!0,r=1){return Ki(this,null,function*(){var s;let i=e?e.split(","):[];i.push("sans-serif");let n=i.map(l=>/[-\w]+/.test(l)?l:`'${CSS.escape(l)}'`).join(","),a=t?this._fontWeight(i[0]):void 0,o=t?this._fontStyle(i[0]):"normal";if(typeof document<"u"&&((s=document.fonts)!=null&&s.load))try{yield document.fonts.load(`${o} ${a||"normal"} 48px ${n}`)}catch(l){Ma(`Failed to load font "${n}": ${Ic(l).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(r-1)/4)),radius:16,cutoff:.25,fontFamily:n,fontWeight:a,fontStyle:o,lang:this.lang},6)})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t={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},r;for(let[i,n]of Object.entries(t))RegExp(`\\b${i}\\b`,"i").test(e)&&(r=`${n}`);return r}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.fontFaceTinySDFs={},t.glyphs={},t.requests={},t.ranges={}}this.entries={},this.fontFaceManager.destroy()}},abr=()=>nbr||(nbr=new uc({anchor:new Fi(_r.light.anchor,"anchor"),position:new Fi(_r.light.position,"position"),color:new Fi(_r.light.color,"color"),intensity:new Fi(_r.light.intensity,"intensity")})),obr=class extends mu{constructor(e,t){super(),this._transitionable=new Jk(abr(),"light",t),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return Zet(this.properties.get("position"))}setLight(e,t={}){if(!this._validate(ch.light,e,t))for(let r in e){let i=e[r];r.endsWith("-transition")?this._transitionable.setTransition(r.slice(0,-PB.length),i):this._transitionable.setValue(r,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r){return qT(this,e,{value:t},r)}},lbr=()=>sbr||(sbr=new uc({"sky-color":new Fi(_r.sky["sky-color"],"sky-color"),"horizon-color":new Fi(_r.sky["horizon-color"],"horizon-color"),"fog-color":new Fi(_r.sky["fog-color"],"fog-color"),"fog-ground-blend":new Fi(_r.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new Fi(_r.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new Fi(_r.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new Fi(_r.sky["atmosphere-blend"],"atmosphere-blend")})),ubr=class extends mu{constructor(e,t){super(),this._transitionable=new Jk(lbr(),"sky",t),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Co(0))}setSky(e,t={}){if(!this._validate(ch.sky,e,t)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let r in e){let i=e[r];r.endsWith("-transition")?this._transitionable.setTransition(r.slice(0,-PB.length),i):this._transitionable.setValue(r,i)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r={}){return qT(this,e,{value:t},r)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},cbr=class{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){var i;let r=e.join(",")+String(t);return(i=this.dashEntry)[r]||(i[r]=this.addDash(e,t)),this.dashEntry[r]}getDashRanges(e,t,r){let i=e.length%2==1,n=[],a=i?-e[e.length-1]*r:0,o=e[0]*r,s=!0;n.push({left:a,right:o,isDash:s,zeroLength:e[0]===0});let l=e[0];for(let u=1;u1&&(l=e[++s]);let c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),d,p=n/r*(i+1);if(l.isDash){let v=i-Math.abs(p);d=Math.sqrt(h*h+v*v)}else d=i-Math.sqrt(h*h+p*p);this.data[o+u]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let o=e.length-1;o>=0;--o){let s=e[o],l=e[o+1];s.zeroLength?e.splice(o,1):(l==null?void 0:l.isDash)===s.isDash&&(l.left=s.left,e.splice(o,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[n];for(let o=0;o1&&(a=e[++n]);let s=Math.abs(o-a.left),l=Math.abs(o-a.right),u=Math.min(s,l),c=a.isDash?u:-u;this.data[i+o]=Math.max(0,Math.min(255,c+128))}}addDash(e,t){let r=t?7:0,i=2*r+1;if(this.nextRow+i>this.height)return Ma("LineAtlas out of space"),null;let n=0;for(let o of e)n+=o;if(n!==0){let o=this.width/n,s=this.getDashRanges(e,this.width,o);t?this.addRoundDash(s,o,r):this.addRegularDash(s)}let a={y:this.nextRow+r,height:2*r,width:n};return this.nextRow+=i,this.dirty=!0,a}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))}};_ae="maplibre_preloaded_worker_pool",kq=class tot{constructor(){this.active={},this.workersPromise=null}acquire(t){return Ki(this,null,function*(){if(this.active[t]=!0,!this.workersPromise){let r=[];for(;r.length{for(let n of i)n.terminate()})}}isPreloaded(){return!!this.active[_ae]}numActive(){return Object.keys(this.active).length}},gbr=Math.floor(fh.hardwareConcurrency/2);kq.workerCount=Jet(globalThis)?Math.max(Math.min(gbr,3),1):1;rot=class{constructor(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t,this.removed=!1,this.actorsPromise=this.initActors(t)}initActors(e){return Ki(this,null,function*(){let t=yield this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=t.map((r,i)=>{let n=new unt(r,e);return n.name=`Worker ${i}`,n}),!this.actors.length)throw Error("No actors found");return this.actors})}broadcast(e,t){return Ki(this,null,function*(){let r=yield this.actorsPromise;return Promise.all(r.map(i=>i.sendAsync({type:e,data:t})))})}getActor(){return Ki(this,null,function*(){let e=yield this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]})}waitForInitComplete(){return Ki(this,null,function*(){this.actors.length===0&&(yield this.actorsPromise)})}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let t of this.actors)t.remove();this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){return Ki(this,null,function*(){let r=yield this.actorsPromise;for(let i of r)i.registerMessageHandler(e,t)})}unregisterMessageHandler(e){return Ki(this,null,function*(){let t=yield this.actorsPromise;for(let r of t)r.unregisterMessageHandler(e)})}};Ev=class zm{constructor(t,r){t&&(r?this.setSouthWest(t).setNorthEast(r):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof mn?new mn(t.lng,t.lat):mn.convert(t),this}setSouthWest(t){return this._sw=t instanceof mn?new mn(t.lng,t.lat):mn.convert(t),this}extend(t){let r=this._sw,i=this._ne,n,a;if(t instanceof mn)n=t,a=t;else if(t instanceof zm){if(n=t._sw,a=t._ne,!n||!a)return this}else{if(Array.isArray(t)){if(t.length===4||t.every(Array.isArray)){let o=t;return this.extend(zm.convert(o))}{let o=t;return this.extend(mn.convert(o))}}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(mn.convert(t)):this}return!r&&!i?(this._sw=new mn(n.lng,n.lat),this._ne=new mn(a.lng,a.lat)):(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}getCenter(){return new mn((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 mn(this.getWest(),this.getNorth())}getSouthEast(){return new mn(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(t){let{lng:r,lat:i}=mn.convert(t),n=this._sw.lat<=i&&i<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),n&&a}intersects(t){if(t=zm.convert(t),!(t.getNorth()>=this.getSouth()&&t.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(t.getEast()-t.getWest());if(r>=360||i>=360)return!0;let n=B0(this.getWest(),-180,180),a=B0(this.getEast(),-180,180),o=B0(t.getWest(),-180,180),s=B0(t.getEast(),-180,180),l=n>a,u=o>s;return l&&u?!0:l?s>=n||o<=a:u?a>=o||n<=s:o<=a&&s>=n}static convert(t){return t instanceof zm||!t?t:new zm(t)}static fromLngLat(t,r=0){let i=360*r/40075017,n=i/Math.cos(Math.PI/180*t.lat);return new zm(new mn(t.lng-n,t.lat-i),new mn(t.lng+n,t.lat+i))}adjustAntiMeridian(){let t=new mn(this._sw.lng,this._sw.lat),r=new mn(this._ne.lng,this._ne.lat);return t.lng>r.lng?new zm(t,new mn(r.lng+360,r.lat)):new zm(t,r)}},oot=class{constructor(e,t,r){this.bounds=Ev.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return!Array.isArray(e)||e.length!==4?[-180,-90,180,90]:[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}contains(e){let t=2**e.z,r={minX:Math.floor(e3(this.bounds.getWest())*t),minY:Math.floor(t3(this.bounds.getNorth())*t),maxX:Math.ceil(e3(this.bounds.getEast())*t),maxY:Math.ceil(t3(this.bounds.getSouth())*t)};return e.x>=r.minX&&e.x=r.minY&&e.y{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}serialize(){return ln({},this._options)}loadTile(e){return Ki(this,null,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,yield this.dispatcher.waitForInitComplete();let i="RT";if(!e.actor||e.state==="expired")e.actor=this.dispatcher.getReadyActor(),i="LT";else if(e.state==="loading")return new Promise((n,a)=>{e.reloadPromise={resolve:n,reject:a}});e.abortController=new AbortController;try{let n=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,n);let a={};return n!=null&&n.etagUnmodified&&(a.unmodified=!0),a}catch(n){if(delete e.abortController,e.aborted||Fm(n))return;if(n&&n.status!==404)throw n;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return Ki(this,null,function*(){if(e.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)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!=null&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t==null?void 0:t.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let r=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(r.resolve).catch(r.reject)}}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return Ki(this,null,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}},Tae=class extends mu{constructor(e,t,r,i){super(),this.id=e,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=ln({type:"raster"},t),ln(this,IT(t,["url","scheme","tileSize"]))}load(e=!1){return Ki(this,null,function*(){this._loaded=!1,this.fire(new Is("dataloading")),this._tileJSONRequest=new AbortController;try{let t=yield aot(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&(ln(this,t),t.bounds&&(this.tileBounds=new oot(t.bounds,this.minzoom,this.maxzoom)),this.fire(new Is("data",{sourceDataType:"metadata"})),this.fire(new Is("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(t){this._tileJSONRequest=null,this._loaded=!0,Fm(t)||this.fire(new An(Ic(t)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null)),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return ln({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return Ki(this,null,function*(){var n;let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r=this._premultiplyAlpha,i=r?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let a=yield rg.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,i);if(delete e.abortController,e.aborted){e.state="unloaded";return}if(a){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});let o=this.map.painter.context,s=o.gl,l=(n=a.data)!=null?n:new As({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(l.width),e.texture?e.texture.update(l,{useMipmap:!0,premultiply:r}):(e.texture=new vu(o,l,s.RGBA,{useMipmap:!0,premultiply:r}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return Ki(this,null,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}},lot=class extends Tae{constructor(e,t,r,i){super(e,t,r,i),this.type="raster-dem",this.maxzoom=22,this._options=ln({type:"raster-dem"},t),this.encoding=t.encoding||"mapbox",this.redFactor=t.redFactor,this.greenFactor=t.greenFactor,this.blueFactor=t.blueFactor,this.baseShift=t.baseShift}loadTile(e){return Ki(this,null,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield rg.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted){e.state="unloaded";return}if(r){if(this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires}),!r.data){e.state="loaded";return}let i=r.data,n=ex(i)&&nB()?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&&e.state!=="expired"&&e.state!=="reloading")return;yield this.dispatcher.waitForInitComplete(),(!e.actor||e.state==="expired")&&(e.actor=this.dispatcher.getReadyActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(r){if(delete e.abortController,e.aborted)e.state="unloaded";else if(r)throw e.state="errored",r}})}readImageNow(e){return Ki(this,null,function*(){if(typeof VideoFrame<"u"&&fie()){let t=e.width+4,r=e.height+4;try{return new As({width:t,height:r},yield ttt(e,-2,-2,t,r))}catch(i){}}return fh.getImageData(e,2)})}_getNeighboringTiles(e){let t=e.canonical,r=2**t.z,i=(t.x-1+r)%r,n=t.x===0?e.wrap-1:e.wrap,a=(t.x+1+r)%r,o=t.x+1===r?e.wrap+1:e.wrap,s={};return s[new Bc(e.overscaledZ,n,t.z,i,t.y).key]={backfilled:!1},s[new Bc(e.overscaledZ,o,t.z,a,t.y).key]={backfilled:!1},t.y>0&&(s[new Bc(e.overscaledZ,n,t.z,i,t.y-1).key]={backfilled:!1},s[new Bc(e.overscaledZ,e.wrap,t.z,t.x,t.y-1).key]={backfilled:!1},s[new Bc(e.overscaledZ,o,t.z,a,t.y-1).key]={backfilled:!1}),t.y+1Jnt(t))}}shouldReloadTile(e,{affectedBounds:t}){if(e.state==="loading")return!0;if(e.state==="unloaded")return!1;let{buffer:r,extent:i}=this.workerOptions.geojsonVtOptions,n=Ibr(e.tileID.canonical,r/i);for(let a of t)if(n.intersects(a))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return Ki(this,null,function*(){let t=e.actor?"RT":"LT";e.actor=yield this.actorPromise;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;try{let i=yield(yield this.actorPromise).sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,t==="RT")}catch(i){if(delete e.abortController,e.aborted||Fm(i))return;throw i}})}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return Ki(this,null,function*(){e.unloadVectorData(),yield(yield this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return ln({},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}},$T=[0,0,1],Rbr=(e,t)=>({u_tl_parent:new pa(e,t.u_tl_parent),u_scale_parent:new qi(e,t.u_scale_parent),u_buffer_scale:new qi(e,t.u_buffer_scale),u_image_warp:new Rf(e,t.u_image_warp),u_fade_t:new qi(e,t.u_fade_t),u_opacity:new qi(e,t.u_opacity),u_image0:new wn(e,t.u_image0),u_image1:new wn(e,t.u_image1),u_brightness_low:new qi(e,t.u_brightness_low),u_brightness_high:new qi(e,t.u_brightness_high),u_saturation_factor:new qi(e,t.u_saturation_factor),u_contrast_factor:new qi(e,t.u_contrast_factor),u_spin_weights:new Rf(e,t.u_spin_weights),u_coords_top:new OT(e,t.u_coords_top),u_coords_bottom:new OT(e,t.u_coords_bottom)}),zbr=(e,t,r,i,n,a)=>({u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_image_warp:a,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:Obr(i.paint.get("raster-saturation")),u_contrast_factor:qbr(i.paint.get("raster-contrast")),u_spin_weights:Bbr(i.paint.get("raster-hue-rotate")),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]});M8=class{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}},l3=ol([{name:"a_pos",type:"Int16",components:2}]),rq=zr/128;XT=class extends mu{constructor(e,t,r,i){super(),this.imageWarp=$T,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,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 Ki(this,null,function*(){if(this.options.url===void 0){this._loaded=!0,this._finishLoading();return}this._loaded=!1,this.fire(new Is("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let t=yield rg.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,t!=null&&t.data?(this._setImage(t.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new An(Error(`Could not load image ${this.url}: the response is empty`)))}catch(t){if(Fm(t))return;this._abortController=null,this._loaded=!0,this.fire(new An(Ic(t)))}})}loaded(){return this._loaded}updateImage(e){return this._abortController&&(this._abortController=(this._abortController.abort(),null)),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,t){var r;return!this._subdividedQuad||t?null:((r=this._subdividedMesh)!=null||(this._subdividedMesh=fot(e,{granularity:16})),this._subdividedMesh)}_disposeTexture(){var e;(e=this.texture)==null||e.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Is("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){var e;this._abortController&&(this._abortController=(this._abortController.abort(),null)),this._disposeTexture(),(e=this._subdividedMesh)==null||e.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e?this:(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates),this)}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let t=e.map(wo.fromLngLat);return this.tileID=Nbr(t),this.terrainTileRanges=this._getOverlappingTileRanges(t),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=t.map(r=>this.tileID.getTilePoint(r)._round()),this.imageWarp=Vbr(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!dot(this.tileCoords),this.flippedWindingOrder=Ubr(this.tileCoords),this.fire(new Is("data",{sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,t=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)):(this.texture=new vu(e,this.image,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)),this._imageDirty=!1;let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return Ki(this,null,function*(){var t;(t=this.tileID)!=null&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){let e={type:"image",coordinates:this.coordinates};return this.options.url!==void 0&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:t,minY:r,maxX:i,maxY:n}=Jd.fromPoints(e),a={};for(let o=0;o<=25;o++){let s=2**o,l=Math.floor(t*s),u=Math.floor(r*s),c=Math.floor(i*s),f=Math.floor(n*s),h=(l%s+s)%s,d=c%s,p=Math.floor(l/s),v=Math.floor(c/s);a[o]={minWrap:p,maxWrap:v,minTileXWrapped:h,maxTileXWrapped:d,minTileY:u,maxTileY:f}}return a}};pot=class extends XT{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var n;(n=this.map)==null||n.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return Ki(this,null,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let t=yield ctt(this.urls);if(this._loaded=!0,!t)return;this.video=t,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(t){this.fire(new An(Ic(t)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let t=this.video.seekable;et.end(0)?this.fire(new An(new Qr(`sources.${this.id}`,null,`Playback for this video can be set only between the ${t.start(0)} and ${t.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,t=e.gl;this.texture?this.video.paused||(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this.texture=new vu(e,this.video,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},vot=class extends XT{constructor(e,t,r,i){super(e,t,r,i),t.coordinates?(!Array.isArray(t.coordinates)||t.coordinates.length!==4||t.coordinates.some(n=>!Array.isArray(n)||n.length!==2||n.some(a=>typeof a!="number")))&&this.fire(new An(new Qr(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new An(new Qr(`sources.${e}`,null,'missing required property "coordinates"'))),t.animate&&typeof t.animate!="boolean"&&this.fire(new An(new Qr(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),t.canvas?typeof t.canvas!="string"&&!(t.canvas instanceof HTMLCanvasElement)&&this.fire(new An(new Qr(`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 An(new Qr(`sources.${e}`,null,'missing required property "canvas"'))),this.options=t,this.animate=t.animate===void 0||t.animate}load(){return Ki(this,null,function*(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new An(Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this._playing=(this.prepare(),!1))},this._finishLoading()})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let t=this.map.painter.context,r=t.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new vu(t,this.canvas,r.RGBA,{premultiply:!0}),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let n in this.tiles){let a=this.tiles[n];a.state!=="loaded"&&(a.state="loaded",a.texture=this.texture,i=!0)}i&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},got={},Hbr=(e,t,r,i)=>{let n=new(mot(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n},mot=e=>{switch(e){case"geojson":return cot;case"image":return XT;case"raster":return Tae;case"raster-dem":return lot;case"vector":return sot;case"video":return pot;case"canvas":return vot}return got[e]},jbr=(e,t)=>{got[e]=t},$br=(e,t)=>Ki(null,null,function*(){if(mot(e))throw Error(`A source type called "${e}" already exists.`);jbr(e,t)});iae="RTLPluginLoaded",Ybr=class extends mu{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=wae()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(t=>{throw this.status="error",t})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e,t=!1){return Ki(this,null,function*(){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=fh.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if(this.status==="unavailable")if(t)this.status="deferred",this._syncState(this.status);else return this._requestImport();else if(this.status==="requested")return this._requestImport()})}_requestImport(){return Ki(this,null,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e0(iae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}},Qnt=null;yot=class{constructor(e,t){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=_ie(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection: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=Oo(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,t,r){return this.rttObjects[t]=e.acquireRTT(r)}releaseRTT(e){if(this.rttObjects.length!==0){for(let t of this.rttObjects)t&&e.releaseRTT(t);this.rttObjects.length=0}}loadVectorData(e,t,r){if((e==null?void 0:e.etagUnmodified)===!0){this.state="loaded";return}if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!e){this.collisionBoxArray=new Xie;return}e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=Wbr(e.buckets,t==null?void 0:t.style),this.hasSymbolBuckets=!1;for(let i in this.buckets){let n=this.buckets[i];if(n instanceof s8)if(this.hasSymbolBuckets=!0,r)n.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let i in this.buckets){let n=this.buckets[i];if(n instanceof s8&&n.hasRTLText){this.hasRTLText=!0,A8().lazyLoad();break}}this.queryPadding=0;for(let i in this.buckets){let n=this.buckets[i];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(i).queryRadius(n))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let r in this.buckets){let i=this.buckets[r];i.uploadPending()&&i.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new vu(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasImage=(this.glyphAtlasTexture=new vu(e,this.glyphAtlasImage,t.ALPHA),null))}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,u,c){var f;return(f=this.latestFeatureIndex)!=null&&f.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:c},e,t,r):{}}querySourceFeatures(e,t){let r=this.latestFeatureIndex;if(!(r!=null&&r.rawTileData))return;let i=r.loadVTLayers(),n=t!=null&&t.sourceLayer?t.sourceLayer:"",a=i._geojsonTileLayer||i[n];if(!a)return;let o=CT(t==null?void 0:t.filter,`querySourceFeatures[${n}].filter`,t==null?void 0:t.globalState),{z:s,x:l,y:u}=this.tileID.canonical,c={z:s,x:l,y:u};for(let f=0;fr)i=!1;else if(!t)i=!0;else if(this.expirationTimethis.max[0]||t.aabb.min[1]>this.max[1]||t.aabb.min[2]>this.max[2]||t.aabb.max[0]0?(r+=t[n]*this.min[n],i+=t[n]*this.max[n]):(i+=t[n]*this.min[n],r+=t[n]*this.max[n]);return r>=0?2:i<0?0:1}},Mae=class _ot{constructor(t,r,i){this.points=t,this.planes=r,this.aabb=i}static fromInvProjectionMatrix(t,r=1,i=0,n,a){let o=[[-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]],s=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]],l=2**i,u=o.map(d=>Zbr(d,t,r,l));n&&Kbr(u,s[0],n,a);let c=s.map(d=>{let p=J1([],u[d[0]],u[d[1]]),v=J1([],u[d[2]],u[d[1]]),m=Pf([],uh([],p,v)),g=-gu(m,u[d[1]]);return m.concat(g)}),f=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let d of u)for(let p=0;p<3;p++)f[p]=Math.min(f[p],d[p]),h[p]=Math.max(h[p],d[p]);return new _ot(u,c,new Aae(f,h))}};t3r=nae(9.314,3);aat=class{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,r){for(let i in this._tiles)this._tiles[i].setFeatureState(e,t,r)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(t=>t.tileID).sort(mne).map(t=>t.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!=null&&t.hasData()?t:null}isIdRenderable(e,t=!1){var r;return(r=this.getTileById(e))==null?void 0:r.isRenderable(t)}getRenderableIds(e=0,t){let r=[];for(let i of this.getAllIds())this.isIdRenderable(i,t)&&r.push(this.getTileById(i));return t?r.sort((i,n)=>{let a=i.tileID,o=n.tileID,s=new tr(a.canonical.x,a.canonical.y)._rotate(-e),l=new tr(o.canonical.x,o.canonical.y)._rotate(-e);return a.overscaledZ-o.overscaledZ||l.y-s.y||l.x-s.x}).map(i=>i.tileID.key):r.map(i=>i.tileID).sort(mne).map(i=>i.key)}},aae=(qm=class extends mu{constructor(t,r,i){super(),this._maxContentElevationSeen=0,this.id=t,this.dispatcher=i,this.on("data",n=>{this._dataHandler(n)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=Hbr(t,r,i,this),this._inViewTiles=new aat,this._outOfViewCache=new Unt(0,n=>this._unloadTile(n)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Xbr,this._didEmitContent=!1,this._updated=!1}onAdd(t){var r;this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,(r=this._source)!=null&&r.onAdd&&this._source.onAdd(t)}onRemove(t){var r;for(let i of this._inViewTiles.getAllTiles())i.unloadVectorData();this.clearTiles(),(r=this._source)!=null&&r.onRemove&&this._source.onRemove(t),this._inViewTiles=new aat}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 t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,r,i,n){return Ki(this,null,function*(){try{let a=yield this._source.loadTile(t);this._tileLoaded(t,r,i,n,a)}catch(a){t.state="errored",a.status===404?this.update(this.transform,this.terrain):this._source.fire(new An(Ic(a),{tile:t}))}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new Is("dataabort",{tile:t,coord:t.tileID}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let r of this._inViewTiles.getAllTiles())r.upload(t),r.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(t){var r;return this._inViewTiles.getRenderableIds((r=this.transform)==null?void 0:r.bearingInRadians,t)}hasRenderableParent(t){let r=t.overscaledZ-1;if(r>=this._source.minzoom){let i=this.getLoadedTile(t.scaledTo(r));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return!1}reload(t,r=void 0){if(this._paused){this._shouldReloadOnResume=!0;return}this._outOfViewCache.reset();for(let i of this._inViewTiles.getAllIds()){let n=this._inViewTiles.getTileById(i);(!r||this._source.shouldReloadTile(n,r))&&(t?this._reloadTile(i,n.state==="errored"?"loading":"expired"):n.state!=="errored"&&this._reloadTile(i,"reloading"))}}_reloadTile(t,r){return Ki(this,null,function*(){let i=this._inViewTiles.getTileById(t);if(!i)return;let n=i.hasData();i.state!=="loading"&&(i.state=r),yield this._loadTile(i,t,r,n)})}_tileLoaded(t,r,i,n,a){n||(t.timeAdded=Oo(),t.selfFading&&(t.fadeEndTime=t.timeAdded+this._rasterFadeDuration)),i==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(r,t),!(a!=null&&a.unmodified)&&(this.getSource().type==="raster-dem"&&t.dem&&u3r(t,this._inViewTiles),t.featureStateRevision=-1,this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new Is("data",{tile:t,coord:t.tileID})))}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._inViewTiles.getTileById(t)}_retainLoadedChildren(t,r){let i=this._getLoadedDescendents(r),n=new Set;for(let a of r){let o=i[a.key];if(!(o!=null&&o.length)){n.add(a);continue}let s=a.overscaledZ+qm.maxOverzooming,l=o.filter(f=>f.tileID.overscaledZ<=s);if(!l.length){n.add(a);continue}let u=Math.min(...l.map(f=>f.tileID.overscaledZ)),c=l.filter(f=>f.tileID.overscaledZ===u).map(f=>f.tileID);for(let f of c)t[f.key]=f;this._areDescendentsComplete(c,u,a.overscaledZ)||n.add(a)}return n}_getLoadedDescendents(t){var i;let r={};for(let n of this._inViewTiles.getAllTiles().filter(a=>a.hasData()))for(let a of t)n.tileID.isChildOf(a)&&(r[i=a.key]||(r[i]=[]),r[a.key].push(n));return r}_areDescendentsComplete(t,r,i){return t.length===1&&t[0].isOverscaled()?t[0].overscaledZ===r:4**(r-i)===t.length}getLoadedTile(t){return this._inViewTiles.getLoadedTile(t)}updateCacheSize(t){let r=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=this._maxTileCacheZoomLevels===null?Qh.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,n=Math.floor(r*i),a=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,n):n;this._outOfViewCache.setMaxSize(a)}handleWrapJump(t){let r=(t-(this._prevLng===void 0?t:this._prevLng))/360,i=Math.round(r);this._prevLng=t,i&&(this._inViewTiles.handleWrapJump(i),this._resetTileReloadTimers())}_updateMaxContentElevation(){var n,a;let t=this._maxContentElevationSeen,r=(a=(n=this.map)==null?void 0:n.style)==null?void 0:a._layers;if(!r)return t;let i=this._inViewTiles.getAllTiles();for(let o in r){let s=r[o];if(s.type!=="symbol"||s.source!==this.id||s.isHidden(this.transform.zoom))continue;let l=s;if(l.layout){t=Math.max(t,l.layout.get("symbol-height-offset").constantOr(0));for(let u of i){let c=u.getBucket(s);c&&c.maxHeightOffset>t&&(t=c.maxHeightOffset)}}}return this._maxContentElevationSeen=t,t}update(t,r){if(!this._sourceLoaded||this._paused)return;this.transform=t,this.terrain=r,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng);let i;!this.used&&!this.usedForTerrain?i=[]:this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(l=>new Bc(l.canonical.z,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y)):(i=ZT(t,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?Math.max(this._source.maxzoom,t.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(i=i.filter(l=>this._source.hasTile(l)))),this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=i.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}));let a=Sae(t,this._source),o=this._updateRetainedTiles(i,a),s=rat(this._source.type);s&&this._rasterFadeDuration>0&&!r&&n3r(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(t){for(let r of this._inViewTiles.getAllIds())t[r]||this._removeTile(r)}_cleanUpVectorTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);if(t[r]){i.clearSymbolFadeHold();continue}if(!i.hasSymbolBuckets){this._removeTile(r);continue}i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(r):i.setSymbolHoldDuration(this.map._fadeDuration)}}_addTerrainIdealTiles(t){let r=[];for(let i of t)if(i.canonical.z>this._source.minzoom){let n=i.scaledTo(i.canonical.z-1);r.push(n);let a=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));r.push(a)}return t.concat(r)}releaseSymbolFadeTiles(){for(let t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).holdingForSymbolFade()&&this._removeTile(t)}_updateRetainedTiles(t,r){var l;let i=new Set;for(let u of t)this._addTile(u).hasData()||i.add(u);let n=t.reduce((u,c)=>(u[c.key]=c,u),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(r-qm.maxUnderzooming,this._source.minzoom);for(let u of a){let c=this._inViewTiles.getTileById(u.key),f=c==null?void 0:c.wasRequested();for(let h=u.overscaledZ-1;h>=s;--h){let d=u.scaledTo(h);if(o[d.key])break;if(o[d.key]=!0,c=this.getTile(d),!c&&f&&(c=this._addTile(d)),c){let p=c.hasData();if((p||!((l=this.map)!=null&&l.cancelPendingTileRequestsWhileZooming)||f)&&(n[d.key]=d),f=c.wasRequested(),p)break}}}return n}_addTile(t){let r=this._inViewTiles.getTileById(t.key);if(r)return r;r=this._outOfViewCache.getAndRemove(t),r&&(r.resetFadeLogic(),this._setTileReloadTimer(t.key,r),r.tileID=t,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new yot(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(r,t.key,r.state,!1)),r.uses++,this._inViewTiles.setTile(t.key,r),i||this._source.fire(new Is("dataloading",{tile:r,coord:r.tileID})),r}_setTileReloadTimer(t,r){this._clearTileReloadTimer(t);let i=r.getExpiryTimeout();if(i){let n=()=>{this._reloadTile(t,"expired"),delete this._timers[t]};this._timers[t]=setTimeout(n,i)}}_clearTileReloadTimer(t){let r=this._timers[t];r&&(clearTimeout(r),delete this._timers[t])}_resetTileReloadTimers(){for(let t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);this._setTileReloadTimer(t,r)}}refreshTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);(this._inViewTiles.isIdRenderable(r)||i.state=="errored")&&t.some(n=>n.equals(i.tileID.canonical))&&this._reloadTile(r,"expired")}}_removeTile(t){let r=this._inViewTiles.getTileById(t);r&&(r.uses--,this._inViewTiles.deleteTileById(t),this._clearTileReloadTimer(t),!(r.uses>0)&&(r.hasData()&&r.state!=="reloading"?this._outOfViewCache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(t){if(t.dataType==="source"){if(t.sourceDataType==="metadata"){this._sourceLoaded=!0;return}t.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(t.sourceDataChanged,t.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let t of this._inViewTiles.getAllIds())this._removeTile(t);this._outOfViewCache.reset()}tilesIn(t,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(t):t,l=d=>a.screenPointToMercatorCoordinate(d,this.terrain),u=this.transformBbox(t,l,!o),c=this.transformBbox(s,l,!o),f=this.getIds(),h=Jd.fromPoints(c);for(let d of f){let p=this._inViewTiles.getTileById(d);if(p.holdingForSymbolFade())continue;let v=o?[p.tileID]:[p.tileID.unwrapTo(-1),p.tileID.unwrapTo(0)],m=2**(a.zoom-p.tileID.overscaledZ),g=r*p.queryPadding*zr/p.tileSize/m;for(let w of v){let b=h.map(_=>w.getTilePoint(new wo(_.x,_.y)));if(b.expandBy(g),b.intersects(wit)){let _=u.map(x=>w.getTilePoint(x)),M=c.map(x=>w.getTilePoint(x));n.push({tile:p,tileID:o?w:w.unwrapTo(0),queryGeometry:_,cameraQueryGeometry:M,scale:m})}}}return n}transformBbox(t,r,i){let n=t.map(r);if(i){let a=Jd.fromPoints(t);a.shrinkBy(Math.min(a.width(),a.height())*.001);let o=a.map(r);Jd.fromPoints(n).covers(o)||(n=n.map(s=>s.x>.5?new wo(s.x-1,s.y,s.z):s))}return n}getVisibleCoordinates(t){let r=this.getRenderableIds(t).map(i=>this._inViewTiles.getTileById(i).tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){return this._source.hasTransition()?!0:rat(this._source.type)&&l3r(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(t){this._rasterFadeDuration=t}setFeatureState(t,r,i){t||(t=c8),this._state.updateState(t,r,i)}removeFeatureState(t,r,i){t||(t=c8),this._state.removeFeatureState(t,r,i)}getFeatureState(t,r){return t||(t=c8),this._state.getState(t,r)}setDependencies(t,r,i){let n=this._inViewTiles.getTileById(t);n&&n.setDependencies(r,i)}reloadTilesForDependencies(t,r){for(let i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(t,r)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter(i=>!i.hasDependency(t,r))}areTilesLoaded(){for(let t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}},qm.maxUnderzooming=10,qm.maxOverzooming=3,qm),c3r=class{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let r=1;r0?(i-a)/o:0;return this.points[n].mult(1-s).add(this.points[t].mult(s))}};oat=class{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 a=0;athis.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 l=0;l0}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 u=[],c={hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,n),u.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:u,overlapMode:c}=o,f=this.boxCells[n],h=1e-6;if(f!==null){let p=this.bboxes;for(let v of f)if(!l.box[v]){l.box[v]=!0;let m=v*4,g=this.boxKeys[v];if(e<=p[m+2]+h&&t<=p[m+3]+h&&r>=p[m+0]-h&&i>=p[m+1]-h&&(!s||s(g))&&(!u||!iq(c,g.overlapMode))&&(a.push({key:g,x1:p[m],y1:p[m+1],x2:p[m+2],y2:p[m+3]}),u))return!0}}let d=this.circleCells[n];if(d!==null){let p=this.circles;for(let v of d)if(!l.circle[v]){l.circle[v]=!0;let m=v*3,g=this.circleKeys[v];if(this._circleAndRectCollide(p[m],p[m+1],p[m+2],e,t,r,i)&&(!s||s(g))&&(!u||!iq(c,g.overlapMode))){let w=p[m],b=p[m+1],_=p[m+2];if(a.push({key:g,x1:w-_,y1:b-_,x2:w+_,y2:b+_}),u)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:u,overlapMode:c}=o,f=this.boxCells[n];if(f!==null){let d=this.bboxes;for(let p of f)if(!u.box[p]){u.box[p]=!0;let v=p*4,m=this.boxKeys[p];if(this._circleAndRectCollide(l.x,l.y,l.radius,d[v+0],d[v+1],d[v+2],d[v+3])&&(!s||s(m))&&!iq(c,m.overlapMode))return a.push(!0),!0}}let h=this.circleCells[n];if(h!==null){let d=this.circles;for(let p of h)if(!u.circle[p]){u.circle[p]=!0;let v=p*3,m=this.circleKeys[p];if(this._circlesCollide(d[v],d[v+1],d[v+2],l.x,l.y,l.radius)&&(!s||s(m))&&!iq(c,m.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(r),f=this._convertToYCellCoord(i);for(let h=l;h<=c;h++)for(let d=u;d<=f;d++){let p=this.xCellCount*d+h;if(n.call(this,e,t,r,i,p,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 u=(o-n)/2,c=Math.abs(t-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;let f=l-s,h=c-u;return f*f+h*h<=r*r}};p3r=Em();x3r=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);w3r=class{constructor(e,t=new oat(e.width+200,e.height+200,25),r=new oat(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=r,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,r,i,n,a,o,s,l,u,c,f,h=0,d=!0){let p=e.anchorPointX+s[0],v=e.anchorPointY+s[1],m=this.projectAndGetPerspectiveRatio(p,v,n,mq(u,p,v,h,d),f),g=r*m.perspectiveRatio,w;if(!a&&!o){let y=m.x+(c?c.x*g:0),E=m.y+(c?c.y*g:0);w={allPointsOccluded:!1,box:[y+e.x1*g,E+e.y1*g,y+e.x2*g,E+e.y2*g]}}else w=this._projectCollisionBox(e,g,i,n,a,o,s,m,u,c,f,h,d);let[b,_,M,x]=w.box,T=a?w.allPointsOccluded:m.isOccluded,A=T;return A||(A=m.perspectiveRatio=1;I--)P.push(D.path[I]);for(let I=1;IB.signedDistanceFromCamera<=0)?[]:I.map(B=>B.point)}let L=[];if(P.length>0){let I=P[0].clone(),B=P[0].clone();for(let O=1;O=S.x&&B.x<=C.x&&I.y>=S.y&&B.y<=C.y?[P]:B.xC.x||B.yC.y?[]:dne([P],S.x,S.y,C.x,C.y)}for(let I of L){k.reset(I,E*.25);let B=0;B=k.length<=.5*E?1:Math.ceil(k.paddedLength/R)+1;for(let O=0;O=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(P.x,P.y,i,mq(l,P.x,P.y,f,h),c));D=F.some(P=>!P.isOccluded),k=F.map(P=>new tr(P.x,P.y))}else D=!0;return{box:$et(k),allPointsOccluded:!D}}},uat=class{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 this.opacity===0&&!this.placed}},d8=class{constructor(e,t,r,i,n){this.text=new uat(e?e.text:null,t,r,n),this.icon=new uat(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},cat=class{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}},T3r=class{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}},A3r=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:r=>r.collisionGroupID===t}}return this.collisionGroups[e]}};M3r=class{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new w3r(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new A3r(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;if(t)return(r,i)=>t.getElevation(e,r,i)}getBucketParts(e,t,r,i){let n=r.getBucket(t),a=r.latestFeatureIndex;if(!n||!a||t.id!==n.layerIds[0])return;let o=r.collisionBoxArray,s=n.layers[0].layout,l=n.layers[0].paint,u=2**(this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/zr,f=r.tileID.toUnwrapped(),h=s.get("text-rotation-alignment")==="map",d=Zh(r,1,this.transform.zoom),p=Dm(this.collisionIndex.transform,r,l.get("text-translate"),l.get("text-translate-anchor")),v=Dm(this.collisionIndex.transform,r,l.get("icon-translate"),l.get("icon-translate-anchor")),m=Eae(h,this.transform,d);this.retainedQueryData[n.bucketInstanceId]=new T3r(n.bucketInstanceId,a,n.sourceLayerIndex,n.index,r.tileID);let g={bucket:n,layout:s,translationText:p,translationIcon:v,unwrappedTileID:f,pitchedLabelPlaneMatrix:m,scale:u,textPixelRatio:c,holdingForFade:r.holdingForSymbolFade(),collisionBoxArray:o,partiallyEvaluatedTextSize:a8(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(i)for(let w of n.sortKeyRanges){let{sortKey:b,symbolInstanceStart:_,symbolInstanceEnd:M}=w;e.push({sortKey:b,symbolInstanceStart:_,symbolInstanceEnd:M,parameters:g})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:g})}attemptAnchorPlacement(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M){var E,S,C;let x=XB[e.textAnchor],T=[e.textOffset0,e.textOffset1],A=fat(x,r,i,T,n),y=this.collisionIndex.placeCollisionBox(t,f,s,l,u,o,a,v,c.predicate,w,A,b,_,M);if((!g||this.collisionIndex.placeCollisionBox(g,f,s,l,u,o,a,m,c.predicate,w,A,b,_,M).placeable)&&y.placeable){let k;if((E=this.prevPlacement)!=null&&E.variableOffsets[h.crossTileID]&&((C=(S=this.prevPlacement)==null?void 0:S.placements[h.crossTileID])!=null&&C.text)&&(k=this.prevPlacement.variableOffsets[h.crossTileID].anchor),h.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[h.crossTileID]={textOffset:T,width:r,height:i,anchor:x,textBoxScale:n,prevAnchor:k},this.markUsedJustification(d,x,h,p),d.allowVerticalPlacement&&(this.markUsedOrientation(d,p,h),this.placedOrientations[h.crossTileID]=p),{shift:A,placedGlyphBoxes:y}}}placeLayerBucketPart(e,t,r){let{bucket:i,layout:n,translationText:a,translationIcon:o,unwrappedTileID:s,pitchedLabelPlaneMatrix:l,textPixelRatio:u,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:d}=e.parameters,p=n.get("text-optional"),v=n.get("icon-optional"),m=zk(n,"text-overlap","text-allow-overlap"),g=m==="always",w=zk(n,"icon-overlap","icon-allow-overlap"),b=w==="always",_=n.get("text-rotation-alignment")==="map",M=n.get("text-pitch-alignment")==="map",x=n.get("icon-text-fit")!=="none",T=n.get("symbol-z-order")==="viewport-y",A=n.get("symbol-height-anchor")==="ground",y=g&&(b||!i.hasIconData()||v),E=b&&(g||!i.hasTextData()||p);!i.collisionArrays&&f&&i.deserializeCollisionBoxes(f);let S=this.retainedQueryData[i.bucketInstanceId].tileID,C=this._getTerrainElevationFunc(S),k=this.transform.getFastPathSimpleProjectionMatrix(S),D=(F,P,R)=>{var be,he;if(t[F.crossTileID])return;if(c){this.placements[F.crossTileID]=new cat(!1,!1,!1);return}let L=F.heightOffset,I=!1,B=!1,O=!0,$=null,Y={box:null,placeable:!1,offscreen:null,occluded:!1},K={box:null,placeable:!1,offscreen:null},j=null,q=null,J=null,U=0,V=0,X=0;P.textFeatureIndex?U=P.textFeatureIndex:F.useRuntimeCollisionCircles&&(U=F.featureIndex),P.verticalTextFeatureIndex&&(V=P.verticalTextFeatureIndex);let H=P.textBox;if(H){let oe=ee=>{let ae=1;if(i.allowVerticalPlacement&&!ee&&this.prevPlacement){let xe=this.prevPlacement.placedOrientations[F.crossTileID];xe&&(this.placedOrientations[F.crossTileID]=xe,ae=xe,this.markUsedOrientation(i,ae,F))}return ae},Ee=(ee,ae)=>{if(i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&P.verticalTextBox){for(let xe of i.writingModes)if(xe===2?(Y=ae(),K=Y):Y=ee(),Y==null?void 0:Y.placeable)break}else Y=ee()},ye=F.textAnchorOffsetStartIndex,ue=F.textAnchorOffsetEndIndex;if(ue===ye){let ee=(ae,xe)=>{let re=this.collisionIndex.placeCollisionBox(ae,m,u,S,s,M,_,a,d.predicate,C,void 0,k,L,A);return re!=null&&re.placeable&&(this.markUsedOrientation(i,xe,F),this.placedOrientations[F.crossTileID]=xe),re};Ee(()=>ee(H,1),()=>{let ae=P.verticalTextBox;return i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&ae?ee(ae,2):{box:null,offscreen:null}}),oe(Y==null?void 0:Y.placeable)}else{let ee=XB[(he=(be=this.prevPlacement)==null?void 0:be.variableOffsets[F.crossTileID])==null?void 0:he.anchor],ae=(re,pe,we)=>{let Fe=re.x2-re.x1,Se=re.y2-re.y1,ke=F.textBoxScale,_e=x&&w==="never"?pe:null,Ie=null,Oe=m==="never"?1:2,Qe="never";ee&&Oe++;for(let et=0;etae(H,P.iconBox,1),()=>{let re=P.verticalTextBox,pe=Y==null?void 0:Y.placeable;return i.allowVerticalPlacement&&!pe&&F.numVerticalGlyphVertices>0&&re?ae(re,P.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),Y&&(I=Y.placeable,O=Y.offscreen);let xe=oe(Y==null?void 0:Y.placeable);if(!I&&this.prevPlacement){let re=this.prevPlacement.variableOffsets[F.crossTileID];re&&(this.variableOffsets[F.crossTileID]=re,this.markUsedJustification(i,re.anchor,F,xe))}}}if(j=Y,I=j==null?void 0:j.placeable,O=j==null?void 0:j.offscreen,F.useRuntimeCollisionCircles&&F.centerJustifiedTextSymbolIndex>=0){let oe=i.text.placedSymbolArray.get(F.centerJustifiedTextSymbolIndex),Ee=YB(i.textSizeData,h,oe),ye=n.get("text-padding"),ue=F.collisionCircleDiameter;q=this.collisionIndex.placeCollisionCircles(m,oe,i.lineVertexArray,i.glyphOffsetArray,Ee,s,l,r,M,d.predicate,ue,ye,a,C),q.circles.length&&q.collisionDetected&&!r&&Ma("Collisions detected, but collision boxes are not shown"),I=g||q.circles.length>0&&!q.collisionDetected,O&&(O=q.offscreen)}if(P.iconFeatureIndex&&(X=P.iconFeatureIndex),P.iconBox){let oe=Ee=>this.collisionIndex.placeCollisionBox(Ee,w,u,S,s,M,_,o,d.predicate,C,x&&$?$:void 0,k,L,A);K&&K.placeable&&P.verticalIconBox?(J=oe(P.verticalIconBox),B=J.placeable):(J=oe(P.iconBox),B=J.placeable),O&&(O=J.offscreen)}let G=p||F.numHorizontalGlyphVertices===0&&F.numVerticalGlyphVertices===0,Q=v||F.numIconVertices===0;!G&&!Q?B=I=B&&I:Q?G||B&&(B=I):I=B&&I;let te=I&&j.placeable,ce=B&&J.placeable;if(te&&(K&&K.placeable&&V?this.collisionIndex.insertCollisionBox(j.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,V,d.ID):this.collisionIndex.insertCollisionBox(j.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,U,d.ID)),ce&&this.collisionIndex.insertCollisionBox(J.box,w,n.get("icon-ignore-placement"),i.bucketInstanceId,X,d.ID),q&&I&&this.collisionIndex.insertCollisionCircles(q.circles,m,n.get("text-ignore-placement"),i.bucketInstanceId,U,d.ID),r&&this.storeCollisionData(i.bucketInstanceId,R,P,j,J,q),F.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");if(i.bucketInstanceId===0)throw Error("bucket.bucketInstanceId can't be 0");let ge=(I||y)&&!(j!=null&&j.occluded),Ce=(B||E)&&!(J!=null&&J.occluded);this.placements[F.crossTileID]=new cat(ge,Ce,O||i.justReloaded),t[F.crossTileID]=!0};if(T){if(e.symbolInstanceStart!==0)throw Error("bucket.bucketInstanceId should be 0");let F=i.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let P=F.length-1;P>=0;--P){let R=F[P];D(i.symbolInstances.get(R),i.collisionArrays[R],R)}}else for(let F=e.symbolInstanceStart;F=0&&(a>=0&&s!==a?e.text.placedSymbolArray.get(s).crossTileID=0:e.text.placedSymbolArray.get(s).crossTileID=r.crossTileID)}markUsedOrientation(e,t,r){let i=t===1||t===3?t:0,n=t===2?t:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(let o of a)e.text.placedSymbolArray.get(o).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=n)}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 s in this.placements){let l=this.placements[s],u=n[s];u?(this.opacities[s]=new d8(u,i,l.text,l.icon),r||(r=l.text!==u.text.placed),r||(r=l.icon!==u.icon.placed)):(this.opacities[s]=new d8(null,i,l.text,l.icon,l.skipFade),r||(r=l.text||l.icon))}for(let s in n){let l=n[s];if(!this.opacities[s]){let u=new d8(l,i,!1,!1);u.isHidden()||(this.opacities[s]=u,r||(r=l.text.placed),r||(r=l.icon.placed))}}for(let s in a)!this.variableOffsets[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.variableOffsets[s]=a[s]);for(let s in o)!this.placedOrientations[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.placedOrientations[s]=o[s]);if(t&&t.lastPlacementChangeTime===void 0)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let n=i.getBucket(e);n&&i.latestFeatureIndex&&e.id===n.layerIds[0]&&this.updateBucketOpacities(n,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,t,r,i){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 n=e.layers[0],a=n.layout,o=new d8(null,0,!1,!1,!0),s=a.get("text-allow-overlap"),l=a.get("icon-allow-overlap"),u=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c=a.get("text-rotation-alignment")==="map",f=a.get("text-pitch-alignment")==="map",h=a.get("icon-text-fit")!=="none",d=new d8(null,0,s&&(l||!e.hasIconData()||a.get("icon-optional")),l&&(s||!e.hasTextData()||a.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let p=(m,g,w)=>{for(let b=0;b0||b>0,A=g.numIconVertices>0,y=this.placedOrientations[g.crossTileID],E=y===2,S=y===1||y===3;if(T){let k=dat(x.text),D=E?p8:k;p(e.text,w,D);let F=S?p8:k;p(e.text,b,F);let P=x.text.isHidden(),R=[g.rightJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.leftJustifiedTextSymbolIndex];for(let B of R)B>=0&&(e.text.placedSymbolArray.get(B).hidden=P||E?1:0);g.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(g.verticalPlacedTextSymbolIndex).hidden=P||S?1:0);let L=this.variableOffsets[g.crossTileID];L&&this.markUsedJustification(e,L.anchor,g,y);let I=this.placedOrientations[g.crossTileID];I&&(this.markUsedJustification(e,"left",g,I),this.markUsedOrientation(e,I,g))}if(A){let k=dat(x.icon),D=!(h&&g.verticalPlacedIconSymbolIndex&&E);if(g.placedIconSymbolIndex>=0){let F=D?k:p8;p(e.icon,g.numIconVertices,F),e.icon.placedSymbolArray.get(g.placedIconSymbolIndex).hidden=x.icon.isHidden()}if(g.verticalPlacedIconSymbolIndex>=0){let F=D?p8:k;p(e.icon,g.numVerticalIconVertices,F),e.icon.placedSymbolArray.get(g.verticalPlacedIconSymbolIndex).hidden=x.icon.isHidden()}}let C=v!=null&&v.has(m)?v.get(m):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let k=e.collisionArrays[m];if(k){let D=new tr(0,0);if(k.textBox||k.verticalTextBox){let F=!0;if(u){let P=this.variableOffsets[_];P?(D=fat(P.anchor,P.width,P.height,P.textOffset,P.textBoxScale),c&&D._rotate(f?-this.transform.bearingInRadians:this.transform.bearingInRadians)):F=!1}if(k.textBox||k.verticalTextBox){let P;k.textBox&&(P=E),k.verticalTextBox&&(P=S),hat(e.textCollisionBox.collisionVertexArray,x.text.placed,!F||P,C.text,D.x,D.y)}}if(k.iconBox||k.verticalIconBox){let F=!(S||!k.verticalIconBox),P;k.iconBox&&(P=F),k.verticalIconBox&&(P=!F),hat(e.iconCollisionBox.collisionVertexArray,x.icon.placed,P,C.icon,h?D.x:0,h?D.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}};S3r=2**25,E3r=2**24,k3r=2**17,C3r=2**16;p8=0,D3r=class{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndexo.sortKey-s.sortKey));this._currentPartIndex!this._forceFullPlacement&&Oo()-i>2;for(;this._currentPlacementIndex>=0;){let a=t[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(vne(a)&&a.layout&&(!a.minzoom||a.minzoom<=o)&&(!a.maxzoom||a.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new D3r(a)),this._inProgressLayer.continuePlacement(r[a.source],this.placement,this._showCollisionBoxes,a,n))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}},pat=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],xl=new Uint32Array(96),L3r=class Mot{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(t,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=pat[i&15];if(!a)throw Error("Unrecognized array type.");let[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Mot(s,o,a,void 0,t)}constructor(t,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(t)||t<0)throw Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let o=pat.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(o<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,t),this.coords=new i(a,8+l+u,t*2),this._pos=t*2,this._finished=!0;else{let c=this.data=new n(8+s+l+u);this.ids=new this.IndexArrayType(c,8,t),this.coords=new i(c,8+l+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(c,0,2).set([219,16+o]),new Uint16Array(c,2,1)[0]=r,new Uint32Array(c,4,1)[0]=t}}add(t,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=r,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw Error(`Added ${t} items when expected ${this.numItems}.`);return lae(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;xl[0]=0,xl[1]=a.length-1,xl[2]=0;let l=3,u=[];for(;l>0;){let c=xl[--l],f=xl[--l],h=xl[--l];if(f-h<=s){for(let m=h;m<=f;m++){let g=o[2*m],w=o[2*m+1];g>=t&&g<=i&&w>=r&&w<=n&&u.push(a[m])}continue}let d=h+f>>1,p=o[2*d],v=o[2*d+1];p>=t&&p<=i&&v>=r&&v<=n&&u.push(a[d]),(c===0?t<=p:r<=v)&&(xl[l++]=h,xl[l++]=d-1,xl[l++]=1-c),(c===0?i>=p:n>=v)&&(xl[l++]=d+1,xl[l++]=f,xl[l++]=1-c)}return u}within(t,r,i){let n=[];return this.withinInto(t,r,i,n),n}withinInto(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;xl[0]=0,xl[1]=a.length-1,xl[2]=0;let l=3,u=0,c=i*i;for(;l>0;){let f=xl[--l],h=xl[--l],d=xl[--l];if(h-d<=s){for(let g=d;g<=h;g++)vat(o[2*g],o[2*g+1],t,r)<=c&&(n[u++]=a[g]);continue}let p=d+h>>1,v=o[2*p],m=o[2*p+1];vat(v,m,t,r)<=c&&(n[u++]=a[p]),(f===0?t-i<=v:r-i<=m)&&(xl[l++]=d,xl[l++]=p-1,xl[l++]=1-f),(f===0?t+i>=v:r+i>=m)&&(xl[l++]=p+1,xl[l++]=h,xl[l++]=1-f)}return u}};g8=512/zr/2,P3r=class{constructor(e,t,r){this.tileID=e,this.bucketInstanceId=r,this._symbolsByKey={};let i=new Map;for(let n=0;n({x:Math.floor(s.anchorX*g8),y:Math.floor(s.anchorY*g8)})),crossTileIDs:a.map(s=>s.crossTileID)};if(o.positions.length>128){let s=new L3r(o.positions.length,16,Uint16Array);for(let{x:l,y:u}of o.positions)s.add(l,u);s.finish(),delete o.positions,o.index=s}this._symbolsByKey[n]=o}}getScaledCoordinates(e,t){let{x:r,y:i,z:n}=this.tileID.canonical,{x:a,y:o,z:s}=t.canonical,l=s-n,u=g8/2**l,c=(a*zr+e.anchorX)*u,f=(o*zr+e.anchorY)*u,h=r*zr*g8,d=i*zr*g8;return{x:Math.floor(c-h),y:Math.floor(f-d)}}findMatches(e,t,r){let i=this.tileID.canonical.ze)}},I3r=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},R3r=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(t!==0)for(let r in this.indexes){let i=this.indexes[r],n={};for(let a in i){let o=i[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+t),n[o.tileID.key]=o}this.indexes[r]=n}this.lng=e}addBucket(e,t,r){var n,a,o;if((n=this.indexes[e.overscaledZ])!=null&&n[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 s=0;se.overscaledZ)for(let u in l){let c=l[u];c.tileID.isChildOf(e)&&c.findMatches(t.symbolInstances,e,i)}else{let u=l[e.scaledTo(Number(s)).key];u&&u.findMatches(t.symbolInstances,e,i)}}for(let s=0;s> 1u)/127.0,float(packedOpacity & 1u));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c );} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;}; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(ivec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+2.0;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }const float PI=3.141592653589793; #define PROJECTION_UBO layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,q3r=`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,O3r="layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}",N3r=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,U3r="uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",V3r=`in vec3 v_data;flat in float v_visibility; #pragma maplibre: define highp vec4 color #pragma maplibre: define mediump float radius #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 stroke_color #pragma maplibre: define mediump float stroke_width #pragma maplibre: define lowp float stroke_opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump float radius #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 stroke_color #pragma maplibre: initialize mediump float stroke_width #pragma maplibre: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,G3r=`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility; #pragma maplibre: define highp vec4 color #pragma maplibre: define mediump float radius #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 stroke_color #pragma maplibre: define mediump float stroke_width #pragma maplibre: define lowp float stroke_opacity void main(void) { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump float radius #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 stroke_color #pragma maplibre: initialize mediump float stroke_width #pragma maplibre: initialize lowp float stroke_opacity ivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { #ifdef GLOBE vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); #else vec4 projected_center=projectTileWithElevation(circle_center,ele); #endif corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} #ifdef GLOBE vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); #else gl_Position=projectTileWithElevation(corner_position,ele); #endif } else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,gat="void main() {fragColor=vec4(1.0);}",tg={prelude:fo(z3r,B3r),projectionMercator:fo(` void clipAntimeridian() {}`,"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:fo("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}",`#define GLOBE_RADIUS 6371008.8 #ifndef PROJECTION_UBO uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix; #endif out highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos );}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy );if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:fo(q3r,O3r),backgroundPattern:fo(N3r,U3r),circle:fo(V3r,G3r),clippingMask:fo(gat,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:fo(`uniform highp float u_intensity;in vec2 v_extrude; #pragma maplibre: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma maplibre: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude; #pragma maplibre: define highp float weight #pragma maplibre: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma maplibre: initialize highp float weight #pragma maplibre: initialize mediump float radius ivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=vec2(pos_raw >> 3); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif }`),heatmapTexture:fo(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:fo("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:fo("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:fo(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:fo("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:fo(gat,`layout(location=0) in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif }`),fill:fo(`#pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos; #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float opacity if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:fo(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 outline_color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 outline_color #pragma maplibre: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 outline_color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 outline_color #pragma maplibre: initialize lowp float opacity if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillOutlinePattern:fo(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;} #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillPattern:fo(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:fo(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D layout(location=2) in vec2 a_centroid; #endif out vec4 v_color; #pragma maplibre: define highp float base #pragma maplibre: define highp float height #pragma maplibre: define highp vec4 color void main() { #pragma maplibre: initialize highp float base #pragma maplibre: initialize highp float height #pragma maplibre: initialize highp vec4 color vec3 normal=vec3(a_normal_ed.xyz); #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:fo(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma maplibre: define lowp float base #pragma maplibre: define lowp float height #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float base #pragma maplibre: initialize lowp float height #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D layout(location=2) in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma maplibre: define lowp float base #pragma maplibre: define lowp float height #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float base #pragma maplibre: initialize lowp float height #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=vec3(a_normal_ed.xyz);float edgedistance=float(a_normal_ed.w);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif vec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384 ? a_pos : vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:fo(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:fo(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 #define IGOR 2 #define MULTIDIRECTIONAL 3 #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else {fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec2 size=vec2(textureSize(u_image,0));vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:fo(`flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:fo(`uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:fo(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float gapwidth #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:fo(`uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:fo(`uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),layerOpacity:fo(`uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:fo(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE if (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;} #endif float perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}`),symbolIcon:fo(`uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform bool u_rotate_symbol;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity; #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:fo(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:fo(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur float total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}`),terrain:fo("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:fo("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:fo(`#ifdef GL_ES precision highp float; #endif in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 );color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:fo("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;in vec3 v_view_direction;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,(angle_to_globe_center-horizon_angle)*u_camera_to_center_distance*u_device_pixel_ratio,u_sky_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")};kot="#define PROJECTION_MERCATOR",Cot="mercator",uae=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Cot}get shaderDefine(){return kot}get shaderPreludeCode(){return tg.projectionMercator}get vertexShaderPreludeCode(){return tg.projectionMercator.vertexSource}get subdivisionGranularity(){return VB.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,t,r,i,n){if(this._cachedMesh)return this._cachedMesh;let a=new Pm;a.emplaceBack(0,0),a.emplaceBack(zr,0),a.emplaceBack(0,zr),a.emplaceBack(zr,zr);let o=e.createVertexBuffer(a,l3.members),s=Ws.simpleSegment(0,0,4,2),l=new Mv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3);let u=e.createIndexBuffer(l);return this._cachedMesh=new M8(o,u,s),this._cachedMesh}recalculate(){}hasTransition(){return!1}},cae=class Dot{constructor(t=0,r=0,i=0,n=0){if(isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0||isNaN(n)||n<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=r,this.left=i,this.right=n}interpolate(t,r,i){return r.top!=null&&t.top!=null&&(this.top=$s.number(t.top,r.top,i)),r.bottom!=null&&t.bottom!=null&&(this.bottom=$s.number(t.bottom,r.bottom,i)),r.left!=null&&t.left!=null&&(this.left=$s.number(t.left,r.left,i)),r.right!=null&&t.right!=null&&(this.right=$s.number(t.right,r.right,i)),this}getCenter(t,r){let i=Jn((this.left+t-this.right)/2,0,t),n=Jn((this.top+r-this.bottom)/2,0,r);return new tr(i,n)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new Dot(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}};Fae=class{constructor(e,t){var r;this.applyConstrain=(i,n)=>this._constrainOverride===null?this._callbacks.defaultConstrain(i,n):this._constrainOverride(i,n),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=(t==null?void 0:t.renderWorldCopies)===void 0||!!(t!=null&&t.renderWorldCopies),this._minZoom=(t==null?void 0:t.minZoom)||0,this._maxZoom=(t==null?void 0:t.maxZoom)||22,this._minPitch=(t==null?void 0:t.minPitch)===void 0||(t==null?void 0:t.minPitch)===null?0:t==null?void 0:t.minPitch,this._maxPitch=(t==null?void 0:t.maxPitch)===void 0||(t==null?void 0:t.maxPitch)===null?60:t==null?void 0:t.maxPitch,this._constrainOverride=(r=t==null?void 0:t.constrainOverride)!=null?r:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new mn(0,0),this._elevation=0,this._zoom=0,this._tileZoom=mat(this._zoom),this._scale=If(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new cae,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,t,r){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=mat(this._zoom),this._scale=If(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 cae(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=!r&&e.autoCalculateNearFarZ,t&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){if(this._minZoom===e)return;this._minZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let t=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=t}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let t=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=t}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){e===void 0&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new tr(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let t=B0(e,-180,180)*Math.PI/180;this._bearingInRadians!==t&&(this._unmodified=!1,this._bearingInRadians=t,this._calcMatrices(),this._rotationMatrix=Yat(),P_r(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let t=Jn(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==t&&(this._unmodified=!1,this._pitchInRadians=t,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 yv(this._fovInRadians)}setFov(e){e=Jn(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=js(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let t=this.applyConstrain(this._center,e).zoom;this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this._tileZoom=Math.max(0,Math.floor(t)),this._scale=If(t),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((e=this._latRange)==null?void 0:e.length)!==2||((t=this._lngRange)==null?void 0:t.length)!==2?null:new Ev([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=[-Tv,Tv])}getCameraQueryGeometry(e,t){if(t.length===1)return[t[0],e];{let{minX:r,minY:i,maxX:n,maxY:a}=Jd.fromPoints(t).extend(e);return[new tr(r,i),new tr(n,i),new tr(n,a),new tr(r,a),new tr(r,i)]}}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._pixelPerMeter=rx(1,this.center.lat)*this.worldSize,!this._width||!this._height)return;this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=Qd(new Float64Array(16));Rc(e,e,[this._width/2,-this._height/2,1]),eu(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=Qd(new Float64Array(16)),Rc(e,e,[1,-1,1]),eu(e,e,[-1,-1,0]),Rc(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let t=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(t)*this._height,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,t,r,i){let n=r===void 0?this.bearing:r,a=i=i===void 0?this.pitch:i,{distanceToCenter:o,clampedElevation:s}=this._distanceToCenterFromAltElevationPitch(t,this.elevation,a),{x:l,y:u}=jB(a,n),c=wo.fromLngLat(e,t),f=one(1,c.y),h,d,p=0;do{if(p+=1,p>10)break;d=o/f;let v=l*d,m=u*d;h=new wo(c.x+v,c.y+m),f=1/h.meterInMercatorCoordinateUnits()}while(Math.abs(o-d*f)>1e-12);return{center:h.toLngLat(),elevation:s,zoom:zc(this.height/2/Math.tan(this.fovInRadians/2)/d/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let t=1/this.worldSize,r=rx(1,this.center.lat)*this.worldSize,i=wo.fromLngLat(this.center,this.elevation),n=i.x/t,a=i.y/t,o=i.z/t,s=this.pitch,l=this.bearing,{x:u,y:c,z:f}=jB(s,l),h=this.cameraToCenterDistance,d=n+h*-u,p=a+h*-c,v=o+h*f,{distanceToCenter:m,clampedElevation:g}=this._distanceToCenterFromAltElevationPitch(v/r,e,s),w=m*r,b=d+u*w,_=p+c*w,M=new wo(b*t,_*t,0).toLngLat(),x=rx(1,M.lat),T=zc(this.height/2/Math.tan(this.fovInRadians/2)/m/x/this.tileSize);this._elevation=g,this._center=M,this.setZoom(T)}_distanceToCenterFromAltElevationPitch(e,t,r){let i=-Math.cos(js(r)),n=e-t,a,o=t;return i*n>=0||Math.abs(i)<.1?(a=1e4,o=e+a*i):a=-n/i,{distanceToCenter:a,clampedElevation:o}}getCameraPoint(){let e=this.pitchInRadians,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new tr(t*Math.sin(this.rollInRadians),t*Math.cos(this.rollInRadians)))}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let t=e.canonical.z>=0?1<i}allowWorldCopies(){return!0}prepareNextFrame(){}},j3r=ol([{name:"a_pos3d",type:"Int16",components:3}]),$3r=class extends mu{constructor(e){super(),this._lastTilesetChange=Oo(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,t){this.tileManager.update(e,t),this._renderableTilesKeys=[];let r={},i=!1;for(let n of ZT(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:t,calculateTileZoom:this.tileManager._source.calculateTileZoom}))r[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float32Array(16),wv(n.terrainRttPosMatrix32f,0,zr,zr,0,0,1),this._tiles[n.key]=new yot(n,this.tileSize),this._lastTilesetChange=Oo(),i=!0);for(let n in this._tiles)r[n]||(this._tiles[n].releaseRTT(this.tileManager.map.painter),delete this._tiles[n],i=!0);return i}releaseRTT(e){for(let t in this._tiles){let r=this._tiles[t];(r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&r.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let t={};for(let r of this._renderableTilesKeys){let i=this._tiles[r].tileID,n=e.clone(),a=Q2();if(i.canonical.equals(e.canonical))wv(a,0,zr,zr,0,0,1);else if(i.canonical.isChildOf(e.canonical)){let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<>o<>o;wv(a,0,u,u,0,0,1),eu(a,a,[-s*u,-l*u,0])}else if(e.canonical.isChildOf(i.canonical)){let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<>o<>o;wv(a,0,zr,zr,0,0,1),eu(a,a,[s*u,l*u,0]),Rc(a,a,[1/2**o,1/2**o,0])}else continue;n.terrainRttPosMatrix32f=new Float32Array(a),t[r]=n}return t}_getTerrainCoordsForTileRanges(e,t){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID;if(!this._isWithinTileRanges(n,t))continue;let a=e.clone(),o=Q2();if(n.canonical.z===e.canonical.z){let s=e.canonical.x-n.canonical.x+e.wrap*(1<e.canonical.z){let s=n.canonical.z-e.canonical.z,l=n.canonical.x-(n.canonical.x>>s<>s<>s),f=e.canonical.y-(n.canonical.y>>s),h=zr>>s;wv(o,0,h,h,0,0,1),eu(o,o,[-l*h+c*zr,-u*h+f*zr,0])}else{let s=e.canonical.z-n.canonical.z,l=e.canonical.x-(e.canonical.x>>s<>s<>s)-n.canonical.x,f=(e.canonical.y>>s)-n.canonical.y,h=zr<r.maxzoom&&(i=r.maxzoom),i=r.minzoom&&!(n!=null&&n.dem);)n=this.findTileInCaches(e.scaledTo(i--).key);return n}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e),t)}anyTilesAfterTime(e=Oo()){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)}},yat=zr*(1-1e-12),W3r=class{constructor(e,t,r,i="auto"){this._meshCache={},this.painter=e,this.tileManager=new $3r(t),this.options=r,this.exaggeration=typeof r.exaggeration=="number"?r.exaggeration:1,this._terrainSkirtLength=i,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&(this._fbo=(this._fbo.destroy(),null)),this._fboDepthTexture&&(this._fboDepthTexture=(this._fboDepthTexture.destroy(),null)),this._emptyDemTexture&&(this._emptyDemTexture=(this._emptyDemTexture.destroy(),null)),this._emptyDepthTexture&&(this._emptyDepthTexture=(this._emptyDepthTexture.destroy(),null));for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,t,r,i=zr){let n=e.normalizeCoordinates(t,r,i);if(!n)return 0;let a=this.getElevationSampler(n.tileID);return a?a(n.x,n.y,i):0}getElevationForLngLatZoom(e,t){if(!gne(t,e.wrap()))return 0;let{tileID:r,mercatorX:i,mercatorY:n}=this._getOverscaledTileIDFromLngLatZoom(e,t);return this.getElevation(r,i%zr,n%zr,zr)}getElevationForLngLat(e,t){let r=this.getCoverageIndex();if(r){let a=wo.fromLngLat(e),o=Lae(r,this.exaggeration,a.x,a.y);if(o.demLoaded)return o.elevation}let i=ZT(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),n=0;for(let a of i)a.canonical.z>n&&(n=Math.min(a.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,n)}getElevation(e,t,r,i=zr){return this.getDEMElevation(e,t,r,i)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return this._coverageIndex===void 0&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],t=new Map,r=0,i=0;for(let n of this.tileManager.getRenderableTiles()){if(!n)continue;let{canonical:a,wrap:o}=n.tileID;e.includes(a.z)||e.push(a.z);let s=this.getElevationSampler(n.tileID);t.set(`${o}/${a.z}/${a.x}/${a.y}`,s);let{minElevation:l,maxElevation:u}=this.getMinMaxElevation(n.tileID);r=Math.min(r,l!=null?l:0),i=Math.max(i,u!=null?u:0)}return t.size===0?null:(e.sort((n,a)=>a-n),{zooms:e,samplerPerTile:t,minElevation:r-10,maxElevation:i+10})}getElevationSampler(e){let t=e.key,r=this._elevationSamplerCache.get(t);if(r)return r;let i=this.tileManager.getSourceTile(e,!0),n=i==null?void 0:i.dem;if(!i||!n)return null;let a=this._getDEMTileMatrix(e,i),o=a[0]*n.dim,s=a[5]*n.dim,l=a[12]*n.dim,u=a[13]*n.dim,c=(f,h,d)=>{let p=d===8192?1:zr/d;return n.sampleBilinear(f*p*o+l,h*p*s+u)};return this._elevationSamplerCache.set(t,c),c}_getDEMTileMatrix(e,t){let r=`${t.tileID.key}/${e.key}`,i=this._demMatrixCache.get(r);if(i)return i;let n=this.tileManager.getSource().maxzoom,a=e.canonical.z-t.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=n?a=e.canonical.z-n:Ma("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let o=e.canonical.x-(e.canonical.x>>a<>a<0,r=t&&e.canonical.y===0,i=t&&e.canonical.y===(1<{i=Jn(+i,this.minZoom,this.maxZoom);let n={center:new mn(r.lng,r.lat),zoom:i},a=this._helper._lngRange;!this._helper._renderWorldCopies&&a===null&&(a=[-179.9999999999,180-1e-10]);let o=this.tileSize*If(n.zoom),s=0,l=o,u=0,c=o,f=0,h=0,{x:d,y:p}=this.size;if(this._helper._latRange){let _=this._helper._latRange;s=t3(_[1])*o,l=t3(_[0])*o,l-sl&&(w=l-_)}if(a){let _=(u+c)/2,M=v;this._helper._renderWorldCopies&&(M=B0(v,_-o/2,_+o/2));let x=d/2;M-xc&&(g=c-x)}if(g!==void 0||w!==void 0){let _=new tr(g!=null?g:v,w!=null?w:m);n.center=NT(o,_).wrap()}return n},this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._coveringTilesDetailsProvider=new H3r}clone(){let t=new Pot;return t.apply(this,!1),t}apply(t,r,i){this._helper.apply(t,r,i)}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(t){let r=[new u8(0,t)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new tr(0,0)),n=this.screenPointToMercatorCoordinate(new tr(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new tr(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new tr(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 u=s-1;u<=l+1;u++)u!==0&&r.push(new u8(u,t))}return r}getCameraFrustum(){return Mae.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){let r=this.screenPointToLocation(this.centerPoint,t),i=t?t.getElevationForLngLat(r,this):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(t,r,i=this.elevation){let n=i-this.elevation,a=this.screenPointToMercatorCoordinateAtZ(r,n),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),s=wo.fromLngLat(t),l=new wo(s.x-(a.x-o.x),s.y-(a.y-o.y));this.setCenter(l==null?void 0:l.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(t,r){return r?this.coordinatePoint(wo.fromLngLat(t),r.getElevationForLngLat(t,this),this._pixelMatrix3D):this.coordinatePoint(wo.fromLngLat(t))}screenPointToLocation(t,r){var i;return(i=this.screenPointToMercatorCoordinate(t,r))==null?void 0:i.toLngLat()}screenPointToLocationAtElevation(t,r){var i;return(i=this.screenPointToMercatorCoordinateAtZ(t,r-this.elevation))==null?void 0:i.toLngLat()}screenPointToMercatorCoordinate(t,r){if(r){let i=this.screenTerrainPointToMercatorCoordinate(t,r);if(i!=null)return i}return this.screenPointToMercatorCoordinateAtZ(t)}screenTerrainPointToMercatorCoordinate(t,r){let i=r.getCoverageIndex();if(!i)return null;let{near:n,far:a}=this.getRaySegmentFromPixel(t),o=this.worldSize,s=a[0]-n[0],l=a[1]-n[1],u=a[2]-n[2],c={index:i,exaggeration:r.exaggeration,near:n,dx:s,dy:l,dz:u,worldSize:o},f=0,h=1;if(u===0){if(n[2]>i.maxElevation||n[2]h)return null}let d=Math.hypot(s,l),p=Jn(Math.ceil(d*(h-f)/4),1,512),v=0,m=!aq(c,0);for(let g=0;g<=p;g++){let w=f+(h-f)*g/p;if(!m)m=!aq(c,w);else if(aq(c,w)){let{lo:b,hi:_}=Lot(c,aq,v,w,.001/d),M=yq(c,b),x=yq(c,_),T=n[2]+b*u-M.elevation,A=n[2]+_*u-x.elevation,y=M.covered&&T>A?Jn(b+T*(_-b)/(T-A),b,_):_;return new wo((n[0]+y*s)/o,(n[1]+y*l)/o,yq(c,y).elevation)}v=w}return null}getRaySegmentFromPixel(t){let r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];Uu(r,r,this._pixelMatrixInverse),Uu(i,i,this._pixelMatrixInverse);let n=r[3],a=i[3],o=this.elevation;return{near:[r[0]/n,r[1]/n,r[2]/n+o],far:[i[0]/a,i[1]/a,i[2]/a+o]}}screenPointToMercatorCoordinateAtZ(t,r){let i=r||0,{near:n,far:a}=this.getRaySegmentFromPixel(t),o=n[2]===a[2]?0:(i+this.elevation-n[2])/(a[2]-n[2]);return new wo($s.number(n[0],a[0],o)/this.worldSize,$s.number(n[1],a[1],o)/this.worldSize,i)}coordinatePoint(t,r=0,i=this._pixelMatrix){let n=[t.x*this.worldSize,t.y*this.worldSize,r,1];return Uu(n,n,i),new tr(n[0]/n[3],n[1]/n[3])}getBounds(){let t=Math.max(0,this._helper._height/2-UT(this));return new Ev().extend(this.screenPointToLocation(new tr(0,t))).extend(this.screenPointToLocation(new tr(this._helper._width,t))).extend(this.screenPointToLocation(new tr(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new tr(0,this._helper._height)))}isPointOnMapSurface(t,r){return r?this.screenTerrainPointToMercatorCoordinate(t,r)!=null:t.y>this.height/2-UT(this)}calculatePosMatrix(t,r=!1,i=!1){var l;let n=(l=t.key)!=null?l:Vb(t.wrap,t.canonical.z,t.canonical.z,t.canonical.x,t.canonical.y),a=r?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(n)){let u=a.get(n);return i?u.f32:u.f64}let o=HB(t,this.worldSize);Yb(o,r?this._alignedProjMatrix:this._viewProjMatrix,o);let s={f64:o,f32:new Float32Array(o)};return a.set(n,s),i?s.f32:s.f64}calculateFogMatrix(t){let r=t.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=HB(t,this.worldSize);return Yb(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=wo.fromLngLat(t,r),o=wo.fromLngLat(i,n),s=o.x-a.x,l=o.y-a.y,u=o.z-a.z,c=Math.hypot(s,l,u);if(c===0)throw Error("Can't calculate camera options with same From and To");let f=Math.hypot(s,l),h=zc(this.cameraToCenterDistance/c/this.tileSize),d=yv(Math.atan2(s,-l)),p=yv(Math.acos(f/c));return p=u<0?90-p:90+p,{center:o.toLngLat(),elevation:n,zoom:h,pitch:p,bearing:d}}_calculateNearFarZIfNeeded(t,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=t-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:t,s=Math.PI/2+this.pitchInRadians,l=js(this.fov)*(Math.abs(Math.cos(js(this.roll)))*this.height+Math.abs(Math.sin(js(this.roll)))*this.width)/this.height*(.5+i.y/this.height),u=Math.sin(l)*o/Math.sin(Jn(Math.PI-s-l,.01,Math.PI-.01)),c=UT(this),f=Math.atan(c/this._helper.cameraToCenterDistance),h=js(90-ix),d=f>h?2*f*(.5+i.y/(c*2)):h,p=Math.sin(d)*o/Math.sin(Jn(Math.PI-s-d,.01,Math.PI-.01)),v=Math.min(u,p);this._helper._farZ=(Math.cos(Math.PI/2-r)*v+o)*1.01,this._helper._nearZ=this._helper._height/50}_calcMatrices(){let t=this.centerOffset,r=Sv(this.worldSize,this.center),i=r.x,n=r.y,a=js(Math.min(this.pitch,ix)),o=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(a));this._calculateNearFarZIfNeeded(o,a,t);let s;s=new Float64Array(16),oB(s,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),h3r(this._invProjMatrix,s),s[8]=-t.x*2/this._helper._width,s[9]=t.y*2/this._helper._height,this._projectionMatrix=aB(s),Rc(s,s,[1,-1,1]),eu(s,s,[0,0,-this._helper.cameraToCenterDistance]),km(s,s,-this.rollInRadians),Xb(s,s,this.pitchInRadians),km(s,s,-this.bearingInRadians),eu(s,s,[-i,-n,0]),this._mercatorMatrix=Rc([],s,[this.worldSize,this.worldSize,this.worldSize]),Rc(s,s,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=Yb(new Float64Array(16),this.clipSpaceToPixelsMatrix,s),eu(s,s,[0,0,-this.elevation]),this._viewProjMatrix=s,this._invViewProjMatrix=Bk([],s);let l=[0,0,-1,1];Uu(l,l,this._invViewProjMatrix),this._cameraPosition=[l[0]/l[3],l[1]/l[3],l[2]/l[3]],this._fogMatrix=new Float64Array(16),oB(this._fogMatrix,this.fovInRadians,this.width/this.height,o,this._helper._farZ),this._fogMatrix[8]=-t.x*2/this.width,this._fogMatrix[9]=t.y*2/this.height,Rc(this._fogMatrix,this._fogMatrix,[1,-1,1]),eu(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),km(this._fogMatrix,this._fogMatrix,-this.rollInRadians),Xb(this._fogMatrix,this._fogMatrix,this.pitchInRadians),km(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),eu(this._fogMatrix,this._fogMatrix,[-i,-n,0]),Rc(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),eu(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=Yb(new Float64Array(16),this.clipSpaceToPixelsMatrix,s);let u=this._helper._width%2/2,c=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),h=Math.sin(-this.bearingInRadians),d=i-Math.round(i)+f*u+h*c,p=n-Math.round(n)+f*c+h*u,v=new Float64Array(s);if(eu(v,v,[d>.5?d-1:d,p>.5?p-1:p,0]),this._alignedProjMatrix=v,s=Bk(new Float64Array(16),this._pixelMatrix),!s)throw Error("failed to invert matrix");this._pixelMatrixInverse=s,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let t=this.screenPointToMercatorCoordinate(new tr(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return Uu(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let t=rx(1,this.center.lat)*this.worldSize,r=this._helper.cameraToCenterDistance/t;return lne(this.center,this.elevation,this.pitch,this.bearing,r).toLngLat()}lngLatToCameraDepth(t,r){let i=wo.fromLngLat(t),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return Uu(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(t){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=t,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return s=r!=null&&r.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||xie(),{mainMatrix:s,tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s,clipAntimeridian:!1}}isLocationOccluded(t){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(t,r,i){return 1}transformLightDirection(t){return sB(t)}getRayDirectionFromPixel(t){throw Error("Not implemented.")}projectTileCoordinates(t,r,i,n){let a=this.calculatePosMatrix(i),o;n==null?(o=[t,r,0,1],Dae(o,o,a)):(o=[t,r,n,1],Uu(o,o,a));let s=o[3];return{point:new tr(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(t){for(let r of t)this.calculatePosMatrix(r)}getProjectionDataForCustomLayer(t=!0){let r=new Bc(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:t}),n=HB(r,this.worldSize);Yb(n,this._viewProjMatrix,n);let a=[zr,zr,this.worldSize/this._helper.pixelsPerMeter],o=Q2();return Rc(o,n,a),ma(fn({},i),{tileMercatorCoords:[0,0,1,1],fallbackMatrix:o,mainMatrix:o})}getFastPathSimpleProjectionMatrix(t){return this.calculatePosMatrix(t)}};Aq=class{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(UT(t));return{easingOffset:e.mult(Math.min(i*.75/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){e.around.distSqr(t.centerPoint)<.01||t.setLocationAtPoint(r,e.around,e.aroundElevation)}cameraForBoxAndBearing(e,t,r,i,n){return zot(e,t,r,i,n)}handleJumpToCenterZoom(e,t){let r=t.zoom===void 0?e.zoom:+t.zoom;e.zoom!==r&&e.setZoom(+t.zoom),t.center!==void 0&&e.setCenter(mn.convert(t.center))}handleEaseTo(e,t){let r=e.zoom,i=e.padding,n={roll:e.roll,pitch:e.pitch,bearing:e.bearing},a={roll:t.roll===void 0?e.roll:t.roll,pitch:t.pitch===void 0?e.pitch:t.pitch,bearing:t.bearing===void 0?e.bearing:t.bearing},o=t.zoom!==void 0,s=!e.isPaddingEqual(t.padding),l=!1,u=o?+t.zoom:e.zoom,c=e.centerPoint.add(t.offsetAsPoint),f=e.screenPointToLocation(c),{center:h,zoom:d}=e.applyConstrain(mn.convert(t.center||f),u!=null?u:r);wq(e,h);let p=Sv(e.worldSize,f),v=Sv(e.worldSize,h).sub(p),m=If(d-r);return l=d!==r,{easeFunc:g=>{if(l&&e.setZoom($s.number(r,d,g)),wie(n,a)||Rot({startEulerAngles:n,endEulerAngles:a,tr:e,k:g,useSlerp:n.roll!=a.roll}),s&&(e.interpolatePadding(i,t.padding,g),c=e.centerPoint.add(t.offsetAsPoint)),t.around)e.setLocationAtPoint(t.around,t.aroundPoint);else{let w=If(e.zoom-r),b=(d>r?Math.min(2,m):Math.max(.5,m))**(1-g),_=NT(e.worldSize,p.add(v.mult(g*b)).mult(w));e.setLocationAtPoint(e.renderWorldCopies?_.wrap():_,c)}},isZooming:l,elevationCenter:h}}handleFlyTo(e,t){let r=t.zoom!==void 0,i=e.zoom,n=e.applyConstrain(mn.convert(t.center||t.locationAtOffset),r?+t.zoom:i),a=n.center,o=n.zoom;wq(e,a);let s=e.worldSize,l=Sv(s,t.locationAtOffset),u=Sv(s,a).sub(l),c=u.mag(),f=If(o-i),h=t.minZoom===void 0?e.minZoom:+t.minZoom,d=Math.max(h,e.minZoom),p=Math.min(d,i,o),v=e.applyConstrain(a,p).zoom;return{easeFunc:(m,g,w,b)=>{e.setZoom(m===1?o:i+zc(g));let _=m===1?a:NT(s,l.add(u.mult(w)));e.setLocationAtPoint(e.renderWorldCopies?_.wrap():_,b)},scaleOfZoom:f,targetCenter:a,scaleOfMinZoom:If(v-i),pixelPathLength:c}}},X3r=()=>Y3r||(Y3r=new uc({type:new Fi(_r.projection.type,"type")})),qne=new VB({fill:new W1(128,2),line:new W1(512,0),tile:new W1(128,32),stencil:new W1(128,1),circle:3}),Bot=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return tg.projectionGlobe}get vertexShaderPreludeCode(){return tg.projectionMercator.vertexSource}get subdivisionGranularity(){return qne}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,r,i,n){let a=(n==="stencil"?qne.stencil:qne.tile).getGranularityForZoomLevel(t.z),o=t.y===0&&i,s=t.y===(1<0}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0: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)}};One=Math.PI*.98;swr=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i!=null&&i.terrain?"t":""}_${Math.round(r)}`,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}},Une=class fae{constructor(t,r,i,n){this.min=i,this.max=n,this.points=t,this.planes=r}static fromAabb(t,r){let i=[];for(let n=0;n<8;n++)i.push([(n>>0&1)==1?r[0]:t[0],(n>>1&1)==1?r[1]:t[1],(n>>2&1)==1?r[2]:t[2]]);return new fae(i,[[-1,0,0,r[0]],[1,0,0,-t[0]],[0,-1,0,r[1]],[0,1,0,-t[1]],[0,0,-1,r[2]],[0,0,1,-t[2]]],t,r)}static fromCenterSizeAngles(t,r,i){let n=cB([],i[0],i[1],i[2]),a=lB([],[r[0],0,0],n),o=lB([],[0,r[1],0],n),s=lB([],[0,0,r[2]],n),l=[...t],u=[...t];for(let f=0;f<8;f++)for(let h=0;h<3;h++){let d=t[h]+a[h]*((f>>0&1)==1?1:-1)+o[h]*((f>>1&1)==1?1:-1)+s[h]*((f>>2&1)==1?1:-1);l[h]=Math.min(l[h],d),u[h]=Math.max(u[h],d)}let c=[];for(let f=0;f<8;f++){let h=[...t];R0(h,h,Ps([],a,(f>>0&1)==1?1:-1)),R0(h,h,Ps([],o,(f>>1&1)==1?1:-1)),R0(h,h,Ps([],s,(f>>2&1)==1?1:-1)),c.push(h)}return new fae(c,[[...a,-gu(a,c[0])],[...o,-gu(o,c[0])],[...s,-gu(s,c[0])],[-a[0],-a[1],-a[2],-gu(a,c[7])],[-o[0],-o[1],-o[2],-gu(o,c[7])],[-s[0],-s[1],-s[2],-gu(s,c[7])]],l,u)}intersectsFrustum(t){let r=!0,i=this.points.length,n=this.planes.length,a=t.planes.length,o=t.points.length;for(let s=0;s=0&&u++}if(u===0)return 0;u=0&&u++}if(u===0)return 0}return 1}intersectsPlane(t){let r=this.points.length,i=0;for(let n=0;n=0&&i++}return i===r?2:i===0?0:1}};lwr=class{constructor(){this._boundingVolumeCache=new swr(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,t,r,i){var o,s;let n=Math.min(0,r),a=Math.max(0,r);if(i!=null&&i.terrain){let l=new Bc(e.z,t,e.z,e.x,e.y),u=i.terrain.getMinMaxElevation(l);n=(o=u.minElevation)!=null?o:n,a=Math.max((s=u.maxElevation)!=null?s:a,a)}if(n/=zf,a/=zf,n+=1,a+=1,e.z<=0)return Une.fromAabb([-a,-a,-a],[a,a,a]);if(e.z===1)return Une.fromAabb([e.x===0?-a:0,e.y===0?0:-a,-a],[e.x===0?0:a,e.y===0?a:0,a]);{let l=[nx(0,0,e.x,e.y,e.z),nx(zr,0,e.x,e.y,e.z),nx(zr,zr,e.x,e.y,e.z),nx(0,zr,e.x,e.y,e.z)],u=[];for(let E of l)u.push(Ps([],E,a));if(a!==n)for(let E of l)u.push(Ps([],E,n));e.y===0&&u.push([0,1,0]),e.y===(1<=(1<{let n=Jn(r.lat,-Tv,Tv),a=Jn(+i,this.minZoom+qc(0,n),this.maxZoom);return{center:new mn(r.lng,n),zoom:a}},this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._coveringTilesDetailsProvider=new lwr}clone(){let t=new Uot;return t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let t=Do();return t[0]=this._cameraPosition[0],t[1]=this._cameraPosition[1],t[2]=this._cameraPosition[2],t}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(t){let{overscaledTileID:r,applyGlobeMatrix:i}=t,n=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:n,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!i,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:(r==null?void 0:r.canonical.z)===0}}_computeClippingPlane(t){let r=this.pitchInRadians,i=this.cameraToCenterDistance/t,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,u=Math.sqrt(s*s+l*l);s/=u,l/=u;let c=[0,s,l];uB(c,c,[0,0,0],-this.bearingInRadians),PT(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),Zb(c,c,[0,0,0],this.center.lng*Math.PI/180);let f=1/K1(c);return Ps(c,c,f),[...c,-o*f]}isLocationOccluded(t){return!this.isSurfacePointVisible(Vu(t))}transformLightDirection(t){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];uh(s,o,a),Pf(o,o),Pf(s,s);let l=[o[0]*t[0]+s[0]*t[1]+a[0]*t[2],o[1]*t[0]+s[1]*t[1]+a[1]*t[2],o[2]*t[0]+s[2]*t[1]+a[2]*t[2]],u=[0,0,0];return Pf(u,l),u}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(t,r,i){let n=sne(t,r,i.canonical),a=K3r(n.x,n.y);return this.getCircleRadiusCorrection()/Math.cos(a[1])}projectTileCoordinates(t,r,i,n){let a=i.canonical,o=nx(t,r,a.x,a.y,a.z),s=1+(n!=null?n:0)/zf,l=o[0]*s,u=o[1]*s,c=o[2]*s,f=[l,u,c,1];Uu(f,f,this._globeViewProjMatrixF64);let h;if(s<=1){let d=this._cachedClippingPlane;h=d[0]*o[0]+d[1]*o[1]+d[2]*o[2]+d[3]<0}else h=this._isLineOfSightBlocked(l,u,c);return{point:new tr(f[0]/f[3],f[1]/f[3]),signedDistanceFromCamera:f[3],isOccluded:h}}_isLineOfSightBlocked(t,r,i){let n=this._cameraPosition,a=t-n[0],o=r-n[1],s=i-n[2],l=a*a+o*o+s*s;if(l===0)return!1;let u=Jn(-(n[0]*a+n[1]*o+n[2]*s)/l,0,1),c=n[0]+u*a,f=n[1]+u*o,h=n[2]+u*s;return c*c+f*f+h*h<1}_calcMatrices(){let t=YT(this.worldSize,this.center.lat),r=Q2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+t*2),oB(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let i=this.centerOffset;r[8]=-i.x*2/this._helper._width,r[9]=i.y*2/this._helper._height,this._projectionMatrix=aB(r),this._globeProjMatrixInverted=Q2(),Bk(this._globeProjMatrixInverted,r),eu(r,r,[0,0,-this.cameraToCenterDistance]),km(r,r,this.rollInRadians),Xb(r,r,-this.pitchInRadians),km(r,r,this.bearingInRadians),eu(r,r,[0,0,-t]);let n=Do();n[0]=t,n[1]=t,n[2]=t,Xb(r,r,this.center.lat*Math.PI/180),die(r,r,-this.center.lng*Math.PI/180),Rc(r,r,n),this._globeViewProjMatrixF64=r,this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixF64Inverted=Q2(),Bk(this._globeViewProjMatrixF64Inverted,r);let a=Do();this._cameraPosition=Do(),this._cameraPosition[2]=this.cameraToCenterDistance/t,uB(this._cameraPosition,this._cameraPosition,a,-this.rollInRadians),PT(this._cameraPosition,this._cameraPosition,a,this.pitchInRadians),uB(this._cameraPosition,this._cameraPosition,a,-this.bearingInRadians),R0(this._cameraPosition,this._cameraPosition,[0,0,1]),PT(this._cameraPosition,this._cameraPosition,a,-this.center.lat*Math.PI/180),Zb(this._cameraPosition,this._cameraPosition,a,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(t);let o=aB(this._globeViewProjMatrixF64Inverted);Rc(o,o,[1,1,-1]),this._cachedFrustum=Mae.fromInvProjectionMatrix(o,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(t){Ma("calculateFogMatrix is not supported on globe projection.");let r=Q2();return Qd(r),r}getVisibleUnwrappedCoordinates(t){return[new u8(0,t)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){if(t){Ma("terrain is not fully supported on vertical perspective projection.");return}this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return(K1(this._cameraPosition)-1)*zf}getCameraLngLat(){let t=Do();return Pf(t,this._cameraPosition),w8(t)}lngLatToCameraDepth(t,r){let i=Vu(t);Ps(i,i,1+r/zf);let n=Cm();return Uu(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixF64),n[2]/n[3]}populateCache(t){}getBounds(){let t=this.width*.5,r=this.height*.5,i=[new tr(0,0),new tr(t,0),new tr(this.width,0),new tr(this.width,r),new tr(this.width,this.height),new tr(t,this.height),new tr(0,this.height),new tr(0,r)],n=[];for(let f of i)n.push(this.unprojectScreenPoint(f));let a=0,o=0,s=0,l=0,u=this.center;for(let f of n){let h=Kh(u.lng,f.lng),d=Kh(u.lat,f.lat);ha&&(a=h),ds&&(s=d)}let c=[u.lng+o,u.lat+l,u.lng+a,u.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new Ev(c)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=mn.convert(i),o=Vu(mn.convert(t));Ps(o,o,1+r/zf);let s=Vu(a),l=Ps(Do(),s,1+n/zf),u=pie(Do(),o,s),c=K1(u);if(c=-w&&v<=w,_=g>=-w&&g<=w,M,x;if(b&&_){let E=this.center.lng*Math.PI/180,S=this.center.lat*Math.PI/180,C=Vk(h,E),k=Vk(v,S),D=Vk(d,E),F=Vk(g,S);C+k=0}isSurfacePointOnScreen(t){if(!this.isSurfacePointVisible(t))return!1;let r=Cm();return Uu(r,[...t,1],this._globeViewProjMatrixF64),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}unprojectScreenPoint(t){let r=this._cameraPosition,i=this.getRayDirectionFromPixel(t),n=oq(r,i);if(n){let c=Do();R0(c,r,[i[0]*n.tMin,i[1]*n.tMin,i[2]*n.tMin]);let f=Do();return Pf(f,c),w8(f)}let a=this._cachedClippingPlane,o=a[0]*i[0]+a[1]*i[1]+a[2]*i[2],s=-hB(a,r)/o,l=Do();if(s>0)R0(l,r,[i[0]*s,i[1]*s,i[2]*s]);else{let c=Do();R0(c,r,[i[0]*2,i[1]*2,i[2]*2]);let f=hB(this._cachedClippingPlane,c);J1(l,c,[this._cachedClippingPlane[0]*f,this._cachedClippingPlane[1]*f,this._cachedClippingPlane[2]*f])}let u=iwr(a);return w8(nwr(u.center,u.radius,l))}getProjectionDataForCustomLayer(t=!0){let r=this.getProjectionData({overscaledTileID:new Bc(0,0,0,0,0),applyGlobeMatrix:t});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(t){}};Sat=class Got{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(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,r,i){this._helper.interpolatePadding(t,r,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,r,i=!0){this._helper.resize(t,r,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,r){this._helper.overrideNearFarZ(t,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}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(t){this._globeness=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(t){this._globeness=1,this.defaultConstrain=(r,i)=>this.currentTransform.defaultConstrain(r,i),this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._globeness=1,this._mercatorTransform=new Tq,this._verticalPerspectiveTransform=new Not}clone(){let t=new Got;return t._globeness=this._globeness,t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(t){let r=this._mercatorTransform.getProjectionData(t),i=this._verticalPerspectiveTransform.getProjectionData(t);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:r.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:t.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix,clipAntimeridian:i.clipAntimeridian}}isLocationOccluded(t){return this.currentTransform.isLocationOccluded(t)}transformLightDirection(t){return this.currentTransform.transformLightDirection(t)}getPixelScale(){return Kb(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return Kb(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(t,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(t,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(t,r,i);return Kb(n,a,this._globeness)}projectTileCoordinates(t,r,i,n){return this.currentTransform.projectTileCoordinates(t,r,i,n)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(t){return this.currentTransform.calculateFogMatrix(t)}getVisibleUnwrappedCoordinates(t){return this.currentTransform.getVisibleUnwrappedCoordinates(t)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){this.currentTransform.recalculateZoomAndCenter(t)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}lngLatToCameraDepth(t,r){return this.currentTransform.lngLatToCameraDepth(t,r)}populateCache(t){this._mercatorTransform.populateCache(t),this._verticalPerspectiveTransform.populateCache(t)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){return this.currentTransform.calculateCameraOptionsFromTo(t,r,i,n)}setLocationAtPoint(t,r,i){if(!this.isGlobeRendering){this._mercatorTransform.setLocationAtPoint(t,r,i),this.apply(this._mercatorTransform,!1);return}this._verticalPerspectiveTransform.setLocationAtPoint(t,r,i),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(t,r){return this.currentTransform.locationToScreenPoint(t,r)}screenPointToMercatorCoordinate(t,r){return this.currentTransform.screenPointToMercatorCoordinate(t,r)}screenTerrainPointToMercatorCoordinate(t,r){return this.currentTransform.screenTerrainPointToMercatorCoordinate(t,r)}screenPointToLocation(t,r){return this.currentTransform.screenPointToLocation(t,r)}screenPointToLocationAtElevation(t,r){return this.currentTransform.screenPointToLocationAtElevation(t,r)}isPointOnMapSurface(t,r){return this.currentTransform.isPointOnMapSurface(t,r)}getRayDirectionFromPixel(t){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(t)}getProjectionDataForCustomLayer(t=!0){let r=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this.isGlobeRendering)return r;let i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(t);return i.fallbackMatrix=r.mainMatrix,i.projectionTransition=this._globeness,i}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}},Hot=class Bm{get useGlobeControls(){return!0}handlePanInertia(t,r){let i=owr(t,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 tr(0,0)}}handleMapControlsRollPitchBearingZoom(t,r){let i=t.around,n=r.screenPointToLocation(i);t.bearingDelta&&r.setBearing(r.bearing+t.bearingDelta),t.pitchDelta&&r.setPitch(r.pitch+t.pitchDelta),t.rollDelta&&r.setRoll(r.roll+t.rollDelta);let a=r.zoom;t.zoomDelta&&r.setZoom(r.zoom+t.zoomDelta);let o=r.zoom-a;if(o===0)return;let s=Kh(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),u=Kh(r.center.lat,n.lat),c=r.getRayDirectionFromPixel(i),f=r.cameraPosition,h=gu(f,c)*-1,d=Do();R0(d,f,[c[0]*h,c[1]*h,c[2]*h]);let p=K1(d),v=p-1,m=Math.exp(-Math.max(v-.3,0)*.5),g=Gk(p,.95,.999,0,1),w=YT(r.worldSize,r.center.lat)/Math.min(r.width,r.height),b=Gk(w,.9,.5,1,.25),_=Math.min(m,Kb(1,b,g)),M=(1-If(-o))*_,x=r.center.lat,T=r.zoom,A=new mn(r.center.lng+l*M,Jn(r.center.lat+u*M,-Tv,Tv));r.setLocationAtPoint(n,i);let y=r.center,E=Gk(Math.abs(s),45,85,0,1),S=Math.max(E,g)**.25,C=Kh(y.lng,A.lng),k=Kh(y.lat,A.lat);r.setCenter(new mn(y.lng+C*S,y.lat+k*S).wrap()),r.setZoom(T+qc(x,r.center.lat))}handleMapControlsPan(t,r,i){t.panDelta&&twr(r,i,r.isPointOnMapSurface(t.around)?t.around:r.centerPoint,t.panDelta)}cameraForBoxAndBearing(t,r,i,n,a){let o=zot(t,r,i,n,a),s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,u=r.top/a.height*-2+1,c=(a.height-r.bottom)/a.height*-2+1,f=Kh(i.getWest(),i.getEast())<0,h=f?i.getEast():i.getWest(),d=f?i.getWest():i.getEast(),p=Math.max(i.getNorth(),i.getSouth()),v=Math.min(i.getNorth(),i.getSouth()),m=h+Kh(h,d)*.5,g=p+Kh(p,v)*.5,w=a.clone();w.setCenter(o.center),w.setBearing(o.bearing),w.setPitch(0),w.setRoll(0),w.setZoom(o.zoom);let b=w.modelViewProjectionMatrix,_=[Vu(i.getNorthWest()),Vu(i.getNorthEast()),Vu(i.getSouthWest()),Vu(i.getSouthEast()),Vu(new mn(d,g)),Vu(new mn(h,g)),Vu(new mn(m,p)),Vu(new mn(m,v))],M=Vu(o.center),x=1/0;for(let T of _)s<0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"x",s))),l>0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"x",l))),u>0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"y",u))),c<0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"y",c)));if(!Number.isFinite(x)||x===0){Iot();return}return o.zoom=Math.min(w.zoom+zc(x),t.maxZoom),o}handleJumpToCenterZoom(t,r){let i=t.center.lat,n=t.applyConstrain(r.center?mn.convert(r.center):t.center,t.zoom).center;t.setCenter(n.wrap());let a=r.zoom===void 0?t.zoom+qc(i,n.lat):+r.zoom;t.zoom!==a&&t.setZoom(a)}handleEaseTo(t,r){let i=t.zoom,n=t.center,a=t.padding,o={roll:t.roll,pitch:t.pitch,bearing:t.bearing},s={roll:r.roll===void 0?t.roll:r.roll,pitch:r.pitch===void 0?t.pitch:r.pitch,bearing:r.bearing===void 0?t.bearing:r.bearing},l=r.zoom!==void 0,u=!t.isPaddingEqual(r.padding),c=!1,f=r.center?mn.convert(r.center):n,h=t.applyConstrain(f,i).center;wq(t,h);let d=t.clone();d.setCenter(h),d.setZoom(l?+r.zoom:i+qc(n.lat,f.lat)),d.setBearing(r.bearing);let p=new tr(Jn(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),Jn(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));d.setLocationAtPoint(h,p);let v=(r.offset&&r.offsetAsPoint.mag())>0?d.center:h,m=l?+r.zoom:i+qc(n.lat,v.lat),g=i+qc(n.lat,0),w=m+qc(v.lat,0),b=Kh(n.lng,v.lng),_=Kh(n.lat,v.lat),M=If(w-g);return c=m!==i,{easeFunc:x=>{if(wie(o,s)||Rot({startEulerAngles:o,endEulerAngles:s,tr:t,k:x,useSlerp:o.roll!=s.roll}),u&&t.interpolatePadding(a,r.padding,x),r.around)Ma("Easing around a point is not supported under globe projection."),t.setLocationAtPoint(r.around,r.aroundPoint);else{let T=x*(w>g?Math.min(2,M):Math.max(.5,M))**(1-x),A=wat(n,b,_,T);t.setCenter(A.wrap())}if(c){let T=$s.number(g,w,x)+qc(0,t.center.lat);t.setZoom(T)}},isZooming:c,elevationCenter:v}}handleFlyTo(t,r){let i=r.zoom!==void 0,n=t.center,a=t.zoom,o=t.padding,s=!t.isPaddingEqual(r.padding),l=t.applyConstrain(mn.convert(r.center||r.locationAtOffset),a).center,u=i?+r.zoom:t.zoom+qc(t.center.lat,l.lat),c=t.clone();c.setCenter(l),c.setZoom(u),c.setBearing(r.bearing);let f=new tr(Jn(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),Jn(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));c.setLocationAtPoint(l,f);let h=c.center;wq(t,h);let d=Z3r(t,n,h),p=a+qc(n.lat,0),v=u+qc(h.lat,0),m=If(v-p),g=typeof r.minZoom=="number"?+r.minZoom:t.minZoom,w=Math.max(g,t.minZoom)+qc(h.lat,0),b=Math.min(w,p,v)+qc(0,h.lat),_=t.applyConstrain(h,b).zoom+qc(h.lat,0),M=If(_-p),x=Kh(n.lng,h.lng),T=Kh(n.lat,h.lat);return{easeFunc:(A,y,E,S)=>{let C=wat(n,x,T,E);s&&t.interpolatePadding(o,r.padding,A);let k=A===1?h:C;t.setCenter(k.wrap());let D=p+zc(y);t.setZoom(A===1?u:D+qc(0,k.lat))},scaleOfZoom:m,targetCenter:h,scaleOfMinZoom:M,pixelPathLength:d}}static solveVectorScale(t,r,i,n,a){let o=a,s=n==="x"?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],l=[i[3],i[7],i[11],i[15]],u=t[0]*s[0]+t[1]*s[1]+t[2]*s[2],c=t[0]*l[0]+t[1]*l[1]+t[2]*l[2],f=r[0]*s[0]+r[1]*s[1]+r[2]*s[2],h=r[0]*l[0]+r[1]*l[1]+r[2]*l[2],d=(f+s[3]-o*h-o*l[3])/(f-u-o*h+o*c);return f+o*c===u+o*h||l[3]*(u-f)+s[3]*(h-c)+u*h===f*c?null:d}static getLesserNonNegativeNonNull(t,r){return r!==null&&r>=0&&r{for(let a in this.tileManagers){let o=this.tileManagers[a].getSource().type;(o==="vector"||o==="geojson")&&this.tileManagers[a].reload()}},this.map=e,this.dispatcher=new rot(bae(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(a,o)=>this.getGlyphs(a,o)),this.dispatcher.registerMessageHandler("GI",(a,o)=>this.getImages(a,o)),this.dispatcher.registerMessageHandler("GDA",(a,o)=>this.getDashes(a,o)),this.imageManager=new W_r,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new Y_r(this.imageManager);let r=((i=e._container)==null?void 0:i.lang)||typeof document<"u"&&((n=document.documentElement)==null?void 0:n.lang)||void 0;this.glyphManager=new ibr(e._requestManager,t.localIdeographFontFamily,r),this.lineAtlas=new cbr(256,512),this.crossTileSymbolIndex=new Eot,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",mB()),A8().on(iae,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;let o=this.tileManagers[a.sourceId];if(!o)return;let s=o.getSource();if(s!=null&&s.vectorLayerIds)for(let l in this._layers){let u=this._layers[l];u.source===s.id&&this._validateLayer(u)}})}_setInitialValues(){var e;this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new Yz,this._imagesListDirty=!1,this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(((e=this.crossTileSymbolIndex)==null?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,t){var i,n,a;this._checkLoaded();let r=t===null?(a=(n=(i=this.stylesheet.state)==null?void 0:i[e])==null?void 0:n.default)!=null?a:null:t;if(_v(r,this._globalState[e]))return this;this._globalState[e]=r,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let t=[];for(let r in e)_v(this._globalState[r],e[r].default)||(t.push(r),this._globalState[r]=e[r].default);this._applyGlobalStateChanges(t)}_applyGlobalStateChanges(e){if(e.length===0)return;let t=new Set,r={};for(let i of e){r[i]=this._globalState[i];for(let n in this._layers){let a=this._layers[n],o=a.getLayoutAffectingGlobalStateRefs(),s=a.getPaintAffectingGlobalStateRefs(),l=a.getVisibilityAffectingGlobalStateRefs();if(o.has(i)&&t.add(a.source),s.has(i))for(let{name:u,value:c}of s.get(i))this._updatePaintProperty(a,u,c);l!=null&&l.has(i)&&(a.recalculateVisibility(),this._updateLayer(a))}}this.dispatcher.broadcast("UGS",r);for(let i in this.tileManagers)t.has(i)&&(this._reloadSource(i),this._changed=!0)}loadURL(i){return Ki(this,arguments,function*(e,t={},r){this.fire(new rp("dataloading")),t.validate=typeof t.validate!="boolean"||t.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");gB(n.signal);let o=yield jk(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,t,r)}catch(a){this._loadStyleRequest===n&&(this._loadStyleRequest=null),a&&!n.signal.aborted&&this.fire(new An(Ic(a)))}})}loadJSON(e,t={},r){this.fire(new rp("dataloading")),this._frameRequest=new AbortController,fh.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,t.validate=t.validate!==!1,this._load(e,t,r)}).catch(()=>{})}loadEmpty(){this.fire(new rp("dataloading")),this._load(cwr,{validate:!1})}_load(e,t,r){var n,a,o;let i=t.transformStyle?t.transformStyle(r,e):e;if(!(t.validate&&Wie(this,i))){i=fn({},i),this._loaded=!0,this.stylesheet=i;for(let s in i.sources)this.addSource(s,i.sources[s],{validate:!1});i.sprite?this._loadSprite(i.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(i.glyphs),this.glyphManager.setFontFaces(i["font-faces"]),this._createLayers(),this.light=new obr((n=this.stylesheet.light)!=null?n:{},this._globalState),this._setProjectionInternal(((a=this.stylesheet.projection)==null?void 0:a.type)||"mercator"),this.sky=new ubr(this.stylesheet.sky,this._globalState),this.map.setTerrain((o=this.stylesheet.terrain)!=null?o:null,{validate:!1}),this.fire(new rp("data")),this.fire(new Qne)}}_createLayers(){var t,r,i;let e=Gnt(this.stylesheet.layers);this.setGlobalState((t=this.stylesheet.state)!=null?t:null),this.dispatcher.broadcast("SL",e),this._order=e.map(n=>n.id),this._layers={},this._serializedLayers=null;for(let n of e){let a=ZB(n,this._globalState);if(a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a,BB(a)&&this.tileManagers[a.source]){let o=(i=(r=n.paint)==null?void 0:r["raster-fade-duration"])!=null?i:a.paint.get("raster-fade-duration");this.tileManagers[a.source].setRasterFadeDuration(o)}}}_loadSprite(e,t=!1,r=void 0){return Ki(this,null,function*(){this.imageManager.setLoaded(!1);let i=new AbortController;this._spriteRequest=i;let n;try{let a=yield j_r(e,this.map._requestManager,this.map.getPixelRatio(),i);if(!a)return;for(let o in a){let{loaded:s,removed:l}=this.imageManager.setSpriteImages(o,a[o]);this._markImagesChanged(l),t&&this._markImagesChanged(s)}}catch(a){n=a,i.signal.aborted||this.fire(new An(n))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),t&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new rp("data")),r==null||r(n)}})}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}_validateLayer(e){let t=this.tileManagers[e.source];if(!t)return;let r=e.sourceLayer;if(!r)return;let i=t.getSource();(i.type==="geojson"||i.vectorLayerIds&&!i.vectorLayerIds.includes(r))&&this.fire(new An(Error(`Source layer "${r}" does not exist on source "${i.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,t=!1){let r=this._serializedAllLayers();if(!e||e.length===0)return Object.values(t?lh(r):r);let i=[];for(let n of e)if(r[n]){let a=t?lh(r[n]):r[n];i.push(a)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let r of t){let i=this._layers[r];i.type!=="custom"&&(e[r]=i.serialize())}return e}hasTransitions(){var e,t,r;if((e=this.light)!=null&&e.hasTransition()||(t=this.sky)!=null&&t.hasTransition()||(r=this.projection)!=null&&r.hasTransition())return!0;for(let i in this.tileManagers)if(this.tileManagers[i].hasTransition())return!0;for(let i in this._layers)if(this._layers[i].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let t=this._changed;if(t){this._imagesListDirty&&(this._imagesListDirty=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1));let n=Object.keys(this._updatedLayers),a=Object.keys(this._removedLayers);(n.length||a.length)&&this._updateWorkerLayers(n,a);for(let o in this._updatedSources){let s=this._updatedSources[o];if(s==="reload")this._reloadSource(o);else if(s==="clear")this._clearSource(o);else throw Error(`Invalid action ${s}`)}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this._resetUpdates()}let r={};for(let n in this.tileManagers){let a=this.tileManagers[n];r[n]=a.used,a.used=!1}let i=this.imageManager.listImages();for(let n of this._order){let a=this._layers[n];a.recalculate(e,i),!a.isHidden(e.zoom)&&a.source&&(this.tileManagers[a.source].used=!0)}for(let n in r){let a=this.tileManagers[n];!!r[n]!=!!a.used&&a.fire(new Is("data",{sourceDataType:"visibility",sourceId:n}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,t&&this.fire(new rp("data"))}_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,t={}){var a;this._checkLoaded();let r=this.serialize();if(e=t.transformStyle?t.transformStyle(r,e):e,((a=t.validate)!=null?a:!0)&&Wie(this,e))return!1;e=lh(e),e.layers=Gnt(e.layers);let i=G_r(r,e),n=this._getOperationsToPerform(i);if(n.unimplemented.length>0)throw Error(`Unimplemented: ${n.unimplemented.join(", ")}.`);if(n.operations.length===0)return!1;for(let o of n.operations)o();return this.stylesheet=e,this._serializedLayers=null,this.fire(new Qne({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"setFontFaces":t.push(()=>this.setFontFaces.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,t){if(this.getImage(e)){this.fire(new An(Error(`An image named "${e}" already exists.`)));return}this.imageManager.addImage(e,t),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){if(!this.getImage(e)){this.fire(new An(Error(`An image named "${e}" does not exist.`)));return}this.imageManager.removeImage(e),this._afterImageUpdated(e)}_markImagesChanged(e){for(let t of e)this._changedImages[t]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,t,r={}){var n;if(this._checkLoaded(),this.tileManagers[e]!==void 0)throw Error(`Source "${e}" already exists.`);if(!t.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(t).join(", ")}.`);if($ie.has(t.type)&&this._validate(ch.source,`sources.${e}`,t,null,r))return;(n=this.map)!=null&&n._collectResourceTiming&&(t.collectResourceTiming=!0);let i=this.tileManagers[e]=new aae(e,t,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new An(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let t=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],t.fire(new Is("data",{sourceDataType:"metadata",sourceId:e})),t.setEventedParent(null),t.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if(r.type!=="geojson")throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return(t=this.tileManagers[e])==null?void 0:t.getSource()}addLayer(e,t,r={}){this._checkLoaded();let i=e.id;if(this.getLayer(i)){this.fire(new An(Error(`Layer "${i}" already exists on this map.`)));return}let n;if(e.type==="custom"){if(LB(this,snt(e)))return;n=ZB(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(i,e.source),e=lh(e),e=ln(e,{source:i})),this._validate(ch.layer,`layers.${i}`,e,{arrayIndex:-1},r))return;n=ZB(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:i}})}let a=t?this._order.indexOf(t):this._order.length;if(t&&a===-1){this.fire(new An(Error(`Cannot add layer "${i}" before non-existing layer "${t}".`)));return}if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=n,this._removedLayers[i]&&n.source&&n.type!=="custom"){let o=this._removedLayers[i];delete this._removedLayers[i],o.type===n.type?(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause()):this._updatedSources[n.source]="clear"}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}moveLayer(e,t){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new An(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));return}if(e===t)return;if(t&&!this._order.includes(t)){this.fire(new An(Error(`Cannot move layer "${e}" before non-existing layer "${t}".`)));return}let r=this._order.indexOf(e);this._order.splice(r,1);let i=t?this._order.indexOf(t):this._order.length;this._order.splice(i,0,e),this._layerOrderChanged=!0}removeLayer(e){var i;this._checkLoaded();let t=this._layers[e];if(!t){this.fire(new An(Error(`Cannot remove non-existing layer "${e}".`)));return}t.setEventedParent(null);let r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.type==="symbol"&&t.source&&((i=this.tileManagers[t.source])==null||i.resetMaxContentElevation()),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,t,r){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new An(Error(`Cannot set the zoom range of non-existing layer "${e}".`)));return}(i.minzoom!==t||i.maxzoom!==r)&&(t!=null&&(i.minzoom=t),r!=null&&(i.maxzoom=r),this._updateLayer(i))}setFilter(e,t,r={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new An(Error(`Cannot filter non-existing layer "${e}".`)));return}if(!_v(i.filter,t)){if(t==null){i.setFilter(void 0),this._updateLayer(i);return}this._validate(ch.filter,`layers.${i.id}.filter`,t,null,r)||(i.setFilter(lh(t)),this._updateLayer(i))}}getFilter(e){return lh(this.getLayer(e).filter)}setLayoutProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new An(Error(`Cannot style non-existing layer "${e}".`)));return}_v(n.getLayoutProperty(t),r)||(n.setLayoutProperty(t,r,i),this._updateLayer(n))}getLayoutProperty(e,t){let r=this.getLayer(e);if(!r){this.fire(new An(Error(`Cannot get style of non-existing layer "${e}".`)));return}return r.getLayoutProperty(t)}setPaintProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new An(Error(`Cannot style non-existing layer "${e}".`)));return}_v(n.getPaintProperty(t),r)||this._updatePaintProperty(n,t,r,i)}_updatePaintProperty(e,t,r,i={}){e.setPaintProperty(t,r,i)&&this._updateLayer(e),BB(e)&&t==="raster-fade-duration"&&this.tileManagers[e.source].setRasterFadeDuration(r),this._changed=!0,this._updatedPaintProps[e.id]=!0,e.type==="symbol"&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,t){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(n===void 0){this.fire(new An(Error(`The source '${r}' does not exist in the map's style.`)));return}let a=n.getSource().type;if(a==="geojson"&&i){this.fire(new An(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(a==="vector"&&!i){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(e.id===void 0){this.fire(new An(Error("The feature id parameter must be provided.")));return}let o=["__proto__","constructor","prototype"];if(t&&Object.keys(t).some(s=>o.includes(s))){this.fire(new An(Error(`The feature state should not include one of the following keys: ${o}`)));return}n.setFeatureState(i,e.id,t)}removeFeatureState(e,t){this._checkLoaded();let r=e.source,i=this.tileManagers[r];if(i===void 0){this.fire(new An(Error(`The source '${r}' does not exist in the map's style.`)));return}let n=i.getSource().type,a=n==="vector"?e.sourceLayer:void 0;if(n==="vector"&&!a){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(t&&typeof e.id!="string"&&typeof e.id!="number"){this.fire(new An(Error("A feature id is required to remove its specific state property.")));return}i.removeFeatureState(a,e.id,t)}getFeatureState(e){this._checkLoaded();let t=e.source,r=e.sourceLayer,i=this.tileManagers[t];if(i===void 0){this.fire(new An(Error(`The source '${t}' does not exist in the map's style.`)));return}if(i.getSource().type==="vector"&&!r){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}return e.id===void 0&&this.fire(new An(Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id)}getTransition(){var e;return ln({duration:300,delay:0},(e=this.stylesheet)==null?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=vB(this.tileManagers,n=>n.serialize()),t=this._serializeByIds(this._order,!0),r=this.map.getTerrain()||void 0,i=this.stylesheet;return bie({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,"font-faces":i["font-faces"],transition:i.transition,projection:i.projection,state:i.state,sources:e,layers:t,terrain:r},n=>n!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.tileManagers[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=a=>this._layers[a].type==="fill-extrusion",r={},i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o)){r[o]=a;for(let s of e){let l=s[o];if(l)for(let u of l)i.push(u)}}}i.sort((a,o)=>o.intersectionZ-a.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let s=i.length-1;s>=0;s--){let l=i[s].feature;if(r[l.layer.id]this.map.terrain.getElevation(u,c,f):void 0));return this.placement&&n.push(wbr(this._layers,a,this.tileManagers,e,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(n)}querySourceFeatures(e,t){t!=null&&t.filter&&this._validate(ch.filter,"querySourceFeatures.filter",t.filter,null,t);let r=this.tileManagers[e];return r?Tbr(r,t?ma(fn({},t),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,t={}){this._checkLoaded();let r=this.light.getLight(),i=!1;for(let a in e)if(!_v(e[a],r[a])){i=!0;break}if(!i)return;let n={now:Oo(),transition:ln({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,t),this.light.updateTransitions(n)}getProjection(){var e;return(e=this.stylesheet)==null?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e!=null?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(e=this.stylesheet)==null?void 0:e.sky}setSky(e,t={}){this._checkLoaded();let r=this.getSky(),i=!1;if(!e&&!r)return;if(e&&!r)i=!0;else if(!e&&r)i=!0;else for(let a in e)if(!_v(e[a],r[a])){i=!0;break}if(!i)return;let n={now:Oo(),transition:ln({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,t),this.sky.updateTransitions(n)}_setProjectionInternal(e){var r;let t=uwr(e,(r=this.map._camera)==null?void 0:r.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let i in this.tileManagers)this.tileManagers[i].reload()}_validate(e,t,r,i,n={}){return n.validate!==!1&&qT(this,e,fn({key:t,style:this.serialize(),value:r},i),n)}_remove(e=!0){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null)),A8().off(iae,this._rtlPluginLoaded);for(let t in this._layers)this._layers[t].setEventedParent(null);for(let t in this.tileManagers){let r=this.tileManagers[t];r.setEventedParent(null),r.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)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,t,r){var n;let i=this.pauseablePlacement;return!i||this._symbolPlacementTriggered||this._placedProjectionTransition!==((n=this.projection)==null?void 0:n.transitionState)||i._showCollisionBoxes!==t||i.placement.collisionGroups.crossSourceCollisions!==r||i.placement.transform.renderWorldCopies!==e.renderWorldCopies||!Pet(i.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,t,r,i,n=!1){var c,f;let a=!1,o=!1,s={};for(let h of this._order){let d=this._layers[h];if(d.type!=="symbol")continue;if(!s[d.source]){let v=this.tileManagers[d.source];s[d.source]=v.getRenderableIds(!0).map(m=>v.getTileByID(m)).sort((m,g)=>g.tileID.overscaledZ-m.tileID.overscaledZ||(m.tileID.isLessThan(g.tileID)?-1:1))}let p=this.crossTileSymbolIndex.addLayer(d,s[d.source],e.center.lng);a||(a=p)}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||r===0);let l=a||this._placementInputsChanged(e,t,i),u=((c=this.pauseablePlacement)==null?void 0:c.isDone())&&!this.placement.stillRecent(Oo(),e.zoom);if((n||!this.pauseablePlacement||u&&(l||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=(f=this.projection)==null?void 0:f.transitionState,this.pauseablePlacement=new F3r(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?l&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(Oo()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let h of this._order){let d=this._layers[h];d.type==="symbol"&&this.placement.updateLayerOpacities(d,s[d.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(Oo())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,t){return Ki(this,null,function*(){let r=yield this.imageManager.getImages(t.icons);this._updateTilesForChangedImages();let i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,t.icons),r})}getGlyphs(e,t){return Ki(this,null,function*(){let r=yield this.glyphManager.getGlyphs(t.stacks),i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,[""]),r})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,t={}){this._checkLoaded(),!(e&&this._validate(ch.glyphs,"glyphs",e,null,t))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}getDashes(e,t){return Ki(this,null,function*(){let r={};for(let[i,n]of Object.entries(t.dashes))r[i]=this.lineAtlas.getDash(n.dasharray,n.round);return r})}addSprite(e,t,r={},i){this._checkLoaded();let n=[{id:e,url:t}],a=[...vq(this.stylesheet.sprite),...n];this._validate(ch.sprite,"sprite",a,null,r)||(this.stylesheet.sprite=a,this._loadSprite(n,!0,i))}removeSprite(e){this._checkLoaded();let t=vq(this.stylesheet.sprite);if(!t.find(i=>i.id===e)){this.fire(new An(Error(`Sprite "${e}" doesn't exists on this map.`)));return}let r=this.imageManager.removeSpriteImages(e);this._markImagesChanged(r),t.splice(t.findIndex(i=>i.id===e),1),this.stylesheet.sprite=t.length>0?t:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}getSprite(){return vq(this.stylesheet.sprite)}setSprite(e,t={},r){this._checkLoaded(),!(e&&this._validate(ch.sprite,"sprite",e,null,t))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,r):(this._unloadSprite(),r&&r(null)))}destroy(){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null));for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let 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={}}},fwr=ol([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),hwr=class{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 u=this.boundPaintVertexBuffers.length!==i.length;for(let c=0;!u&&c({u_depth:new wn(e,t.u_depth),u_terrain:new wn(e,t.u_terrain)}),pwr=(e,t)=>({u_texture:new wn(e,t.u_texture),u_ele_delta:new qi(e,t.u_ele_delta),u_fog_matrix:new ep(e,t.u_fog_matrix),u_fog_color:new Rm(e,t.u_fog_color),u_fog_ground_blend:new qi(e,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new qi(e,t.u_fog_ground_blend_opacity),u_horizon_color:new Rm(e,t.u_horizon_color),u_horizon_fog_blend:new qi(e,t.u_horizon_fog_blend),u_is_globe_mode:new qi(e,t.u_is_globe_mode)}),vwr=(e,t)=>({u_ele_delta:new qi(e,t.u_ele_delta)}),gwr=(e,t,r,i,n)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:t,u_fog_color:r?r.properties.get("fog-color"):ea.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:n?0:r?r.calculateFogBlendOpacity(i):0,u_horizon_color:r?r.properties.get("horizon-color"):ea.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!n}),mwr=e=>({u_ele_delta:e}),Cq={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2};xwr={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]};Iae=class{constructor(e,t,r){this.context=e,this.binding=t,this.contentWords=r.contentWords;let i=e.gl;this.buffer=i.createBuffer(),i.bindBuffer(i.UNIFORM_BUFFER,this.buffer),i.bufferData(i.UNIFORM_BUFFER,r.sizeWords*4,i.DYNAMIC_DRAW),i.bindBufferBase(i.UNIFORM_BUFFER,t,this.buffer),this.uploaded=new Float32Array(r.sizeWords),this.pending=new Float32Array(r.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1,this.bindingDirty=!1}upload(){let e=this.context.gl,t=!this.hasData;if(!t){let r=this.pendingWords,i=this.uploadedWords;for(let n=0;n=0&&(this.attributes[y]={location:E,isInteger:A.has(y)})}u.deleteShader(x),u.deleteShader(M);for(let y of g)if(y&&!T[y]){let E=u.getUniformLocation(this.program,y);E&&(T[y]=E)}this.fixedUniforms=i(e,T),this.terrainUniforms=dwr(e,T),this.binderUniforms=r?r.getUniforms(e,T):[]}draw(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w){var M;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){e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture);for(let x in this.terrainUniforms)this.terrainUniforms[x].set(s[x]);Twr(e.terrainUniformBuffer,s)}if(l&&bwr(e.projectionUniformBuffer,l),o)for(let x in this.fixedUniforms)this.fixedUniforms[x].set(o[x]);v&&v.setUniforms(e,this.binderUniforms,d,{zoom:p});let _=0;switch(t){case b.LINES:_=2;break;case b.TRIANGLES:_=3;break;case b.LINE_STRIP:_=1}for(let x of h.get())x.vaos||(x.vaos={}),(M=x.vaos)[u]||(M[u]=new hwr),x.vaos[u].bind(e,this,c,v?v.getPaintVertexBuffers():[],f,x.vertexOffset,m,g,w),b.drawElements(t,x.primitiveLength*_,b.UNSIGNED_SHORT,x.primitiveOffset*_*2)}};Ewr=(e,t)=>({u_lightpos:new Rf(e,t.u_lightpos),u_lightpos_globe:new Rf(e,t.u_lightpos_globe),u_lightintensity:new qi(e,t.u_lightintensity),u_lightcolor:new Rf(e,t.u_lightcolor),u_vertical_gradient:new qi(e,t.u_vertical_gradient),u_opacity:new qi(e,t.u_opacity),u_fill_translate:new pa(e,t.u_fill_translate)}),kwr=(e,t)=>({u_lightpos:new Rf(e,t.u_lightpos),u_lightpos_globe:new Rf(e,t.u_lightpos_globe),u_lightintensity:new qi(e,t.u_lightintensity),u_lightcolor:new Rf(e,t.u_lightcolor),u_vertical_gradient:new qi(e,t.u_vertical_gradient),u_height_factor:new qi(e,t.u_height_factor),u_opacity:new qi(e,t.u_opacity),u_fill_translate:new pa(e,t.u_fill_translate),u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade)}),Yot=(e,t,r,i)=>{let n=e.style.light,a=n.getCartesianPosition(),o=hie();n.properties.get("anchor")==="viewport"&&Det(o,e.transform.bearingInRadians),Oet(a,a,o);let s=e.transform.transformLightDirection(a),l=n.properties.get("color");return{u_lightpos:a,u_lightpos_globe:s,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+t,u_opacity:r,u_fill_translate:i}},Cwr=(e,t,r,i,n,a,o)=>ln(Yot(e,t,r,i),Wot(a,e,o),{u_height_factor:-(2**n.overscaledZ)/o.tileSize/8}),Dwr=(e,t)=>({u_fill_translate:new pa(e,t.u_fill_translate)}),Fwr=(e,t)=>({u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade),u_sdf_pattern:new wn(e,t.u_sdf_pattern),u_fill_translate:new pa(e,t.u_fill_translate)}),Lwr=(e,t)=>({u_fill_translate:new pa(e,t.u_fill_translate)}),Pwr=(e,t)=>({u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade),u_sdf_pattern:new wn(e,t.u_sdf_pattern),u_fill_translate:new pa(e,t.u_fill_translate)}),Xot=(e,t,r,i,n)=>ln(Wot(t,e,r),{u_fill_translate:i,u_sdf_pattern:+!!n}),Iwr=e=>({u_fill_translate:e}),Rwr=e=>({u_fill_translate:e}),zwr=(e,t,r,i,n)=>Xot(e,t,r,i,n),Bwr=(e,t)=>({u_scale_with_map:new wn(e,t.u_scale_with_map),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_extrude_scale:new pa(e,t.u_extrude_scale),u_globe_extrude_scale:new qi(e,t.u_globe_extrude_scale),u_translate:new pa(e,t.u_translate)}),qwr=(e,t,r,i,n)=>{let a=e.transform,o,s,l=0;if(r.paint.get("circle-pitch-alignment")==="map"){let u=Zh(t,1,a.zoom);o=!0,s=[u,u],l=u/(zr*2**t.tileID.overscaledZ)*2*Math.PI*n}else o=!1,s=a.pixelsToGLUnits;return{u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+o,u_extrude_scale:s,u_globe_extrude_scale:l,u_translate:i}},Owr=(e,t)=>({u_color:new Rm(e,t.u_color),u_overlay:new wn(e,t.u_overlay),u_overlay_scale:new qi(e,t.u_overlay_scale)}),kat=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),Nwr=(e,t)=>({u_extrude_scale:new qi(e,t.u_extrude_scale),u_intensity:new qi(e,t.u_intensity),u_globe_extrude_scale:new qi(e,t.u_globe_extrude_scale)}),Uwr=(e,t)=>({u_matrix:new ep(e,t.u_matrix),u_image:new wn(e,t.u_image),u_color_ramp:new wn(e,t.u_color_ramp),u_opacity:new qi(e,t.u_opacity)}),Zot=(e,t,r,i)=>{let n=Zh(e,1,t)/(zr*2**e.tileID.overscaledZ)*2*Math.PI*i;return{u_extrude_scale:Zh(e,1,t),u_intensity:r,u_globe_extrude_scale:n}},Kot=(e,t,r,i)=>{let n=Em();return wv(n,0,e.width,e.height,0,0,1),{u_matrix:n,u_image:r,u_color_ramp:i,u_opacity:t.paint.get("heatmap-opacity")}},Vwr=(e,t)=>({u_image:new wn(e,t.u_image),u_latrange:new pa(e,t.u_latrange),u_exaggeration:new qi(e,t.u_exaggeration),u_altitudes:new Kie(e,t.u_altitudes),u_azimuths:new Kie(e,t.u_azimuths),u_accent:new Rm(e,t.u_accent),u_method:new wn(e,t.u_method),u_shadows:new Zie(e,t.u_shadows),u_highlights:new Zie(e,t.u_highlights)}),Gwr=(e,t)=>({u_matrix:new ep(e,t.u_matrix),u_image:new wn(e,t.u_image),u_dimension:new pa(e,t.u_dimension),u_zoom:new qi(e,t.u_zoom),u_unpack:new OT(e,t.u_unpack)}),Hwr=(e,t,r)=>{let i=r.paint.get("hillshade-accent-color"),n;switch(r.paint.get("hillshade-method")){case"basic":n=4;break;case"combined":n=1;break;case"igor":n=2;break;case"multidirectional":n=3;break;default:n=0}let a=r.getIlluminationProperties();for(let o=0;o{let r=t.stride,i=Em();return wv(i,0,zr,-zr,0,0,1),eu(i,i,[0,-zr,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:t.getUnpackVector()}};Wwr=(e,t)=>({u_image:new wn(e,t.u_image),u_unpack:new OT(e,t.u_unpack),u_dimension:new pa(e,t.u_dimension),u_elevation_stops:new wn(e,t.u_elevation_stops),u_color_stops:new wn(e,t.u_color_stops),u_color_ramp_size:new wn(e,t.u_color_ramp_size),u_opacity:new qi(e,t.u_opacity)}),Ywr=(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")}),Xwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio)}),Zwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_image_height:new qi(e,t.u_image_height)}),Kwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_texsize:new pa(e,t.u_texsize),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade)}),Jwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_mix:new qi(e,t.u_mix),u_tileratio:new qi(e,t.u_tileratio),u_crossfade_from:new qi(e,t.u_crossfade_from),u_crossfade_to:new qi(e,t.u_crossfade_to),u_lineatlas_width:new qi(e,t.u_lineatlas_width),u_lineatlas_height:new qi(e,t.u_lineatlas_height)}),Qwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_image_height:new qi(e,t.u_image_height),u_tileratio:new qi(e,t.u_tileratio),u_crossfade_from:new qi(e,t.u_crossfade_from),u_crossfade_to:new qi(e,t.u_crossfade_to),u_image_dash:new wn(e,t.u_image_dash),u_mix:new qi(e,t.u_mix),u_lineatlas_width:new qi(e,t.u_lineatlas_width),u_lineatlas_height:new qi(e,t.u_lineatlas_height)}),Dq=(e,t,r,i)=>{let n=e.transform;return{u_translation:Jot(e,t,r),u_ratio:i/Zh(t,1,n.zoom)}},e5r=(e,t,r,i,n)=>ln(Dq(e,t,r,i),{u_image:0,u_image_height:n}),t5r=(e,t,r,i,n)=>{let a=e.transform,o=Rae(t,a);return{u_translation:Jot(e,t,r),u_texsize:t.imageAtlasTexture.size,u_ratio:i/Zh(t,1,a.zoom),u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t}},r5r=(e,t,r,i,n)=>{let a=e.transform,o=Rae(t,a);return ln(Dq(e,t,r,i),{u_tileratio:o,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image:0,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},i5r=(e,t,r,i,n,a)=>{let o=e.transform,s=Rae(t,o);return ln(Dq(e,t,r,i),{u_image:0,u_image_height:a,u_tileratio:s,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image_dash:1,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};n5r=(e,t)=>({u_image:new wn(e,t.u_image),u_opacity:new qi(e,t.u_opacity)}),a5r=(e,t)=>({u_image:t,u_opacity:e}),o5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texture:new wn(e,t.u_texture),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),s5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texture:new wn(e,t.u_texture),u_gamma_scale:new qi(e,t.u_gamma_scale),u_is_halo:new wn(e,t.u_is_halo),u_is_plain:new wn(e,t.u_is_plain),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),l5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texsize_icon:new pa(e,t.u_texsize_icon),u_texture:new wn(e,t.u_texture),u_texture_icon:new wn(e,t.u_texture_icon),u_gamma_scale:new qi(e,t.u_gamma_scale),u_is_halo:new wn(e,t.u_is_halo),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),Qot=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p)=>({u_is_size_zoom_constant:+(e==="constant"||e==="source"),u_is_size_feature_constant:+(e==="constant"||e==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_rotate_symbol:+r,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:h,u_is_offset:d,u_height_anchor_ground:+p}),est=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v)=>{let m=o.transform;return ln(Qot(e,t,r,i,n,a,o,s,l,u,c,f,d,p,v),{u_gamma_scale:i?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_is_halo:+!!h,u_is_plain:1})},u5r=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p)=>ln(est(e,t,r,i,n,a,o,s,l,u,!0,c,!0,h,d,p),{u_texsize_icon:f,u_texture_icon:1}),c5r=(e,t)=>({u_opacity:new qi(e,t.u_opacity),u_color:new Rm(e,t.u_color)}),f5r=(e,t)=>({u_opacity:new qi(e,t.u_opacity),u_image:new wn(e,t.u_image),u_pattern_tl_a:new pa(e,t.u_pattern_tl_a),u_pattern_br_a:new pa(e,t.u_pattern_br_a),u_pattern_tl_b:new pa(e,t.u_pattern_tl_b),u_pattern_br_b:new pa(e,t.u_pattern_br_b),u_texsize:new pa(e,t.u_texsize),u_mix:new qi(e,t.u_mix),u_pattern_size_a:new pa(e,t.u_pattern_size_a),u_pattern_size_b:new pa(e,t.u_pattern_size_b),u_scale_a:new qi(e,t.u_scale_a),u_scale_b:new qi(e,t.u_scale_b),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new qi(e,t.u_tile_units_to_pixels)}),h5r=(e,t)=>({u_opacity:e,u_color:t}),d5r=(e,t,r,i,n)=>ln(Swr(r,n,t,i),{u_opacity:e}),p5r=(e,t)=>({u_sun_pos:new Rf(e,t.u_sun_pos),u_atmosphere_blend:new qi(e,t.u_atmosphere_blend),u_globe_position:new Rf(e,t.u_globe_position),u_globe_radius:new qi(e,t.u_globe_radius),u_inv_proj_matrix:new ep(e,t.u_inv_proj_matrix)}),v5r=(e,t,r,i,n)=>({u_sun_pos:e,u_atmosphere_blend:t,u_globe_position:r,u_globe_radius:i,u_inv_proj_matrix:n}),g5r=(e,t)=>({u_sky_color:new Rm(e,t.u_sky_color),u_horizon_color:new Rm(e,t.u_horizon_color),u_horizon:new pa(e,t.u_horizon),u_horizon_normal:new pa(e,t.u_horizon_normal),u_sky_horizon_blend:new qi(e,t.u_sky_horizon_blend),u_sky_blend:new qi(e,t.u_sky_blend),u_inv_proj_matrix:new ep(e,t.u_inv_proj_matrix),u_globe_position:new Rf(e,t.u_globe_position),u_globe_radius:new qi(e,t.u_globe_radius)}),m5r=(e,t,r)=>{let i=Math.cos(t.rollInRadians),n=Math.sin(t.rollInRadians),a=UT(t),o=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-a*n)*r,(t.height/2+a*i)*r],u_horizon_normal:[-n,i],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*r,u_sky_blend:o,u_inv_proj_matrix:t.inverseProjectionMatrix,u_globe_position:Oot(t),u_globe_radius:YT(t.worldSize,t.center.lat)}},lq=(e,t)=>({}),y5r={fillExtrusion:Ewr,fillExtrusionPattern:kwr,fill:Dwr,fillPattern:Fwr,fillOutline:Lwr,fillOutlinePattern:Pwr,circle:Bwr,collisionBox:lq,collisionCircle:lq,debug:Owr,depth:lq,clippingMask:lq,heatmap:Nwr,heatmapTexture:Uwr,hillshade:Vwr,hillshadePrepare:Gwr,colorRelief:Wwr,line:Xwr,lineGradient:Zwr,linePattern:Kwr,lineSDF:Jwr,lineGradientSDF:Qwr,layerOpacity:n5r,raster:Rbr,symbolIcon:o5r,symbolSDF:s5r,symbolTextAndIcon:l5r,background:c5r,backgroundPattern:f5r,terrain:pwr,terrainDepth:vwr,atmosphere:p5r,sky:g5r},x5r=class{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(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Cat={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_5r=class{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];i!==void 0&&e.enableVertexAttribArray(i.location)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];if(n!==void 0){let a=i.offset+this.itemSize*(r||0);n.isInteger?e.vertexAttribIPointer(n.location,i.components,e[Cat[i.type]],this.itemSize,a):e.vertexAttribPointer(n.location,i.components,e[Cat[i.type]],!1,this.itemSize,a)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},No=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},b5r=class extends No{getDefault(){return ea.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)}},w5r=class extends No{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},T5r=class extends No{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},A5r=class extends No{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)}},M5r=class extends No{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},S5r=class extends No{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},E5r=class extends No{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)}},k5r=class extends No{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)}},C5r=class extends No{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}},D5r=class extends No{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)}},F5r=class extends No{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}},L5r=class extends No{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},P5r=class extends No{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}},I5r=class extends No{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)}},R5r=class extends No{getDefault(){return ea.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)}},z5r=class extends No{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},B5r=class extends No{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}},q5r=class extends No{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},O5r=class extends No{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},N5r=class extends No{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},U5r=class extends No{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},V5r=class extends No{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)}},G5r=class extends No{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}},H5r=class extends No{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}},j5r=class extends No{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}},$5r=class extends No{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}},W5r=class extends No{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Y5r=class extends No{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},X5r=class extends No{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}},Z5r=class extends No{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}},K5r=class extends No{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}},zae=class extends No{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}},J5r=class extends zae{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}},Q5r=class extends zae{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}},e4r=class extends zae{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}},t4r=class{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 J5r(e,o),i)this.depthAttachment=n?new e4r(e,o):new Q5r(e,o);else if(n)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let r=this.depthAttachment.get();r&&e.deleteRenderbuffer(r)}e.deleteFramebuffer(this.framebuffer)}},tst=Pae([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),q0=tst.offsets;ql=class{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}};ql.Replace=[1,0],ql.disabled=new ql(ql.Replace,ea.transparent,[!1,!1,!1,!1]),ql.unblended=new ql(ql.Replace,ea.transparent,[!0,!0,!0,!0]),ql.alphaBlended=new ql([1,771],ea.transparent,[!0,!0,!0,!0]);n4r=class{constructor(e){this.gl=e,this.clearColor=new b5r(this),this.clearDepth=new w5r(this),this.clearStencil=new T5r(this),this.colorMask=new A5r(this),this.depthMask=new M5r(this),this.stencilMask=new S5r(this),this.stencilFunc=new E5r(this),this.stencilOp=new k5r(this),this.stencilTest=new C5r(this),this.depthRange=new D5r(this),this.depthTest=new F5r(this),this.depthFunc=new L5r(this),this.blend=new P5r(this),this.blendFunc=new I5r(this),this.blendColor=new R5r(this),this.blendEquation=new z5r(this),this.cullFace=new B5r(this),this.cullFaceSide=new q5r(this),this.frontFace=new O5r(this),this.program=new N5r(this),this.activeTexture=new U5r(this),this.viewport=new V5r(this),this.bindFramebuffer=new G5r(this),this.bindRenderbuffer=new H5r(this),this.bindTexture=new j5r(this),this.bindVertexBuffer=new $5r(this),this.bindElementBuffer=new W5r(this),this.bindVertexArray=new Y5r(this),this.pixelStoreUnpack=new X5r(this),this.pixelStoreUnpackPremultiplyAlpha=new Z5r(this),this.pixelStoreUnpackFlipY=new K5r(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.projectionUniformBuffer=_wr(this),this.terrainUniformBuffer=wwr(this),this.frameUniformBuffer=r4r(this)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0,this.projectionUniformBuffer.bindingDirty=!0,this.terrainUniformBuffer.bindingDirty=!0,this.frameUniformBuffer.bindingDirty=!0}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,t){return new x5r(this,e,t)}createVertexBuffer(e,t,r){return new _5r(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 t4r(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])),t!==void 0&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),r!==void 0&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func===this.gl.ALWAYS&&!e.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range))}setStencilMode(e){e.test.func===this.gl.ALWAYS&&!e.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask}))}setColorMode(e){_v(e.blendFunction,ql.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Ba=class{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}};Ba.ReadOnly=!1,Ba.ReadWrite=!0,Ba.disabled=new Ba(519,Ba.ReadOnly,[0,1]);Hne=7680,Fo=class{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}};Fo.disabled=new Fo({func:519,mask:0},0,0,Hne,Hne,Hne);Dat=1029,jne=2305,To=class{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}};To.disabled=new To(!1,Dat,jne),To.backCCW=new To(!0,Dat,jne),To.frontCCW=new To(!0,1028,jne);o4r=Qd(new Float32Array(16));zat=0;Xne=[new tr(0,0),new tr(zr,0),new tr(zr,zr),new tr(0,zr)];z4r=new ea(1,0,0,1),B4r=new ea(0,1,0,1),q4r=new ea(0,0,1,1),O4r=new ea(1,0,1,1),N4r=new ea(0,1,1,1);Q4r={symbol:s4r,circle:d4r,heatmap:p4r,line:M4r,fill:S4r,fillExtrusion:E4r,hillshade:k4r,colorRelief:D4r,raster:F4r,background:R4r,sky:Z4r,atmosphere:J4r,custom:W4r,debug:G4r,debugPadding:U4r,terrainDepth:Y4r};tTr=(u3=class{constructor(t,r){this.drawFunctions=Q4r,this.context=new n4r(t),this.transform=r,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:Qd(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=aae.maxOverzooming+aae.maxUnderzooming+1,this.depthEpsilon=1/2**16,this.crossTileSymbolIndex=new Eot}resize(t,r,i){if(this.width=Math.floor(t*i),this.height=Math.floor(r*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let n of this.style._order)this.style._layers[n].resize()}setup(){let t=this.context,r=new Pm;r.emplaceBack(0,0),r.emplaceBack(zr,0),r.emplaceBack(0,zr),r.emplaceBack(zr,zr),this.tileExtentBuffer=t.createVertexBuffer(r,l3.members),this.tileExtentSegments=Ws.simpleSegment(0,0,4,2);let i=new Pm;i.emplaceBack(0,0),i.emplaceBack(zr,0),i.emplaceBack(0,zr),i.emplaceBack(zr,zr),this.debugBuffer=t.createVertexBuffer(i,l3.members),this.debugSegments=Ws.simpleSegment(0,0,4,5);let n=new Wrt;n.emplaceBack(0,0,0,0),n.emplaceBack(zr,0,zr,0),n.emplaceBack(0,zr,0,zr),n.emplaceBack(zr,zr,zr,zr),this.rasterBoundsBuffer=t.createVertexBuffer(n,fwr.members),this.rasterBoundsSegments=Ws.simpleSegment(0,0,4,2);let a=new Pm;a.emplaceBack(0,0),a.emplaceBack(zr,0),a.emplaceBack(0,zr),a.emplaceBack(zr,zr),this.rasterBoundsBufferPosOnly=t.createVertexBuffer(a,l3.members),this.rasterBoundsSegmentsPosOnly=Ws.simpleSegment(0,0,4,5);let o=new Pm;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,l3.members),this.viewportSegments=Ws.simpleSegment(0,0,4,2);let s=new Zrt;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(s);let l=new Mv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(l);let u=this.context.gl;this.stencilClearMode=new Fo({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO),this.tileExtentMesh=new M8(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=Em();wv(i,0,this.width,this.height,0,0,1),Rc(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let n={mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(t,r.TRIANGLES,Ba.disabled,this.stencilClearMode,ql.disabled,To.disabled,null,null,n,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(t,r,i){if(this.currentStencilSource===t.source||!t.isTileClipped()||!(r!=null&&r.length))return;this.currentStencilSource=t.source,this.nextStencilID+r.length>256&&this.clearStencil();let n=this.context;n.setColorMode(ql.disabled),n.setDepthMode(Ba.disabled);let a={};for(let o of r)a[o.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(a,r,i,!0),this._renderTileMasks(a,r,i,!1),this._tileClippingMaskIDs=a}_renderTileMasks(t,r,i,n){let a=this.context,o=a.gl,s=this.style.projection,l=this.transform,u=this.useProgram("clippingMask");for(let c of r){let f=t[c.key],h=this.getTerrainDataForTile(c,i),d=s.getMeshFromTileID(this.context,c.canonical,n,!0,"stencil"),p=l.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!i,applyTerrainMatrix:!0});u.draw(a,o.TRIANGLES,Ba.disabled,new Fo({func:o.ALWAYS,mask:0},f,255,o.KEEP,o.KEEP,o.REPLACE),ql.disabled,i?To.disabled:To.backCCW,null,h,p,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}getTerrainDataForTile(t,r){var i,n;return r&&((i=this.style.projection)==null?void 0:i.name)==="mercator"?null:((n=this.style.map.terrain)==null?void 0:n.getTerrainData(t))||null}_renderTilesDepthBuffer(){var l;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D(),s=ZT(n,{tileSize:n.tileSize});for(let u of s){let c=(l=this.style.map.terrain)==null?void 0:l.getTerrainData(u),f=i.getMeshFromTileID(this.context,u.canonical,!0,!0,"raster"),h=n.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(t,r.TRIANGLES,o,Fo.disabled,ql.disabled,To.backCCW,null,c,h,"$clipping",f.vertexBuffer,f.indexBuffer,f.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let t=this.nextStencilID++,r=this.context.gl;return new Fo({func:r.NOTEQUAL,mask:255},t,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(t){let r=this.context.gl;return new Fo({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){let r=this.context.gl,i=t.sort((o,s)=>s.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();let o={};for(let s=0;ss.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(this.clearStencil(),a>1){let o={},s={};for(let l=0;l=0;i.currentLayer--){let h=this.style._layers[n[i.currentLayer]];if(h.isHidden(this.transform.zoom))continue;let d=a[h.source],p=o[h.source];this.renderTileClippingMasks(h,p,!1),this.renderLayer(this,d,h,p,i)}i.currentPass="translucent";let u=!1;for(i.currentLayer=0;i.currentLayer0?r.pop():null}acquireRTT(t){let r=this.context.gl,i=this._rttObjectRecyclePool.pop();if(i)return i.size!==t&&(i.texture.update({width:t,height:t,data:null},{premultiply:!1,useMipmap:!0}),i.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),i.size=t),i;let n=new vu(this.context,{width:t,height:t,data:null},r.RGBA,{premultiply:!1,useMipmap:!0});return n.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:n,size:t}}bindRTT(t){let r=this.context.gl,i=t.size;if(!this._rttSharedFbo){let n=this.context.createFramebuffer(i,i,!0,!0),a=this.context.createRenderbuffer(r.DEPTH_STENCIL,i,i);n.depthAttachment.set(a),this._rttSharedFbo={fbo:n,depthRenderbuffer:a,size:i}}this._rttSharedFbo.size!==i&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,i,i),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=i,this._rttSharedFbo.fbo.height=i,this._rttSharedFbo.size=i),this._rttSharedFbo.fbo.colorAttachment.set(t.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(t){this._rttObjectRecyclePool.push(t)}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;let r=this.patternAtlas.getPattern(t.from.toString()),i=this.patternAtlas.getPattern(t.to.toString());return!r||!i}useProgram(t,r,i=!1,n=[]){var v;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=i?tg.projectionMercator:o.shaderPreludeCode,l=i?kot:o.shaderDefine,u=`/${i?Cot:o.shaderVariantName}`,c=r?r.cacheKey:"",f=this._showOverdrawInspector?"/overdraw":"",h=a?"/terrain":"",d=n?`/${n.join("/")}`:"",p=t+c+u+f+h+d;return(v=this.cache)[p]||(v[p]=new Mwr(this.context,tg[t],r,y5r[t],this._showOverdrawInspector,a,s,l,n)),this.cache[p]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let t=this.context.gl;this.debugOverlayTexture=new vu(this.context,this.debugOverlayCanvas,t.RGBA)}}destroy(){var t,r,i;if(this._tileTextures){for(let n in this._tileTextures){let a=this._tileTextures[n];if(a)for(let o of a)o.destroy()}this._tileTextures={}}for(let n of this._rttObjectRecyclePool)n.texture.destroy();if(this._rttObjectRecyclePool=[],this._rttSharedFbo){this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let n=this.context.gl;n.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),n.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}if((t=this.layerOpacityFbo)==null||t.destroy(),this.layerOpacityFbo=null,this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((r=this.tileExtentMesh.vertexBuffer)==null||r.destroy()),this.tileExtentMesh&&((i=this.tileExtentMesh.indexBuffer)==null||i.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.context.projectionUniformBuffer.destroy(),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let n in this.cache){let a=this.cache[n];a!=null&&a.program&&this.context.gl.deleteProgram(a.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:t,drawingBufferHeight:r}=this.context.gl;return this.width!==t||this.height!==r}},u3.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,u3),cst=class extends Error{constructor(e,t){var r;super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=(r=t==null?void 0:t.statusMessage)!=null?r:null}};hst=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{var r;let t=this._getHashParams();return this._hashName?(t.get(this._hashName)||"").split("/"):((r=[...t.keys()][0])!=null?r:"").split("/")},this._onHashChange=()=>{let t=this._getCurrentHash();if(!this._isValidHash(t))return!1;let r=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:r,pitch:+(t[4]||0)}),!0},this._updateHashUnthrottled=()=>{let t=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,t)},this._removeHash=()=>{let t=this._getHashParams();if(this._hashName)t.delete(this._hashName);else{let a=Array.from(t.keys());a.length>0&&t.delete(a[0])}let r=decodeURIComponent(t.toString()).replace(/=&/g,"&").replace(/=$/g,""),i=r?`#${r}`:"",n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=fst(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(this._map.getZoom()*100)/100,i=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(o*10)/10}`),s&&(l+=`/${Math.round(s)}`),this._hashName){let u=this._getHashParams();return u.set(this._hashName,l),`#${decodeURIComponent(u.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(n=>isNaN(+n)))return!1;try{new mn(+e[2],+e[1])}catch(n){return!1}let t=+e[0],r=+(e[3]||0),i=+(e[4]||0);return t>=this._map.getMinZoom()&&t<=this._map.getMaxZoom()&&r>=-180&&r<=180&&i>=this._map.getMinPitch()&&i<=this._map.getMaxPitch()}},S8={linearity:.3,easing:dB(0,0,.3,1)},rTr=ln({deceleration:2500,maxSpeed:1400},S8),iTr=ln({deceleration:20,maxSpeed:1400},S8),nTr=ln({deceleration:1e3,maxSpeed:360},S8),aTr=ln({deceleration:1e3,maxSpeed:90},S8),oTr=ln({deceleration:1e3,maxSpeed:360},S8),sTr=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:Oo(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=Oo();for(;e.length>0&&t-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,t=Oo()-60,r=Math.max(0,e.length-2);for(;r>0&&e[r-1].time>=t;)r--;return e.slice(r)}_onMoveEnd(e){this._drainInertiaBuffer();let t=this._getVelocityEntries();if(t.length<2){this.clear();return}let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new tr(0,0),pinchAround:void 0,around:void 0};for(let{settings:a}of t)a.around&&(r.around=a.around),a.pinchAround&&(r.pinchAround=a.pinchAround);for(let{settings:a}of t.slice(1))r.zoom+=a.zoomDelta||0,r.bearing+=a.bearingDelta||0,r.pitch+=a.pitchDelta||0,r.roll+=a.rollDelta||0,a.panDelta&&r.pan._add(a.panDelta);if(!r.pan.mag()&&!r.zoom&&!r.bearing&&!r.pitch&&!r.roll){this.clear();return}let i=Oo()-t[0].time,n={};if(r.pan.mag()){let a=y8(r.pan.mag(),i,ln({},rTr,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map._camera.cameraHelper.handlePanInertia(o,this._map._camera.transform);n.center=s.easingCenter,n.offset=s.easingOffset,m8(n,a)}if(r.zoom){let a=y8(r.zoom,i,iTr);n.zoom=Jh(this._map.getZoom()+a.amount,this._map.getZoomSnap(),a.amount),m8(n,a)}if(r.bearing){let a=y8(r.bearing,i,nTr);n.bearing=this._map.getBearing()+Jn(a.amount,-179,179),m8(n,a)}if(r.pitch){let a=y8(r.pitch,i,aTr);n.pitch=this._map.getPitch()+a.amount,m8(n,a)}if(r.roll){let a=y8(r.roll,i,oTr);n.roll=this._map.getRoll()+Jn(a.amount,-179,179),m8(n,a)}if(n.zoom||n.bearing){let a=r.pinchAround===void 0?r.around:r.pinchAround;n.around=a?this._map.unproject(a):this._map.getCenter()}return this.clear(),ln(n,{noMoveStart:!0})}};lTr=class{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Xat(this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new O0(e.type,this._map,e))}mouseup(e){this._map.fire(new O0(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new O0(e.type,this._map,e))}dblclick(e){return this._firePreventable(new O0(e.type,this._map,e))}mouseover(e){this._map.fire(new O0(e.type,this._map,e))}mouseout(e){this._map.fire(new O0(e.type,this._map,e))}touchstart(e){return this._firePreventable(new b8(e.type,this._map,e))}touchmove(e){this._map.fire(new b8(e.type,this._map,e))}touchend(e){this._map.fire(new b8(e.type,this._map,e))}touchcancel(e){this._map.fire(new b8(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},uTr=class{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new O0(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new O0("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new O0(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},dst=class{constructor(e,t,r){this._map=e,this._tr=r,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&typeof t.boxZoom=="object"&&(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&&e.button===0&&($n.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let r=t;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)n.fitScreenCoordinates(r,i,this._tr.bearing,{linear:!0})}}}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box=(this._box.remove(),null)),$n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,t){return this._map.fire(new eae(e,{originalEvent:t}))}};fTr=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,t,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=cTr(t),this.touches=dae(r,t)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=dae(r,t);for(let n in this.touches){let a=this.touches[n],o=i[n];(!o||o.dist(a)>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),r.length===0){let i=!this.aborted&&this.centroid;if(this.reset(),i)return i}}},pae=class{constructor(e){this.singleTap=new fTr(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 n=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(i)<30;if((!n||!a)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}},hTr=class{constructor(e,t){this._tr=t,this._zoomIn=new pae({numTouches:1,numTaps:2}),this._zoomOut=new pae({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,t,r){let i=this._zoomIn.touchend(e,t,r),n=this._zoomOut.touchend(e,t,r),a=this._tr;if(i)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:Jh(a.zoom+1,o.getZoomSnap()),around:a.unproject(i)},{originalEvent:e})};if(n)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:Jh(a.zoom-1,o.getZoomSnap()),around:a.unproject(n)},{originalEvent:e})}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},E8=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let 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)){this.reset(e);return}let i=Array.isArray(t)?t[0]:t;if(!(!this._moved&&i.dist(r)!0}),t=new vTr){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){if(e instanceof MouseEvent)return t(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent)return r(e)}startMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.startMove(t)},t=>{this.oneFingerTouchMoveStateManager.startMove(t)})}endMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.endMove(t)},t=>{this.oneFingerTouchMoveStateManager.endMove(t)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidStartEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidStartEvent(t))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidMoveEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(t))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidEndEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidEndEvent(t))}},Fq=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=t=>{t.preventDefault()}};bTr=class{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new tr(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)){this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);return}return e.preventDefault(),this._calculateTransform(e,t,r)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,t,r){r.length>0&&(this._active=!0);let i=dae(r,t),n=new tr(0,0),a=new tr(0,0),o=0;for(let l in i){let u=i[l],c=this._touches[l];c&&(n._add(u),a._add(u.sub(c)),o++,i[l]=u)}if(this._touches=i,this._shouldBePrevented(o)||!a.mag())return;let s=a.div(o);if(this._sum._add(s),!(this._sum.mag()=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return this._firstMove===void 0&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return Zne(e)&&Zne(t)&&a}},wTr={panStep:100,bearingStep:15,pitchStep:10},mst=class{constructor(e,t){this._tr=t;let r=wTr;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,i=0,n=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),n=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),n=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,i=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:TTr,zoom:t?Jh(s.zoom+t*(e.shiftKey?2:1),o.getZoomSnap()):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+i*this._pitchStep,offset:[-n*this._panStep,-a*this._panStep],center:s.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}};Vat=4.000244140625,yst=class{constructor(e,t,r){this._onTimeout=i=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},this._map=e,this._tr=r,this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return this._map.cooperativeGestures.isEnabled()?!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e)):!1}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e)){this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);return}let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*40:e.deltaY,r=Oo(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,t!==0&&t%Vat==0?this._type="wheel":t!==0&&Math.abs(t)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*t)<200?"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 t=$n.mousePos(this._map.getCanvas(),e),r=this._tr;this._aroundPoint=this._aroundCenter?r.transform.locationToScreenPoint(mn.convert(r.center)):t,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let o=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=o),typeof this._targetZoom=="number"&&(this._targetZoom+=o)}if(this._delta!==0){let o=this._type==="wheel"&&Math.abs(this._delta)>Vat?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*o)));this._delta<0&&s!==0&&(s=1/s);let l=typeof this._targetZoom=="number"?If(this._targetZoom):e.scale,u=e.applyConstrain(e.getCameraLngLat(),zc(l*s)).zoom,c=this._map.getZoomSnap();if(this._type==="wheel"&&c>0){let f=Jh(e.zoom,c);this._targetZoom=Jh(u,c,u-f)}else this._targetZoom=u;this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let t=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,r=this._startZoom,i=this._easing,n=!1,a;if(this._type==="wheel"&&r&&i){let o=Oo()-this._lastWheelEventTime,s=Math.min((o+5)/200,1),l=i(s);a=$s.number(r,t,l),s<1?this._needsRerender=!0:n=!0}else a=t,n=!0;return this._active=!0,n&&(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:!n,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let t=pB;if(this._prevEase){let r=this._prevEase,i=(Oo()-r.start)/r.duration,n=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);t=dB(a,o,.25,1)}return this._prevEase={start:Oo(),duration:e,easing:t},t}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},xst=class{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()}},ATr=class{constructor(e,t){this._tr=t,this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:Jh(this._tr.zoom+(e.shiftKey?-1:1),r.getZoomSnap()),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},MTr=class{constructor(){this._tap=new pae({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e!=null?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)this._tap.touchstart(e,t,r);else{let i=t[0],n=e.timeStamp-this._tapTime<500,a=this._tapPoint.dist(i)<30;!n||!a?this.reset():r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier)}}touchmove(e,t,r){if(!this._tapTime)this._tap.touchmove(e,t,r);else 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}}}touchend(e,t,r){if(this._tapTime)this._swipePoint&&r.length===0&&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}},_st=class{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()}},bst=class{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()}},wst=class{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()}},Tst=class{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=$n.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(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,t){this._enabled&&(this._map.fire(new cc("cooperativegestureprevented",{gestureType:e,originalEvent:t})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},STr=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(tr.convert(e),this._camera.terrain)}},hq=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate,ETr=class extends e0{};kTr=class{get _ownerDocument(){var e;return((e=this._el)==null?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return((t=(e=this._el)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e,t,r){this._terrainGestureAnchorElevation=null,this.handleWindowEvent=n=>{this.handleEvent(n,`${n.type}Window`)},this.handleEvent=(n,a)=>{if(n.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;let o=n.type==="renderFrame"?void 0:n,s={needsRenderFrame:!1},l={},u={};for(let{handlerName:h,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let v;if(this._blockedByActive(u,p,h))d.reset();else if(d[a||n.type]){if(ott(n,a||n.type)){let m=$n.mousePos(this._map.getCanvas(),n);v=d[a||n.type](n,m)}else if(att(n,a||n.type)){let m=n.touches,g=this._getMapTouches(m),w=$n.touchPos(this._map.getCanvas(),g);v=d[a||n.type](n,w,g)}else stt(a||n.type)||(v=d[a||n.type](n));this.mergeHandlerResult(s,l,v,h,o),v!=null&&v.needsRenderFrame&&this._triggerRenderFrame()}(v||d.isActive())&&(u[h]=d)}let c={};for(let h in this._previousActiveHandlers)u[h]||(c[h]=o);this._previousActiveHandlers=u,(Object.keys(c).length||Kne(s))&&(this._changes.push([s,l,c]),this._triggerRenderFrame()),(Object.keys(u).length||Kne(s))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:f}=s;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))},this._map=e,this._camera=t,this._transformProvider=new STr(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new sTr(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;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]];for(let[n,a,o]of this._listeners)n.addEventListener(a,n===this._ownerDocument?this.handleWindowEvent:this.handleEvent,o)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new lTr(t,e));let i=t.boxZoom=new dst(t,e,this._transformProvider);this._add("boxZoom",i),e.interactive&&e.boxZoom&&i.enable();let n=t.cooperativeGestures=new Tst(t,e.cooperativeGestures);this._add("cooperativeGestures",n),e.cooperativeGestures&&n.enable();let a=new hTr(t,this._transformProvider),o=new ATr(t,this._transformProvider);t.doubleClickZoom=new xst(o,a),this._add("tapZoom",a),this._add("clickZoom",o),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let s=new MTr;this._add("tapDragZoom",s);let l=t.touchPitch=new gst(t);this._add("touchPitch",l),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let u=()=>t.project(t.getCenter()),c=yTr(e,u),f=xTr(e),h=_Tr(e,u);t.dragRotate=new bst(e,c,f,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",f,["mouseRotate","mouseRoll"]),this._add("mouseRoll",h,["mousePitch"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let d=mTr(e),p=new bTr(e,t);t.dragPan=new _st(r,d,p),this._add("mousePan",d),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let v=new vst,m=new pst;t.touchZoomRotate=new wst(r,m,v,s),this._add("touchRotate",v,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new uTr(t));let g=t.scrollZoom=new yst(t,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let w=t.keyboard=new mst(t,this._transformProvider);this._add("keyboard",w),e.interactive&&e.keyboard&&t.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:t}of this._handlers)t.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!!hq(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!(t!=null&&t.includes(i)))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e){let i=r.target;this._el.contains(i)&&t.push(r)}return t}mergeHandlerResult(e,t,r,i,n){if(!r)return;ln(e,r);let a={handlerName:i,originalEvent:r.originalEvent||n};r.zoomDelta!==void 0&&(t.zoom=a),r.panDelta!==void 0&&(t.drag=a),r.rollDelta!==void 0&&(t.roll=a),r.pitchDelta!==void 0&&(t.pitch=a),r.bearingDelta!==void 0&&(t.rotate=a)}_applyChanges(){let e={},t={},r={};for(let[i,n,a]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new tr(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),i.rollDelta&&(e.rollDelta=(e.rollDelta||0)+i.rollDelta),i.around!==void 0&&(e.around=i.around),i.pinchAround!==void 0&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),ln(t,n),ln(r,a);this._updateMapTransform(e,t,r),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=this._camera.getTransformForUpdate(),a=i.terrain;if(!Kne(e)&&!(a&&this._terrainMovement)){this._fireEvents(t,r,!0);return}this._camera.stop(!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:u,rollDelta:c}=e,{around:f,aroundOnSurface:h}=this._resolveAround(e,a,n),d=a?this._terrainGestureElevation(a,f,h,n,t):void 0,p={panDelta:o,zoomDelta:s,rollDelta:c,pitchDelta:u,bearingDelta:l,around:f,aroundElevation:d};this._camera.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(f)&&(f=n.centerPoint);let v=this._computePreZoomAroundLoc(n,f,o,d);this._handleMapControls({terrain:a,tr:n,deltasForHelper:p,preZoomAroundLoc:v,combinedEventsInProgress:t,panDelta:o}),this._camera.applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_resolveAround(e,t,r){let i=e.pinchAround===void 0?e.around:e.pinchAround;return i||(i=this._camera.transform.centerPoint),t&&!r.isPointOnMapSurface(i)?{around:r.centerPoint,aroundOnSurface:!1}:{around:i,aroundOnSurface:!0}}_terrainGestureElevation(e,t,r,i,n){if(!r)return;if(!this._terrainMovement&&(n.drag||n.zoom)){let o=i.screenTerrainPointToMercatorCoordinate(t,e);this._terrainGestureAnchorElevation=o?o.z:null}if(this._terrainGestureAnchorElevation===null)return;let a=this._terrainGestureAnchorElevation;if(!(t.distSqr(i.centerPoint)<.01)&&!(a-i.elevation>=.9*(i.getCameraAltitude()-i.elevation)))return a}_computePreZoomAroundLoc(e,t,r,i){if(t.distSqr(e.centerPoint)<.01)return e.center;let n=r?t.sub(r):t;return i===void 0?e.screenPointToLocation(n):e.screenPointToLocationAtElevation(n,i)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._camera.cameraHelper;if(o.handleMapControlsRollPitchBearingZoom(r,t),!e){o.handleMapControlsPan(r,t,i);return}if(o.useGlobeControls){!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._camera.elevationFreeze=!0),o.handleMapControlsPan(r,t,i);return}if(!this._terrainMovement&&(n.drag||n.zoom)){this._terrainMovement=!0,this._camera.elevationFreeze=!0,o.handleMapControlsPan(r,t,i);return}if(r.aroundElevation===void 0&&n.drag&&this._terrainMovement&&a){t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));return}o.handleMapControlsPan(r,t,i)}_fireEvents(e,t,r){let i=hq(this._eventsInProgress),n=hq(e),a={};for(let c in e){let{originalEvent:f}=e[c];this._eventsInProgress[c]||(a[`${c}start`]=f),this._eventsInProgress[c]=e[c]}!i&&n&&this._fireEvent("movestart",n.originalEvent);for(let c in a)this._fireEvent(c,a[c]);n&&this._fireEvent("move",n.originalEvent);for(let c in e){let{originalEvent:f}=e[c];this._fireEvent(c,f)}let o={},s;for(let c in this._eventsInProgress){let{handlerName:f,originalEvent:h}=this._eventsInProgress[c];this._handlersById[f].isActive()||(delete this._eventsInProgress[c],s=t[f]||h,o[`${c}end`]=s)}for(let c in o)this._fireEvent(c,o[c]);let l=hq(this._eventsInProgress),u=(i||n)&&!l;if(u&&this._terrainMovement){this._camera.elevationFreeze=!1,this._terrainMovement=!1,this._terrainGestureAnchorElevation=null;let c=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&c.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(c)}if(r&&u){this._updatingCamera=!0;let c=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),f=h=>h!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new ETr("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}},CTr=class extends mu{constructor(e){var t,r,i;super(),this._renderFrameCallback=()=>{let n=Math.min((Oo()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new Tq,this.cameraHelper=new Aq,e.minZoom!==void 0&&this.transform.setMinZoom(e.minZoom),e.maxZoom!==void 0&&this.transform.setMaxZoom(e.maxZoom),e.minPitch!==void 0&&this.transform.setMinPitch(e.minPitch),e.maxPitch!==void 0&&this.transform.setMaxPitch(e.maxPitch),e.renderWorldCopies!==void 0&&this.transform.setRenderWorldCopies(e.renderWorldCopies),e.transformConstrain!==null&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=(t=e.centerClampedToGround)!=null?t:!0,this.transformCameraUpdate=(r=e.transformCameraUpdate)!=null?r:null,this._stopHandlers=(i=e.stopHandlers)!=null?i:(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){if(e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t,this._requestedCameraState){let r=e.clone();r.apply(this._requestedCameraState,!0),this._requestedCameraState=r}}getCenter(){return new mn(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,t,r){return e=tr.convert(e).mult(-1),this.panTo(this.transform.center,ln({offset:e},t),r)}panTo(e,t,r){return this.easeTo(ln({center:e},t),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,t,r){return this.easeTo(ln({zoom:e},t),r)}zoomIn(e,t){return this.zoomTo(Jh(this.getZoom()+1,this._zoomSnap),e,t),this}zoomOut(e,t){return this.zoomTo(Jh(this.getZoom()-1,this._zoomSnap),e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,t){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new Mn("movestart",t)).fire(new Mn("move",t)).fire(new Mn("moveend",t))),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,t,r){return this.easeTo(ln({bearing:e},t),r)}resetNorth(e,t){return this.rotateTo(0,ln({duration:1e3},e),t),this}resetNorthPitch(e,t){return this.easeTo(ln({bearing:0,pitch:0,roll:0,duration:1e3},e),t),this}snapToNorth(e,t){return Math.abs(this.getBearing()){p.easeFunc(v),this.terrain&&!e.freezeElevation&&this._updateElevation(v),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},v=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t,v)},e),this}_prepareEase(e,t,r={}){this._moving=!0,!t&&!r.moving&&this.fire(new Mn("movestart",e)),this._zooming&&!r.zooming&&this.fire(new Mn("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new Mn("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new Mn("pitchstart",e)),this._rolling&&!r.rolling&&this.fire(new Mn("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,this.transform),this.elevationFreeze=!0}_updateElevation(e){(this._elevationStart===void 0||this._elevationCenter===void 0)&&this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let t=this.terrain.getElevationForLngLat(this._elevationCenter,this.transform);if(e<1&&t!==this._elevationTarget){let r=this._elevationTarget-this._elevationStart,i=(t-(r*e+this._elevationStart))/(1-e);this._elevationStart+=e*(r-i),this._elevationTarget=t}this.transform.setElevation($s.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}getTransformForUpdate(){return!this.transformCameraUpdate&&!this.terrain?this.transform:(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState)}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(rthis._elevateCameraIfInsideTerrain(i)),this.transformCameraUpdate&&t.push(i=>this.transformCameraUpdate(i)),!t.length)return;let r=e.clone();for(let i of t){let n=r.clone(),{center:a,zoom:o,roll:s,pitch:l,bearing:u,elevation:c}=i(n);a&&n.setCenter(a),c!==void 0&&n.setElevation(c),o!==void 0&&n.setZoom(o),s!==void 0&&n.setRoll(s),l!==void 0&&n.setPitch(l),u!==void 0&&n.setBearing(u),r.apply(n,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new Mn("move",e)),this._zooming&&this.fire(new Mn("zoom",e)),this._rotating&&this.fire(new Mn("rotate",e)),this._pitching&&this.fire(new Mn("pitch",e)),this._rolling&&this.fire(new Mn("roll",e))}_afterEase(e,t){if(this._easeId&&t&&this._easeId===t)return;delete this._easeId;let r=this._zooming,i=this._rotating,n=this._pitching,a=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,r&&this.fire(new Mn("zoomend",e)),i&&this.fire(new Mn("rotateend",e)),n&&this.fire(new Mn("pitchend",e)),a&&this.fire(new Mn("rollend",e)),this.fire(new Mn("moveend",e))}flyTo(e,t){if(!e.essential&&fh.prefersReducedMotion){let k=IT(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(k,t)}this.stop(),e=ln({offset:[0,0],speed:1.2,curve:1.42,easing:pB},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=Jh(e.zoom,this._zoomSnap));let r=this.getTransformForUpdate(),i=r.bearing,n=r.pitch,a=r.roll,o=r.padding,s=e.bearing===void 0?i:this._normalizeBearing(e.bearing,i),l=e.pitch===void 0?n:+e.pitch,u=e.roll===void 0?a:this._normalizeBearing(e.roll,a),c=e.padding===void 0?r.padding:e.padding,f=tr.convert(e.offset),h=r.centerPoint.add(f),d=r.screenPointToLocation(h),p=this.cameraHelper.handleFlyTo(r,{bearing:s,pitch:l,roll:u,padding:c,locationAtOffset:d,offsetAsPoint:f,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),v=e.curve,m=Math.max(r.width,r.height),g=m/p.scaleOfZoom,w=p.pixelPathLength,b=m/p.scaleOfMinZoom;v=Math.min(v,Math.sqrt(b/w*2));let _=v*v;function M(k){let D=(g*g-m*m+(k?-1:1)*_*_*w*w)/(2*(k?g:m)*_*w);return Math.log(Math.sqrt(D*D+1)-D)}function x(k){return(Math.exp(k)-Math.exp(-k))/2}function T(k){return(Math.exp(k)+Math.exp(-k))/2}function A(k){return x(k)/T(k)}let y=M(!1),E=function(k){return T(y)/T(y+v*k)},S=function(k){return m*((T(y)*A(y+v*k)-x(y))/_)/w},C=(M(!0)-y)/v;if(Math.abs(w)<2e-6||!isFinite(C)){if(Math.abs(m-g)<1e-6)return this.easeTo(e,t);let k=g0,E=D=>Math.exp(k*v*D)}if(e.duration!==void 0)e.duration=+e.duration;else{let k=e.screenSpeed===void 0?+e.speed:+e.screenSpeed/v;e.duration=1e3*C/k}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=i!==s,this._pitching=l!==n,this._rolling=u!==a,this._padding=!r.isPaddingEqual(c),this._prepareEase(t,!1),this.terrain&&this._prepareElevation(p.targetCenter),this._ease(k=>{let D=k*C,F=1/E(D),P=S(D);this._rotating&&r.setBearing($s.number(i,s,k)),this._pitching&&r.setPitch($s.number(n,l,k)),this._rolling&&r.setRoll($s.number(a,u,k)),this._padding&&(r.interpolatePadding(o,c,k),h=r.centerPoint.add(f)),p.easeFunc(k,F,P,h),this.terrain&&!e.freezeElevation&&this._updateElevation(k),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}return e||this._stopHandlers(),this}_ease(e,t,r){r.animate===!1||r.duration===0?(e(1),t()):(this._easeStart=Oo(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,t){e=B0(e,-180,180);let r=Math.abs(e-t);return Math.abs(e-360-t)MapLibre'},Mst=class{constructor(e=Ast){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=t=>{t&&(t.type==="terrain"||t.dataType==="style"||t.dataType==="source"&&(t.sourceDataType==="metadata"||t.sourceDataType==="visibility"))&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):!this._container.classList.contains("maplibregl-compact")&&!this._container.classList.contains("maplibregl-attrib-empty")&&(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=$n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=$n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=$n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){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(i=>typeof i=="string"?i:"")):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let i=this._map.style.stylesheet;this.styleOwner=i.owner,this.styleId=i.id}let t=this._map.style.tileManagers;for(let i in t){let n=t[i];if(n.used||n.usedForTerrain){let a=n.getSource();a.attribution&&!e.includes(a.attribution)&&e.push(a.attribution)}}e=e.filter(i=>String(i).trim()),e.sort((i,n)=>i.length-n.length),e=e.filter((i,n)=>{for(let a=n+1;a{let t=this._container.children;if(t.length){let r=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&r.classList.add("maplibregl-compact"):r.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var r;this._map=e,this._compact=(r=this.options)==null?void 0:r.compact,this._container=$n.create("div","maplibregl-ctrl");let t=$n.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}},DTr=class{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,r=t?this._queue.concat(t):this._queue;for(let i of r)if(i.id===e){i.cancelled=!0;return}}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];let r=!1,i;for(let n of t)if(!n.cancelled){try{n.callback(e)}catch(a){r||(r=!0,i=a)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,r)throw i}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},Gat=["none","zoom","sourceTiles","visibleLayers","revision"],FTr=class{constructor(e,t,r,i){this._tileKeys=e.map(n=>n.key).sort().join(),this._revision=t,this._zoom=r,this._visibleLayerIds=i}difference(e){return this._revision===(e==null?void 0:e._revision)?this._visibleLayerIds===e._visibleLayerIds?this._tileKeys===e._tileKeys?this._zoom===e._zoom?"none":"zoom":"sourceTiles":"visibleLayers":"revision"}},jT={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0},LTr=class{constructor(e,t){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=t,this.rttSize=t.tileManager.tileSize*t.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}prepareForRender(e,t){let r=t!==this._lastPrepareZoom;this._lastPrepareZoom=t,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(s=>!e._layers[s].isHidden(t));let i=this._renderableLayerIds.join(),n=new Set;for(let s of this._renderableLayerIds){let l=e._layers[s],u=l.source;u&&jT[l.type]&&n.add(u)}this._coordsAscending={},this._rttFingerprints={};for(let s of n){let l=e.tileManagers[s];if(!l)continue;this._coordsAscending[s]={};let u=this._coordsAscending[s],c=l.getSource(),f=c instanceof XT?c.terrainTileRanges:null;for(let p of l.getVisibleCoordinates()){let v=this.terrain.tileManager.getTerrainCoords(p,f);for(let m in v)u[m]||(u[m]=[]),u[m].push(v[m])}this._rttFingerprints[s]={};let h=this._rttFingerprints[s],d=l.getState().revision;for(let p in u)h[p]=new FTr(u[p],d,t,i)}this.needsFollowUpFrame=!1;let a=r||this.painter.options.moving,o=!1;for(let s of this._renderableTiles){let l=this._textureDifference(s);l!=="none"&&(l==="zoom"&&a||l==="visibleLayers"&&r?this.needsFollowUpFrame=!0:l==="zoom"||l==="sourceTiles"?(o?this.needsFollowUpFrame=!0:s.releaseRTT(this.painter),o=!0):s.releaseRTT(this.painter))}}_textureDifference(e){let t="none";for(let r in this._rttFingerprints){let i=this._rttFingerprints[r][e.tileID.key];if(!i)continue;let n=i.difference(e.rttFingerprint[r]);Gat.indexOf(n)>Gat.indexOf(t)&&(t=n)}return t}renderLayer(e,t){if(e.isHidden(this.painter.transform.zoom))return!1;let r=ma(fn({},t),{isRenderingToTexture:!0}),i=e.type,n=this.painter,a=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(jT[i]&&((!this._prevType||!jT[this._prevType])&&this._stacks.push([]),this._prevType=i,this._stacks[this._stacks.length-1].push(e.id),!a))return!0;if(jT[this._prevType]||jT[i]&&a){this._prevType=i;let o=this._stacks.length-1,s=this._stacks[o]||[];for(let l of this._renderableTiles){if(this._rttTiles.push(l),l.getRTT(o))continue;let u=l.acquireRTT(n,o,this.rttSize);n.bindRTT(u),n.context.clear({color:ea.transparent,stencil:0}),n.currentStencilSource=void 0;for(let c of s){let f=n.style._layers[c],h=f.source?this._coordsAscending[f.source][l.tileID.key]:[l.tileID];n.context.viewport.set([0,0,this.rttSize,this.rttSize]),n.renderTileClippingMasks(f,h,!0),n.renderLayer(n,n.style.tileManagers[f.source],f,h,r),f.source&&(l.rttFingerprint[f.source]=this._rttFingerprints[f.source][l.tileID.key])}u.texture.generateMipmap()}return X4r(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],jT[i]}return!1}},PTr={"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"},ITr=Wat,Hat={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:Ast,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:Qh.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20},RTr=class extends mu{get _ownerWindow(){var e,t;return((t=(e=this._container)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e){var n,a,o;super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new DTr,this._controls=[],this._mapId=_ie(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=s=>{if(s.preventDefault(),this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),!this.style){this.fire(new pq("webglcontextlost",{originalEvent:s}));return}for(let l of Object.values(this.style._layers))if(l.type==="custom"&&console.warn(`Custom layer with id '${l.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),l._listeners)for(let[u]of Object.entries(l._listeners))console.warn(`Custom layer with id '${l.id}' had event listeners for event '${u}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new pq("webglcontextlost",{originalEvent:s}))},this._contextRestored=s=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let l in this._lostContextStyle.images){let u=this._lostContextStyle.images[l];u.isWebGLImage&&this.style.imageManager.updateImage(l,u,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(l){this.fire(new An(l));return}this.resize(),this._update(),this._resizeInternal(),this.fire(new pq("webglcontextrestored",{originalEvent:s}))},this._onMapScroll=s=>{if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let t=ma(fn(fn({},Hat),e),{canvasContextAttributes:fn(fn({},Hat.canvasContextAttributes),e.canvasContextAttributes)});if(t.minZoom!=null&&t.maxZoom!=null&&t.minZoom>t.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(t.minPitch!=null&&t.maxPitch!=null&&t.minPitch>t.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(t.minPitch!=null&&t.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(t.maxPitch!=null&&t.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new CTr({minZoom:t.minZoom,maxZoom:t.maxZoom,minPitch:t.minPitch,maxPitch:t.maxPitch,bearingSnap:t.bearingSnap,zoomSnap:t.zoomSnap,renderWorldCopies:t.renderWorldCopies,centerClampedToGround:t.centerClampedToGround,terrain:this.terrain,transformConstrain:t.transformConstrain,requestRenderFrame:s=>this._requestRenderFrame(s),cancelRenderFrame:s=>this._cancelRenderFrame(s),transformCameraUpdate:t.transformCameraUpdate,stopHandlers:()=>{var s;return(s=this._handlers)==null?void 0:s.stop(!1)}}),this._camera.setEventedParent(this),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._canvasContextAttributes=fn({},t.canvasContextAttributes),this._trackResize=t.trackResize===!0,this._terrainSkirtLength=t.terrainSkirtLength,this._refreshExpiredTiles=t.refreshExpiredTiles===!0,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions===!0,this._collectResourceTiming=t.collectResourceTiming===!0,this._locale=fn(fn({},PTr),t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this._zoomLevelsToOverscale=t.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=t.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(t.anisotropicFilterPitch),t.reduceMotion!==void 0&&(fh.prefersReducedMotion=t.reduceMotion),this._requestManager=new B_r(t.transformRequest),this._container=this._resolveContainer(t.container),t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer();try{this._setupPainter()}catch(s){throw this._cleanupContainer(),s}this._imageQueueHandle=rg.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new kTr(this,this._camera,t),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let r=typeof t.hash=="string"&&t.hash||void 0;this._hash=t.hash?new hst(r).addTo(this):void 0,(n=this._hash)!=null&&n._onHashChange()||(this.jumpTo({center:t.center,elevation:t.elevation,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch,roll:t.roll}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,ln({},t.fitBoundsOptions,{duration:0}))));let i=typeof t.style=="string"||((o=(a=t.style)==null?void 0:a.projection)==null?void 0:o.type)!=="globe";this.resize(null,i),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Mst(typeof t.attributionControl=="boolean"?void 0:t.attributionControl)),t.maplibreLogo&&this.addControl(new Sst,t.logoPosition),this.on("style.load",()=>{if(i||this._resizeTransform(),this._camera.transform.unmodified){let s=IT(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(s)}}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(s.dataType==="style"?new rp("styledata",s):new Is("sourcedata",s))}),this.on("dataloading",s=>{this.fire(s.dataType==="style"?new rp("styledataloading",s):new Is("sourcedataloading",s))}),this.on("dataabort",s=>{this.fire(new Is("sourcedataabort",s))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,t){if(t===void 0&&(t=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!(e!=null&&e.onAdd))return this.fire(new An(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let r=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[t];return t.includes("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(e){if(!(e!=null&&e.onRemove))return this.fire(new An(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let t=this._controls.indexOf(e);return t>-1&&this._controls.splice(t,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return ZT(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new mn(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,t){return this._camera.setCenter(e,t),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,t){return this._camera.setCenterElevation(e,t),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,t,r){return this._camera.panBy(e,t,r),this}panTo(e,t,r){return this._camera.panTo(e,t,r),this}getZoom(){return this._camera.transform.zoom}setZoom(e,t){return this._camera.setZoom(e,t),this}zoomTo(e,t,r){return this._camera.zoomTo(e,t,r),this}zoomIn(e,t){return this._camera.zoomIn(e,t),this}zoomOut(e,t){return this._camera.zoomOut(e,t),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,t){return this._camera.setVerticalFieldOfView(e,t),this}getBearing(){return this._camera.transform.bearing}setBearing(e,t){return this._camera.setBearing(e,t),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,t){return this._camera.setPadding(e,t),this}rotateTo(e,t,r){return this._camera.rotateTo(e,t,r),this}resetNorth(e,t){return this._camera.resetNorth(e,t),this}resetNorthPitch(e,t){return this._camera.resetNorthPitch(e,t),this}snapToNorth(e,t){return this._camera.snapToNorth(e,t),this}getPitch(){return this._camera.transform.pitch}setPitch(e,t){return this._camera.setPitch(e,t),this}getRoll(){return this._camera.transform.roll}setRoll(e,t){return this._camera.setRoll(e,t),this}cameraForBounds(e,t){return this._camera.cameraForBounds(e,t)}fitBounds(e,t,r){return this._camera.fitBounds(e,t,r),this}fitScreenCoordinates(e,t,r,i,n){return this._camera.fitScreenCoordinates(e,t,r,i,n),this}jumpTo(e,t){return this._camera.jumpTo(e,t),this}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n)}easeTo(e,t){return this._camera.easeTo(e,t),this}flyTo(e,t){return this._camera.flyTo(e,t),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(mn.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGround()}calculateCameraOptionsFromTo(e,t,r,i){return i==null&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,t,r,i!=null?i:0)}resize(e,t=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(t);let r=!this._camera._moving;return r&&(this.stop(),this.fire(new Mn("movestart",e)).fire(new Mn("move",e))),this.fire(new cc("resize",e)),r&&this.fire(new Mn("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 n=this.painter.context.gl;this._maxCanvasSize=[n.drawingBufferWidth,n.drawingBufferHeight];let a=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,a),this.painter.resize(t,r,a)}this._resizeTransform(e)}_resizeTransform(e=!0){var i;let[t,r]=this._containerDimensions();this._camera.transform.resize(t,r,e),(i=this._camera._requestedCameraState)==null||i.resize(t,r,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n,s=a>r?r/a:1,l=o>i?i/o:1,u=Math.min(s,l);return u<1&&Ma("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),u*n}getPixelRatio(){var e;return(e=this._overridePixelRatio)!=null?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.transform.setMaxBounds(Ev.convert(e)),this._update()}setMinZoom(e){if(e!=null||(e=-2),e>=-2&&e<=this._camera.transform.maxZoom){let t=this._camera.transform.zoom,r=this._camera.getTransformForUpdate();return r.setMinZoom(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.zoom&&this.fire(new Mn("zoomstart")).fire(new Mn("zoom")).fire(new Mn("zoomend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let t=this._camera.transform;return e?t.applyConstrain(t.center,t.minZoom).zoom:t.minZoom}setMaxZoom(e){if(e!=null||(e=22),e>=this._camera.transform.minZoom){let t=this._camera.transform.zoom,r=this._camera.getTransformForUpdate();return r.setMaxZoom(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.zoom&&this.fire(new Mn("zoomstart")).fire(new Mn("zoom")).fire(new Mn("zoomend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e!=null||(e=0),e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let t=this._camera.transform.pitch,r=this._camera.getTransformForUpdate();return r.setMinPitch(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.pitch&&this.fire(new Mn("pitchstart")).fire(new Mn("pitch")).fire(new Mn("pitchend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e!=null||(e=60),e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let t=this._camera.transform.pitch,r=this._camera.getTransformForUpdate();return r.setMaxPitch(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.pitch&&this.fire(new Mn("pitchstart")).fire(new Mn("pitch")).fire(new Mn("pitchend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e!=null||(e=20),e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this._camera.transform.setConstrainOverride(e),this._update()}project(e){return this._camera.transform.locationToScreenPoint(mn.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(tr.convert(e),this.terrain)}isMoving(){var e;return this._camera.isMoving()||((e=this._handlers)==null?void 0:e.isMoving())||!1}isZooming(){var e;return this._camera.isZooming()||((e=this._handlers)==null?void 0:e.isZooming())||!1}isRotating(){var e;return this._camera.isRotating()||((e=this._handlers)==null?void 0:e.isRotating())||!1}_createDelegatedListener(e,t,r){if(e==="mouseenter"||e==="mouseover"){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length?i||(i=!0,r.call(this,new O0(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}}if(e==="mouseleave"||e==="mouseout"){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(o=>this.getLayer(o));(a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a})).length?i=!0:i&&(i=!1,r.call(this,new O0(e,this,n.originalEvent)))},mouseout:n=>{i&&(i=!1,r.call(this,new O0(e,this,n.originalEvent)))}}}}{let i=n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length&&(n.features=o,r.call(this,n),delete n.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 n;if(!((n=this._delegatedListeners)!=null&&n[e]))return;let i=this._delegatedListeners[e];for(let a=0;at.includes(s))){for(let s in o.delegates)this.off(s,o.delegates[s]);i.splice(a,1);return}}}on(e,t,r){if(r===void 0)return super.on(e,t);let i=typeof t=="string"?[t]:t,n=this._createDelegatedListener(e,i,r);this._saveDelegatedListener(e,n);for(let a in n.delegates)this.on(a,n.delegates[a]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(r===void 0)return super.once(e,t);let i=typeof t=="string"?[t]:t,n=this._createDelegatedListener(e,i,r);for(let a in n.delegates){let o=n.delegates[a];n.delegates[a]=(...s)=>{this._removeDelegatedListener(e,i,r),o(...s)}}this._saveDelegatedListener(e,n);for(let a in n.delegates)this.once(a,n.delegates[a]);return this}off(e,t,r){if(r===void 0)return super.off(e,t);let i=typeof t=="string"?[t]:t;return this._removeDelegatedListener(e,i,r),this}queryRenderedFeatures(e,t){if(!this.style)return[];let r,i=e instanceof tr||Array.isArray(e),n=i?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(t||(t=(i?{}:e)||{}),n instanceof tr||typeof n[0]=="number")r=[tr.convert(n)];else{let a=tr.convert(n[0]),o=tr.convert(n[1]);r=[a,new tr(o.x,a.y),o,new tr(a.x,o.y),a]}return this.style.queryRenderedFeatures(r,t,this._camera.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,t){return t=ln({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},t),this._styleUrl=typeof e=="string"?e:null,t.diff!==!1&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(e,t))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(t==null)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var i,n,a;if((i=this._diffStyleRequest)==null||i.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded){this.style.once("style.load",()=>this._updateStyle(e,t));return}let r=this.style&&t.transformStyle?this.style.serialize():void 0;if(this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e)this.style=new hae(this,t||{});else return this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),(a=(n=this.style)==null?void 0:n.projection)==null||a.destroy(),delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof e=="string"?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this}_lazyInitEmptyStyle(){this.style||(this.style=new hae(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,t){return Ki(this,null,function*(){var r;if((r=this._diffStyleRequest)==null||r.abort(),typeof e=="string"){let i=e;this._diffStyleRequest=new AbortController;let n=this._diffStyleRequest;try{let a=yield this._requestManager.transformRequest(i,"Style");if(n.signal.aborted){this._diffStyleRequest=null;return}let o=yield jk(a,n);this._diffStyleRequest=null,this._updateDiff(o.data,t)}catch(a){this._diffStyleRequest=null,Fm(a)||this.fire(new An(Ic(a)))}}else typeof e=="object"&&(this._diffStyleRequest=null,this._updateDiff(e,t))})}_updateDiff(e,t){try{this.style.setState(e,t)&&this._update(!0)}catch(r){Ma(`Unable to perform style diff: ${Ic(r).message}. Rebuilding the style from scratch.`),this._updateStyle(e,t)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(!this.style){Ma("There is no style added to the map.");return}return this.style.loaded()}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let t=(r=this.style)==null?void 0:r.tileManagers[e];if(t===void 0){this.fire(new An(Error(`There is no tile manager with ID '${e}'`)));return}return t.loaded()}setTerrain(e,t={}){if(this.style._checkLoaded(),e&&qT(this,ch.terrain,{value:e},t))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),!e)this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this._camera.terrain=null,this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0);else{let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain===null&&r.reload();for(let i in this.style._layers){let n=this.style._layers[i];n.type==="hillshade"&&n.source===e.source&&Ma("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===e.source&&Ma("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain&&this.terrain.destroy(),this.terrain=new W3r(this.painter,r,e,this._terrainSkirtLength),this.painter.renderToTexture=new LTr(this.painter,this.terrain),this._camera.terrain=this.terrain,this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform)),this._terrainDataCallback=i=>this._handleTerrainDataEvent(i,e.source),this.style.on("data",this._terrainDataCallback)}return this.style.triggerSymbolPlacement(),this.fire(new Zat({terrain:e})),this}_handleTerrainDataEvent(e,t){var i;if(e.dataType==="style"){this.terrain.tileManager.releaseAllRTT();return}let r=e.sourceId===t;if(r&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),r&&e.tile&&!this._camera.elevationFreeze&&(this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))),e.tile){if(((i=e.source)==null?void 0:i.type)==="image"){this.terrain.tileManager.releaseAllRTT();return}this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){var e,t;return(t=(e=this.terrain)==null?void 0:e.options)!=null?t:null}areTilesLoaded(){var t;let e=(t=this.style)==null?void 0:t.tileManagers;for(let r of Object.values(e))if(!r.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){var t;return(t=this.style)==null?void 0:t.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=nae(Math.max(1,e),Math.max(1,t))}else for(let i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=nae(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,t){let r=this.style.tileManagers[e];if(!r)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);t===void 0?r.reload(!0):r.refreshTiles(t.map(i=>new l8(i.z,i.x,i.y)))}addImage(e,t,r={}){var n;this._lazyInitEmptyStyle();let i=this._createStyleImage(t,r);return i?(this.style.addImage(e,i),(n=i.userImage)!=null&&n.onAdd&&i.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){var t;return this._missingStyleImageResolver=e,(t=this.style)==null||t.setMissingImageResolver(e),this}_createStyleImage(e,t={}){let{pixelRatio:r=1,sdf:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}=t;if(e instanceof HTMLImageElement||ex(e)){let{width:u,height:c,data:f}=fh.getImageData(e);return{data:new As({width:u,height:c},f),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0}}if(e.width===void 0||e.height===void 0)return this.fire(new An(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))),null;{let{width:u,height:c,data:f}=e,h=e,d=i8(h.data);return{data:d?new As({width:u,height:c}):new As({width:u,height:c},new Uint8Array(f)),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0,isWebGLImage:d,userImage:h}}}updateImage(e,t){let r=this.style.getImage(e);if(!r)return this.fire(new An(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:i,height:n,data:a}=t instanceof HTMLImageElement||ex(t)?fh.getImageData(t):t;if(i===void 0||n===void 0)return this.fire(new An(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(i!==r.data.width||n!==r.data.height)return this.fire(new An(Error("The width and height of the updated image must be that same as the previous version of the image")));if(r.isWebGLImage=i8(a),r.isWebGLImage)r.userImage=t;else{let o=!(t instanceof HTMLImageElement||ex(t));r.data.replace(a,o)}return this.style.updateImage(e,r),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new An(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return Ki(this,null,function*(){let t=yield rg.getImage(yield this._requestManager.transformRequest(e,"Image"),new AbortController);if(!t.data)throw Error(`Could not load image ${e}: the response is empty`);return t})}listImages(){var e,t;return(t=(e=this.style)==null?void 0:e.listImages())!=null?t:[]}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){var t;return(t=this.style)==null?void 0:t.getLayer(e)}getLayersOrder(){var e,t;return(t=(e=this.style)==null?void 0:e.getLayersOrder())!=null?t:[]}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){var i;return(i=this.style)==null||i.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){var n;return(n=this.style)==null||n.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()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,i=>{i||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,r=>{r||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]}_shouldHandleInitialResize(){var r;if(!((r=this._container)!=null&&r.clientWidth)||!this._container.clientHeight)return!1;let[e,t]=this._containerDimensions();return e!==this._camera.transform.width||t!==this._camera.transform.height}_setupResizeObserver(){var i;let e=!1,t=fst(n=>{this._trackResize&&!this._removed&&(this.resize(n),this.redraw())},50),r=(i=this._ownerWindow.ResizeObserver)!=null?i:ResizeObserver;this._resizeObserver=new r(n=>{!e&&(e=!0,!this._shouldHandleInitialResize())||t(n)}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if(typeof e=="string"){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&typeof e=="object"&&e.nodeType===1)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=$n.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=$n.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=$n.create("div","maplibregl-control-container",e),a=this._controlPositions={};for(let o of["top-left","top-right","bottom-left","bottom-right"])a[o]=$n.create("div",`maplibregl-ctrl-${o} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map")}_resizeCanvas(e,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=ma(fn({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",i=>{t=i},{once:!0});let r=this._canvas.getContext("webgl2",e);if(!r)throw new cst(e,t);this.painter=new tTr(r,this._camera.transform)}migrateProjection(e,t){this._camera.migrateProjection(e,t),this.painter.transform=e,this.fire(new Kat({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return(t=this.style)!=null&&t._loaded?(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var o,s,l,u,c;let t=this._idleTriggered?this._fadeDuration:0,r=((o=this.style.projection)==null?void 0:o.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let i=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let f=this._camera.transform.zoom,h=Oo();this.style.zoomHistory.update(f,h);let d=new Co(f,{now:h,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),p=d.crossFadingFactor();(p!==1||p!==this._crossFadingFactor)&&(i=!0,this._crossFadingFactor=p),this.style.update(d)}let n=((s=this.style.projection)==null?void 0:s.transitionState)>0!==r;this._camera.transform.setTransitionState((l=this.style.projection)==null?void 0:l.transitionState),this.style&&(this._sourcesDirty||n)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=(u=this.style)==null?void 0:u._updatePlacement(this._camera.transform,this.showCollisionBoxes,t,this._crossSourceCollisions,n),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new cc("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new cc("load"))),this.style&&(this.style.hasTransitions()||i)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let a=this._sourcesDirty||this._styleDirty||this._placementDirty||((c=this.painter.renderToTexture)==null?void 0:c.needsFollowUpFrame);return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new cc("idle")),this._loaded&&!this._fullyLoaded&&!a&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._render(0)),this}remove(){var t,r;this._hash&&this._hash.remove();for(let i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._renderTaskQueue.clear(),(t=this._diffStyleRequest)==null||t.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),rg.removeThrottleControl(this._imageQueueHandle),(r=this._resizeObserver)==null||r.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new cc("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,fh.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(t){if(!Fm(t))throw t}},()=>{},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 ITr}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},zTr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0},BTr=class{constructor(e){this._updateZoomButtons=()=>{let t=this._map.getZoom(),r=t===this._map.getMaxZoom(),i=t===this._map.getMinZoom(!0);this._zoomInButton.disabled=r,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{let t=this._map.getPitch(),r=this._map.getRoll(),i=this._map.getBearing(),n=1/Math.cos(js(t))**.5;if(this.options.visualizePitch&&this.options.visualizeRoll){this._compassIcon.style.transform=`scale(${n}) rotateZ(${-r}deg) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizePitch){this._compassIcon.style.transform=`scale(${n}) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizeRoll){this._compassIcon.style.transform=`rotate(${-i-r}deg)`;return}this._compassIcon.style.transform=`rotate(${-i}deg)`},this._setButtonTitle=(t,r)=>{let i=this._map._getUIString(`NavigationControl.${r}`);t.title=i,t.setAttribute("aria-label",i)},this.options=ln({},zTr,e),this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),$n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),$n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=$n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new qTr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=$n.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},qTr=class{constructor(e,t,r=!1){this.mousedown=n=>{this.startMove(n,$n.mousePos(this.element,n)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=n=>{this.move(n,$n.mousePos(this.element,n))},this.mouseup=n=>{this._rotatePitchHandler.dragEnd(n),this.offTemp()},this.touchstart=n=>{n.targetTouches.length===1?(this._startPos=this._lastPos=$n.touchPos(this.element,n.targetTouches)[0],this.startMove(n,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=n=>{n.targetTouches.length===1?(this._lastPos=$n.touchPos(this.element,n.targetTouches)[0],this.move(n,this._lastPos)):this.reset()},this.touchend=n=>{n.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=t;let i=new gTr;this._rotatePitchHandler=new E8({clickTolerance:3,move:(n,a)=>{let o=t.getBoundingClientRect(),s=new tr((o.bottom-o.top)/2,(o.right-o.left)/2);return{bearingDelta:Tie(new tr(n.x,a.y),a,s),pitchDelta:r?(a.y-n.y)*-.5:void 0}},moveStateManager:i,enable:!0,assignEvents:()=>{}}),this.map=e,t.addEventListener("mousedown",this.mousedown),t.addEventListener("touchstart",this.touchstart,{passive:!1}),t.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),$n.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(){$n.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}};Oae={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%)"};jat={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},Cst="#3FB1CE";o3=class extends e0{},Dst=class extends e0{},vae=class extends mu{constructor(e){if(super(),this._onClick=t=>{this.fire(new Dst("click",{originalEvent:t}))},this._onKeyPress=t=>{(t.code==="Space"||t.code==="Enter")&&this.togglePopup()},this._onKeyDown=t=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||t.composedPath()[0]!==this._element||t.altKey||t.ctrlKey||t.metaKey)return;let r=jat[t.key];if(!r)return;t.preventDefault(),t.stopPropagation();let i=t.shiftKey?10:1,n=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new tr(n.x+r[0]*i,n.y+r[1]*i))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new o3("dragstart"))),this.fire(new o3("drag"))},this._onKeyUp=t=>{jat[t.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=t=>{let r=t.originalEvent.target,i=this._element;this._popup&&(r===i||i.contains(r))&&this.togglePopup()},this._update=t=>{if(!this._map)return;let r=this._map.loaded()&&!this._map.isMoving();((t==null?void 0:t.type)==="terrain"||(t==null?void 0:t.type)==="render"&&!r)&&this._map.once("render",this._update),this._lngLat=Est(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let i="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?i=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?n="rotateX(0deg)":this._pitchAlignment==="map"&&(n=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!t||t.type==="moveend")&&(this._pos=this._pos.round()),this._element.style.transform=`${Oae[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${i}`,fh.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity((t==null?void 0:t.type)==="moveend")}).catch(()=>{})},this._onMove=t=>{if(!this._isDragging){let r=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=r}this._isDragging&&(this._pos=t.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 o3("dragstart"))),this.fire(new o3("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 o3("dragend")),this._state="inactive"},this._addDragHandler=t=>{this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.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==null?void 0:e.anchor)||"center",this._color=(e==null?void 0:e.color)||Cst,this._scale=(e==null?void 0:e.scale)||1,this._draggable=(e==null?void 0:e.draggable)||!1,this._clickTolerance=(e==null?void 0:e.clickTolerance)||0,this._subpixelPositioning=(e==null?void 0:e.subpixelPositioning)||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=(e==null?void 0:e.rotation)||0,this._rotationAlignment=(e==null?void 0:e.rotationAlignment)||"auto",this._pitchAlignment=e!=null&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e==null?void 0:e.element)this._element=e.element,this._offset=tr.convert((e==null?void 0:e.offset)||[0,0]);else{this._defaultMarker=!0,this._element=$n.create("div");let t=NTr().cloneNode(!0);t.setAttributeNS(null,"height",`${41*this._scale}px`),t.setAttributeNS(null,"width",`${27*this._scale}px`),UTr(t).setAttributeNS(null,"fill",this._color),this._element.appendChild(t),this._offset=tr.convert((e==null?void 0:e.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",t=>{t.preventDefault()}),this._element.addEventListener("mousedown",t=>{t.preventDefault()}),kst(this._element,this._anchor,"marker"),e==null?void 0: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._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=mn.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let t=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,(24.6+t)*-1],"bottom-right":[-t,(24.6+t)*-1],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new o3("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;if(this._element.style.opacity===this._opacityWhenCovered)return this;if(e)e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map));else return this;return this}_updateOpacity(e=!1){var h,d;let t=(h=this._map)==null?void 0:h.terrain,r=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!t||r){let p=r?this._opacityWhenCovered:this._opacity;this._element.style.opacity!==p&&(this._element.style.opacity=p,this._element.classList.toggle("maplibregl-marker-covered",r));return}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let i=this._map,n=i.terrain.depthAtPoint(this._pos),a=i.terrain.getElevationForLngLat(this._lngLat,i._camera.transform),o=i._camera.transform.lngLatToCameraDepth(this._lngLat,a),s=.006;if(o-ns;(d=this._popup)!=null&&d.isOpen()&&f&&this._popup.remove(),this._element.style.opacity=f?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",f)}getOffset(){return this._offset}setOffset(e){return this._offset=tr.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&(this._tabIndexManaged=(this._element.getAttribute("tabindex")==="0"&&this._element.removeAttribute("tabindex"),!1))}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(this._opacity===void 0||e===void 0&&t===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=String(e)),t!==void 0&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}},VTr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},dq=0,x8=!1,s3=class extends e0{},gae=class extends e0{},Fst=class extends e0{},GTr=class extends mu{constructor(e){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t)){this._setErrorState(),this.fire(new gae("outofmaxbounds",t)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(t),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new gae("geolocate",t)),this._finish()}},this._updateCamera=t=>{let r=new mn(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,n=this._map.getBearing(),a=ln({bearing:n},this.options.fitBoundsOptions),o=Ev.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=t=>{if(t){let r=new mn(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=t=>{if(this._map){if(t.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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&x8)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Fst("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=t=>{if(!this._map)return;let r=(t==null?void 0:t[0])instanceof ResizeObserverEntry;!t.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!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 s3("trackuserlocationend")),this.fire(new s3("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>{t.preventDefault()}),this._geolocateButton=$n.create("button","maplibregl-ctrl-geolocate",this._container),$n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(t===!1){Ma("Geolocation support is not available so the GeolocateControl will be disabled.");let r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{let r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=$n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new vae({element:this._dotElement}),this._circleElement=$n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new vae({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=ln({},VTr,e)}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),OTr().then(t=>this._finishSetupUI(t)),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,dq=0,x8=!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":break;case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!this.options.showUserLocation||!this.options.showAccuracyCircle||!this._accuracy||!e)return;let 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 Ma("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 s3("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":dq--,x8=!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 s3("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 s3("trackuserlocationstart")),this.fire(new s3("userlocationfocus"));break;default:throw Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),dq++;let e;dq>1?(e={maximumAge:6e5,timeout:0},x8=!0):(e=this.options.positionOptions,x8=!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)}},HTr={maxWidth:100,unit:"metric"},jTr=class{constructor(e){this._onMove=()=>{$at(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,$at(this._map,this._container,this.options)},this.options=fn(fn({},HTr),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=$n.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}};mae=class extends e0{},YTr=class extends mu{constructor(e={}){var t;super(),this._onFullscreenChange=()=>{var i;let r=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;(i=r==null?void 0:r.shadowRoot)!=null&&i.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(t=e.pseudo)!=null?t:!1,e!=null&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:Ma("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=$n.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=$n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);$n.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 mae("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new mae("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()}},XTr=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=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=$n.create("button","maplibregl-ctrl-terrain",this._container),$n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},ZTr=class{constructor(){this._toggleProjection=()=>{var t;let e=(t=this._map.getProjection())==null?void 0:t.type;e==="mercator"||!e?this._map.setProjection({type:"globe"}):this._map.setProjection({type:"mercator"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((e=this._map.getProjection())==null?void 0:e.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=$n.create("button","maplibregl-ctrl-globe",this._container),$n.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}},KTr={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},JTr=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),yae=class extends e0{},QTr=class extends mu{constructor(e){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new yae("close"))),this),this._update=t=>{let r=this._lngLat||this._trackPointer;if(!this._map||!r||!this._content)return;if(!this._container){if(this._container=$n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=$n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let l of this.options.className.split(" "))this._container.classList.add(l);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Est(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer);let i;if(t&&"point"in t&&t.point&&(i=t.point),this._trackPointer&&!i)return;let n=this._flatPos=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&i?i:this._map._camera.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor,o=Lst(this.options.offset);if(!a){let l=this._container.offsetWidth,u=this._container.offsetHeight,c=e6r(this.options.padding),f;f=n.y+o.bottom.ythis._map._camera.transform.height-u-c.bottom?["bottom"]:[],n.xthis._map._camera.transform.width-l/2-c.right&&f.push("right"),a=f.length===0?"bottom":f.join("-")}let s=n.add(o[a]);this.options.subpixelPositioning||(s=s.round()),this._container.style.transform=`${Oae[a]} translate(${s.x}px,${s.y}px)`,kst(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=ln(Object.create(KTr),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 yae("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=mn.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,i;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return(e=this._container)==null?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=$n.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=$n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector(JTr);e&&e.focus()}};t6r=Wat});var Bst=W((sri,zst)=>{"use strict";zst.exports='var t1=Object.defineProperty,e1=Object.defineProperties;var r1=Object.getOwnPropertyDescriptors;var nh=Object.getOwnPropertySymbols;var i1=Object.prototype.hasOwnProperty,n1=Object.prototype.propertyIsEnumerable;var ah=(t,e,r)=>e in t?t1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))i1.call(e,r)&&ah(t,r,e[r]);if(nh)for(var r of nh(e))n1.call(e,r)&&ah(t,r,e[r]);return t},Si=(t,e)=>e1(t,r1(e));var rt=(t,e,r)=>new Promise((i,n)=>{var a=l=>{try{o(r.next(l))}catch(u){n(u)}},s=l=>{try{o(r.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(t,e)).next())});var a1=Object.create,ep=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,o1=Object.getOwnPropertyNames,l1=Object.getPrototypeOf,rp=Object.prototype.hasOwnProperty,fl=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),u1=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=o1(e),a=0,s=n.length,o;ae[l]).bind(null,o),enumerable:!(i=s1(e,o))||i.enumerable});return t},h1=(t,e,r)=>(r=t==null?{}:a1(l1(t)),u1(e||!t||!t.__esModule||!rp.call(t,"default")?ep(r,"default",{value:t,enumerable:!0}):r,t));function B(t,e){this.x=t,this.y=e}B.prototype={clone(){return new B(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){let e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){let e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){let t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){let e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround(t,e){let r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),a=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(t){if(t instanceof B)return t;if(Array.isArray(t))return new B(+t[0],+t[1]);if(t.x!==void 0&&t.y!==void 0)return new B(+t.x,+t.y);throw Error("Expected [x, y] or {x, y} point format")};function c1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var Nn;function p1(){return Nn!=null||(Nn=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Nn}var Un;function f1(){if(Un==null&&(Un=!1,p1())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let r=0;r<25;r++){let i=r*4;t.fillStyle=`rgb(${i},${i+1},${i+2})`,t.fillRect(r%5,Math.floor(r/5),1,1)}let e=t.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&e[r]!==r){Un=!0;break}}}return Un||!1}var pe=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;function d1(){var t=new pe(9);return pe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ip(){var t=new pe(3);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function y1(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function sh(t,e,r){var i=new pe(3);return i[0]=t,i[1]=e,i[2]=r,i}function m1(t,e){var r=e[0],i=e[1],n=e[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function g1(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ks(t,e,r){var i=e[0],n=e[1],a=e[2],s=r[0],o=r[1],l=r[2];return t[0]=n*l-a*o,t[1]=a*s-i*l,t[2]=i*o-n*s,t}var x1=y1;(function(){var t=ip();return function(e,r,i,n,a,s){var o,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=i*s,t[2]=n*s,t[3]=a*s,t}function w1(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,t}(function(){var t=v1();return function(e,r,i,n,a,s){var o,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o1e-6?(p=Math.acos(f),d=Math.sin(p),y=Math.sin((1-i)*p)/d,m=Math.sin(i*p)/d):(y=1-i,m=i),t[0]=y*n+m*l,t[1]=y*a+m*u,t[2]=y*s+m*h,t[3]=y*o+m*c,t}function _1(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,s=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[s*3+s]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+s]-e[s*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[s]=(e[s*3+n]+e[n*3+s])*i}return t}var lh=b1;(function(){var t=ip(),e=sh(1,0,0),r=sh(0,1,0);return function(i,n,a){var s=g1(n,a);return s<-.999999?(ks(t,e,n),x1(t)<1e-6&&ks(t,r,n),m1(t,t),D1(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(ks(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,lh(i,i))}})(),(function(){var t=oh(),e=oh();return function(r,i,n,a,s,o){return Ts(t,i,s,o),Ts(e,n,a,o),Ts(r,t,e,2*o*(1-o)),r}})(),(function(){var t=d1();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],lh(e,_1(e,t))}})();function A1(){var t=new pe(2);return pe!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=A1();return function(e,r,i,n,a,s){var o,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o=1)return 1;let e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function E1(t,e,r,i){return c1(t,e,r,i)}var d5=E1(.25,.1,.25,1);function Ji(t,e,r){return Math.min(r,Math.max(e,t))}function F1(t,e,r){let i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function Gt(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function k1(t){return Math.log(t)/Math.LN2%1==0}function Ia(t,e,r){let i={};for(let n in t)i[n]=e.call(r||this,t[n],n,t);return i}function T1(t,e,r){let i={};for(let n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function He(t){return Array.isArray(t)?t.map(He):typeof t=="object"&&t?Ia(t,He):t}var uh={};function Bt(t){uh[t]||(typeof console<"u"&&console.warn(t),uh[t]=!0)}function Ke(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function mr(t){return typeof WorkerGlobalScope<"u"&&t!==void 0&&t instanceof WorkerGlobalScope}function Ca(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap}function I1(t,e,r,i,n){let a=Math.max(-e,0)*4,s=(Math.max(0,r)-r)*i*4+a,o=i*4,l=Math.max(0,e),u=Math.max(0,r),h=Math.min(t.width,e+i),c=Math.min(t.height,r+n);return{rect:{x:l,y:u,width:h-l,height:c-u},layout:[{offset:s,stride:o}]}}function C1(t,e,r,i,n){return rt(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(t,{timestamp:0});try{let s=a==null?void 0:a.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let o=s.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,I1(t,e,r,i,n)),o)for(let u=0;u{t.removeEventListener(e,r,i)}}}function ch(t){return t*Math.PI/180}var ph="AbortError",dl=class extends Error{constructor(t=ph){super(t instanceof Error?t.message:t),this.name=ph,t instanceof Error&&t.stack&&(this.stack=t.stack)}};function yl(t){return t instanceof Error&&t.name==="AbortError"}function B1(t){if(t.aborted)throw new dl(t.reason)}var ml={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function P1(t){return ml.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function sp(t,e){ml.REGISTERED_PROTOCOLS[t]=e}function op(t){delete ml.REGISTERED_PROTOCOLS[t]}var fh="global-dispatcher",ya=class extends Error{constructor(t,e,r,i){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=i}};function lp(){var t;if(mr(self))return(t=self.worker)==null?void 0:t.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(e){}return window.location.href}var z1=t=>{var e;return t.startsWith("file:")||((e=lp())==null?void 0:e.startsWith("file:"))&&!/^\\w+:/.test(t)};function L1(t,e){return rt(this,null,function*(){let r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:lp(),referrerPolicy:t.referrerPolicy,signal:e.signal});t.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(s){throw yl(s)?s:new ya(0,Ki(s).message,t.url,new Blob)}if(!i.ok){let s=yield i.blob();throw new ya(i.status,i.statusText,t.url,s)}let n;n=t.type==="arrayBuffer"||t.type==="image"?i.arrayBuffer():t.type==="json"?i.json():i.text();let a=yield n;return B1(e.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function V1(t,e){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),(t.type==="arrayBuffer"||t.type==="image")&&(n.responseType="arraybuffer");for(let s in t.headers)n.setRequestHeader(s,t.headers[s]);t.type==="json"&&(n.responseType="text",(a=t.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=t.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(t.type==="json")try{s=JSON.parse(n.response)}catch(o){i(o);return}r({data:s,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let s=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new ya(n.status,n.statusText,t.url,s))}},e.signal.addEventListener("abort",()=>{n.abort(),i(new dl(e.signal.reason))}),n.send(t.body)})}var Ma=function(t,e){return rt(this,null,function*(){var r,i;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){let n=P1(t.url);if(n){let a=yield n(t,e);return!a.data&&t.type==="arrayBuffer"?Gt(a,{data:new ArrayBuffer(0)}):a}if(mr(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:fh},e)}if(!z1(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return L1(t,e);if(mr(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:fh},e)}return V1(t,e)})},up=(t,e)=>Ma(Gt(t,{type:"json"}),e),hp=(t,e)=>Ma(Gt(t,{type:"arrayBuffer"}),e);function dh(t,e,r){var i;(i=r[t])!=null&&i.includes(e)||(r[t]||(r[t]=[]),r[t].push(e))}function Is(t,e,r){if(r!=null&&r[t]){let i=r[t].indexOf(e);i!==-1&&r[t].splice(i,1)}}var cp=class{constructor(t,e={}){Gt(this,e),this.type=t}},ma=class extends cp{constructor(t,e={}){super("error",Gt({error:t},e))}},O1=class{on(t,e){return this._listeners||(this._listeners={}),dh(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Is(t,e,this._listeners),Is(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),dh(t,e,this._oneTimeListeners),this):new Promise(r=>this.once(t,r))}fire(t,e){var n,a,s,o,l,u;let r=typeof t=="string"?new cp(t,e||{}):t,i=r.type;if(this.listens(i)){r.target=this;let h=(s=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?s:[];for(let f of h)f.call(this,r);let c=(u=(l=(o=this._oneTimeListeners)==null?void 0:o[i])==null?void 0:l.slice())!=null?u:[];for(let f of c)Is(i,f,this._oneTimeListeners),f.call(this,r);let p=this._eventedParent;p&&(Gt(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(r))}else r instanceof ma&&console.error(r.error);return this}listens(t){var e,r,i,n,a;return!!((r=(e=this._listeners)==null?void 0:e[t])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[t])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}},pp={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},w=pp,fp=["type","source","source-layer","minzoom","maxzoom","filter","layout"],E=class{constructor(t,e,r,i,n="error"){this.message=(t?`${t}: `:"")+r,i&&(this.identifier=i),this.severity=n,e!=null&&e.__line__&&(this.line=e.__line__)}},dn={kind:"null"},I={kind:"number"},Y={kind:"string"},tt={kind:"boolean"},ce={kind:"color"},Ba={kind:"projectionDefinition"},fr={kind:"object"},Z={kind:"value"},R1={kind:"error"},Pa={kind:"collator"},yn={kind:"formatted"},za={kind:"padding"},Qi={kind:"colorArray"},La={kind:"numberArray"},mn={kind:"resolvedImage"},Va={kind:"variableAnchorOffsetCollection"};function Ut(t,e){return{kind:"array",itemType:t,N:e}}function yt(t){if(t.kind==="array"){let e=yt(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}var $1=[dn,I,Y,tt,ce,Ba,yn,fr,Ut(Z),za,La,Qi,mn,Va];function tn(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!tn(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(let r of $1)if(!tn(r,e))return null}}return`Expected ${yt(t)} but found ${yt(e)} instead.`}function gl(t,e){return e.some(r=>r.kind===t.kind)}function dr(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}function Ge(t,e){return t.kind==="array"&&e.kind==="array"?t.itemType.kind===e.itemType.kind&&typeof t.N=="number":t.kind===e.kind}var dp=.96422,yp=.82521,mp=4/29,Ks=6/29,gp=3*Ks*Ks,N1=Math.PI/180,U1=180/Math.PI;function xp(t){return t%=360,t<0&&(t+=360),t}function vp([t,e,r,i]){t=Cs(t),e=Cs(e),r=Cs(r);let n,a,s=Ms((.2225045*t+.7168786*e+.0606169*r)/1);t===e&&e===r?n=a=s:(n=Ms((.4360747*t+.3850649*e+.1430804*r)/dp),a=Ms((.0139322*t+.0971045*e+.7141733*r)/yp));let o=116*s-16;return[o<0?0:o,500*(n-s),200*(s-a),i]}function Cs(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Ms(t){return t>.008856451679035631?t**(1/3):t/gp+mp}function bp([t,e,r,i]){let n=(t+16)/116,a=isNaN(e)?n:n+e/500,s=isNaN(r)?n:n-r/200;return n=1*Ps(n),a=dp*Ps(a),s=yp*Ps(s),[Bs(3.1338561*a-1.6168667*n-.4906146*s),Bs(-.9787684*a+1.9161415*n+.033454*s),Bs(.0719453*a-.2289914*n+1.4052427*s),i]}function Bs(t){return t=t<=.00304?12.92*t:1.055*t**(1/2.4)-.055,t<0?0:t>1?1:t}function Ps(t){return t>Ks?t*t*t:gp*(t-mp)}function q1(t){let[e,r,i,n]=vp(t),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?xp(Math.atan2(i,r)*U1):NaN,a,e,n]}function j1([t,e,r,i]){return t=isNaN(t)?0:t*N1,bp([r,Math.cos(t)*e,Math.sin(t)*e,i])}function G1([t,e,r,i]){t=xp(t),e/=100,r/=100;function n(a){let s=(a+t/30)%12,o=e*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(s-3,9-s,1))}return[n(0),n(8),n(4),i]}var X1=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function ji(t,e){return X1(t,e)?t[e]:void 0}function Y1(t){if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e=ji(W1,t);if(e){let[i,n,a]=e;return[i/255,n/255,a/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){let i=t.length<6?1:2,n=1;return[qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+i)||"ff")]}if(t.startsWith("rgb")){let i=t.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(i){let[n,a,s,o,l,u,h,c,p,f,d,y]=i,m=[o||" ",h||" ",f].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[s,u,p].join(""),x=g==="%%%"?100:g===""?255:0;if(x){let v=[Rr(+a/x,0,1),Rr(+l/x,0,1),Rr(+c/x,0,1),d?yh(+d,y):1];if(mh(v))return v}}return}}let r=t.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(r){let[i,n,a,s,o,l,u,h,c]=r,p=[a||" ",o||" ",u].join("");if(p===" "||p===" /"||p===",,"||p===",,,"){let f=[+n,Rr(+s,0,100),Rr(+l,0,100),h?yh(+h,c):1];if(mh(f))return G1(f)}}}function qn(t){return parseInt(t.padEnd(2,t),16)/255}function yh(t,e){return Rr(e?t/100:t,0,1)}function Rr(t,e,r){return Math.min(Math.max(e,t),r)}function mh(t){return!t.some(Number.isNaN)}var W1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Je(t,e,r){return t+r*(e-t)}function ti(t,e,r){return t.map((i,n)=>Je(i,e[n],r))}function Z1(t){return t==="rgb"||t==="hcl"||t==="lab"}var Pt,gt=(Pt=class{constructor(e,r,i,n=1,a=!0){this.r=e,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,r,i,n]))}static parse(e){if(e instanceof Pt)return e;if(typeof e!="string")return;let r=Y1(e);if(r)return new Pt(...r,!1)}get rgb(){let{r:e,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[e/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",q1(this.rgb))}get lab(){return this.overwriteGetter("lab",vp(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,i,n]=this.rgb;return`rgba(${[e,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(e,r,i,n="rgb"){switch(n){case"rgb":{let[a,s,o,l]=ti(e.rgb,r.rgb,i);return new Pt(a,s,o,l,!1)}case"hcl":{let[a,s,o,l]=e.hcl,[u,h,c,p]=r.hcl,f,d;if(!isNaN(a)&&!isNaN(u)){let v=u-a;u>a&&v>180?v-=360:u180&&(v+=360),f=a+i*v}else isNaN(a)?isNaN(u)?f=NaN:(f=u,(o===1||o===0)&&(d=h)):(f=a,(c===1||c===0)&&(d=s));let[y,m,g,x]=j1([f,d!=null?d:Je(s,h,i),Je(o,c,i),Je(l,p,i)]);return new Pt(y,m,g,x,!1)}case"lab":{let[a,s,o,l]=bp(ti(e.lab,r.lab,i));return new Pt(a,s,o,l,!1)}}}},Pt.black=new Pt(0,0,0,1),Pt.white=new Pt(1,1,1,1),Pt.transparent=new Pt(0,0,0,0),Pt.red=new Pt(1,0,0,1),Pt),H1=["bottom","center","top"],Js=class{constructor(t,e,r,i,n,a){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},ze=class la{constructor(e){this.sections=e}static fromString(e){return new la([new Js(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof la?e:la.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Ae=class Li{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Li)return e;if(typeof e=="number")return new Li([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Li(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Li(ti(e.values,r.values,i))}},Se=class Vi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Vi)return e;if(typeof e=="number")return new Vi([e]);if(Array.isArray(e)){for(let r of e)if(typeof r!="number")return;return new Vi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Vi(ti(e.values,r.values,i))}},oe=class Oi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Oi)return e;if(typeof e=="string"){let i=gt.parse(e);return i?new Oi([i]):void 0}if(!Array.isArray(e))return;let r=[];for(let i of e){if(typeof i!="string")return;let n=gt.parse(i);if(!n)return;r.push(n)}return new Oi(r)}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n="rgb"){let a=[];if(e.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let s=0;s=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: \'a\' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[t,e,r,i]:[t,e,r]).join(", ")}]: \'r\', \'g\', and \'b\' must be between 0 and 255.`}function ei(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Dr||t instanceof gt||t instanceof xl||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e)return!0;if(Array.isArray(t)){for(let e of t)if(!ei(e))return!1;return!0}if(typeof t=="object"){for(let e in t)if(!ei(t[e]))return!1;return!0}return!1}function _t(t){if(t===null)return dn;if(typeof t=="string")return Y;if(typeof t=="boolean")return tt;if(typeof t=="number")return I;if(t instanceof gt)return ce;if(t instanceof Dr)return Ba;if(t instanceof xl)return Pa;if(t instanceof ze)return yn;if(t instanceof Ae)return za;if(t instanceof Se)return La;if(t instanceof oe)return Qi;if(t instanceof De)return Va;if(t instanceof _e)return mn;if(Array.isArray(t)){let e=t.length,r;for(let i of t){let n=_t(i);if(!r)r=n;else{if(r===n)continue;r=Z;break}}return Ut(r||Z,e)}return fr}function Gi(t){let e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof gt||t instanceof Dr||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e?t.toString():JSON.stringify(t)}var ri=class _p{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`\'literal\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new _p(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},J1=["Unknown","Point","LineString","Polygon"],Ap=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?J1[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=gt.parse(t),this._parseColorCache.set(t,e)),e}};function Oa(t,e,r){let i=t.length-1,n=0,a=i,s=0,o,l;for(;n<=a;)if(s=Math.floor((n+a)/2),o=t[s],l=t[s+1],o<=e){if(s===i||ee)a=s-1;else throw new ft("Input is not a number.",r);return 0}var vl=class Sp{constructor(e,r,i,n){this.type=e,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,s]of i)this.labels.push(a),this.outputs.push(s)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let s=1;s=o)return r.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',u);let c=r.parse(l,h,a);if(!c)return null;a||(a=c.type),n.push([o,c])}return new Sp(a,i,n,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(e):i[Oa(r,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Q1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var be=class Qs{constructor(e,r,i,n,a,s){this.type=e,this.operator=r,this.interpolation=i,this.input=n,this.key=s,this.labels=[],this.outputs=[];for(let[o,l]of a)this.labels.push(o),this.outputs.push(l)}static interpolationFactor(e,r,i,n){let a=0;if(e.name==="exponential")a=zs(r,e.base,i,n);else if(e.name==="linear")a=zs(r,1,i,n);else if(e.name==="cubic-bezier"){let s=e.controlPoints;a=Q1(s[0],s[1],s[2],s[3])(zs(r,1,i,n))}return a}static parse(e,r){let[i,n,a,...s]=e;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(h=>typeof h!="number"||h<0||h>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,I),!a)return null;let o=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Qi?l=ce:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=h)return r.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',p);let d=r.parse(c,f,l);if(!d)return null;l||(l=d.type),o.push([h,d])}return!Ge(l,I)&&!Ge(l,Ba)&&!Ge(l,ce)&&!Ge(l,za)&&!Ge(l,La)&&!Ge(l,Qi)&&!Ge(l,Va)&&!Ge(l,Ut(I))?r.error(`Type ${yt(l)} is not interpolatable.`):new Qs(l,i,n,a,o,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(e);let s=Oa(r,n,this.key),o=r[s],l=r[s+1],u=Qs.interpolationFactor(this.interpolation,n,o,l),h=i[s].evaluate(e),c=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Je(h,c,u);case"color":return gt.interpolate(h,c,u);case"padding":return Ae.interpolate(h,c,u);case"colorArray":return oe.interpolate(h,c,u);case"numberArray":return Se.interpolate(h,c,u);case"variableAnchorOffsetCollection":return De.interpolate(h,c,u,this.key);case"array":return ti(h,c,u);case"projectionDefinition":return Dr.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"hcl");case"colorArray":return oe.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"lab");case"colorArray":return oe.interpolate(h,c,u,"lab")}}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function zs(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}var gr={color:gt.interpolate,number:Je,padding:Ae.interpolate,numberArray:Se.interpolate,colorArray:oe.interpolate,variableAnchorOffsetCollection:De.interpolate,array:ti},Ep=class Fp{constructor(e){this.type=yn,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let s=1;s<=e.length-1;++s){let o=e[s];if(a&&typeof o=="object"&&!Array.isArray(o)){a=!1;let l=null;if(o["font-scale"]&&(l=r.parse(o["font-scale"],1,I),!l))return null;let u=null;if(o["text-font"]&&(u=r.parse(o["text-font"],1,Ut(Y)),!u))return null;let h=null;if(o["text-color"]&&(h=r.parse(o["text-color"],1,ce),!h))return null;let c=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!H1.includes(o["vertical-align"]))return r.error(`\'vertical-align\' must be one of: \'bottom\', \'center\', \'top\' but found \'${o["vertical-align"]}\' instead.`);if(c=r.parse(o["vertical-align"],1,Y),!c)return null}let p=n[n.length-1];p.scale=l,p.font=u,p.textColor=h,p.verticalAlign=c}else{let l=r.parse(e[s],1,Z);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be \'string\', \'value\', \'image\' or \'null\'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Fp(n)}evaluate(e){return new ze(this.sections.map(r=>{let i=r.content.evaluate(e);return _t(i)===mn?new Js("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new Js(Gi(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}};function kp(t,e,r=0,i=t.length-1,n=t0){for(;i>r;){if(i-r>600){let l=i-r+1,u=e-r+1,h=Math.log(l),c=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*c*(l-c)/l)*(u-l/2<0?-1:1);kp(t,e,Math.max(r,Math.floor(e-u*c/l+p)),Math.min(i,Math.floor(e+(l-u)*c/l+p)),n)}let a=t[e],s=r,o=i;for(ki(t,r,e),n(t[i],a)>0&&ki(t,r,i);s0;)o--}n(t[r],a)===0?ki(t,r,o):(o++,ki(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}}function ki(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function t0(t,e){return te)}function Ra(t,e){if(t.length<=1)return[t];let r=[],i,n;for(let a of t){let s=r0(a);s!==0&&(a.area=Math.abs(s),n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),e>1)for(let a=0;a2){let u=e[1];if(typeof u!="string"||!(u in jn)||u==="object")return r.error(\'The item type argument of "array" must be one of string, number, boolean\',1);o=jn[u],i++}else o=Z;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error(\'The length argument to "array" must be a positive integer literal\',2);l=e[2],i++}n=Ut(o,l)}else{if(!jn[a])throw Error(`Types doesn\'t contain name = ${a}`);n=jn[a]}let s=[];for(;ie.outputDefined())}},gh={"to-boolean":tt,"to-color":ce,"to-number":I,"to-string":Y},jr=class Ip{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[0];if(!gh[i])throw Error(`Can\'t parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return r.error("Expected one argument.");let n=gh[i],a=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Dp(r[0],r[1],r[2],r[3]),!i))return new gt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ft(i||`Could not parse color from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ae.parse(r);if(n)return n}throw new ft(`Could not parse padding from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=Se.parse(r);if(n)return n}throw new ft(`Could not parse numberArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=oe.parse(r);if(n)return n}throw new ft(`Could not parse colorArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(e);let n=De.parse(r);if(n)return n}throw new ft(`Could not parse variableAnchorOffsetCollection from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(e),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ft(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return ze.fromString(Gi(this.args[0].evaluate(e)));case"resolvedImage":return _e.fromString(Gi(this.args[0].evaluate(e)));case"projectionDefinition":{let r=this.args[0].evaluate(e);if(Dr.parse(r))return r;throw new ft(`Could not parse projectionDefinition from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}default:return Gi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Cp=class Mp{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new ft(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ft(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},n0=class Lp{constructor(e,r,i){this.needle=e,this.haystack=r,this.key=i,this.type=tt}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);return!i||!n?null:gl(i.type,[tt,Y,I,dn,Z])?new Lp(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);if(!dr(i,["string","array"]))throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},a0=class to{constructor(e,r,i,n){this.needle=e,this.haystack=r,this.key=i,this.fromIndex=n,this.type=I}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);if(!i||!n)return null;if(!gl(i.type,[tt,Y,I,dn,Z]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new to(i,n,r.key,a):null}return new to(i,n,r.key)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),dr(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(dr(i,["array"]))return i.indexOf(r,n);throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},s0=class Vp{constructor(e,r,i,n,a,s){this.inputType=e,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=s}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},s=[];for(let u=2;u2**53-1)return p.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return p.error("Numeric branch labels must be integer values.");if(!i)i=_t(d);else if(p.checkSubtype(i,_t(d)))return null;if(a[String(d)]!==void 0)return p.error("Branch labels must be unique.");a[String(d)]=s.length}let f=r.parse(c,u,n);if(!f)return null;n||(n=f.type),s.push(f)}let o=r.parse(e[1],1,Z);if(!o)return null;let l=r.parse(e[e.length-1],e.length-1,n);return!l||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new Vp(i,n,o,a,s,l)}evaluate(e){let r=this.input.evaluate(e);return(_t(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},o0=class Op{constructor(e,r,i){this.type=e,this.branches=r,this.otherwise=i}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let s=1;sr.outputDefined())&&this.otherwise.outputDefined()}},l0=class eo{constructor(e,r,i,n,a){this.type=e,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,I);if(!i||!n)return null;if(!gl(i.type,[Ut(Z),Y,Z]))return r.error(`Expected first argument to be of type array or string, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new eo(i.type,i,n,r.key,a):null}return new eo(i.type,i,n,r.key)}evaluate(e){let r=this.input.evaluate(e),i=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),dr(r,["string"]))return[...r].slice(i,n).join("");if(dr(r,["array"]))return r.slice(i,n);throw new ft(`Expected first argument to be of type array or string, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},Rp=class ro{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let s of e.slice(1)){let o=r.parse(s,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i||(i=o.type),a.push(o)}if(!i)throw Error("No output type");return n&&a.some(s=>tn(n,s.type))?new ro(Z,a):new ro(i,a)}evaluate(e){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(e),r&&r instanceof _e&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function xh(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function u0(t,e,r){return e===r}function h0(t,e,r){return e!==r}function c0(t,e,r){return er}function f0(t,e,r){return e<=r}function d0(t,e,r){return e>=r}function $p(t,e,r,i){return i.compare(e,r)===0}function y0(t,e,r,i){return!$p(t,e,r,i)}function m0(t,e,r,i){return i.compare(e,r)<0}function g0(t,e,r,i){return i.compare(e,r)>0}function x0(t,e,r,i){return i.compare(e,r)<=0}function v0(t,e,r,i){return i.compare(e,r)>=0}function li(t,e,r){let i=t!=="=="&&t!=="!=";return class Np{constructor(a,s,o,l){this.lhs=a,this.rhs=s,this.key=o,this.collator=l,this.type=tt,this.hasUntypedArgument=a.type.kind==="value"||s.type.kind==="value"}static parse(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");let o=a[0],l=s.parse(a[1],1,Z);if(!l)return null;if(!xh(o,l.type))return s.concat(1).error(`"${o}" comparisons are not supported for type \'${yt(l.type)}\'.`);let u=s.parse(a[2],2,Z);if(!u)return null;if(!xh(o,u.type))return s.concat(2).error(`"${o}" comparisons are not supported for type \'${yt(u.type)}\'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types \'${yt(l.type)}\' and \'${yt(u.type)}\'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Ie(u.type,[l],s.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ie(l.type,[u],s.key)));let h=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(h=s.parse(a[3],3,Pa),!h)return null}return new Np(l,u,s.key,h)}evaluate(a){let s=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ft(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!=="string"||u.kind!=="string")return e(a,s,o)}return this.collator?r(a,s,o,this.collator.evaluate(a)):e(a,s,o)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}var b0=li("==",u0,$p),w0=li("!=",h0,y0),D0=li("<",c0,m0),_0=li(">",p0,g0),A0=li("<=",f0,x0),S0=li(">=",d0,v0),Up=class qp{constructor(e,r,i){this.type=Pa,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let i=e[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,tt);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,tt);if(!a)return null;let s=null;return i.locale&&(s=r.parse(i.locale,1,Y),!s)?null:new qp(n,a,s)}evaluate(e){return new xl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},E0=class jp{constructor(e,r,i,n,a,s){this.type=Y,this.number=e,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=s}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=e[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,Y),!a))return null;let s=null;if(n.currency&&(s=r.parse(n.currency,1,Y),!s))return null;let o=null;if(n.unit&&(o=r.parse(n.unit,1,Y),!o))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,I),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,I),!u)?null:new jp(i,a,s,o,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},F0=class Gp{constructor(e){this.type=mn,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let i=r.parse(e[1],1,Y);return i?new Gp(i):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),i=_e.fromString(r);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(r)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},k0=class Xp{constructor(e,r){this.input=e,this.key=r,this.type=I}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=r.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${yt(i.type)} instead.`):new Xp(i,r.key):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ft(`Expected value to be of type string or array, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},we=8192;function T0(t,e){let r=I0(t[0]),i=M0(t[1]),n=2**e.z;return[Math.round(r*n*we),Math.round(i*n*we)]}function bl(t,e){let r=2**e.z,i=(t[0]/we+e.x)/r,n=(t[1]/we+e.y)/r;return[C0(i),B0(n)]}function I0(t){return(180+t)/360}function C0(t){return t*360-180}function M0(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function B0(t){return 360/Math.PI*Math.atan(Math.exp((180-t*360)*Math.PI/180))-90}function gn(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function en(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function P0(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function z0(t,e,r){let i=t[0]-e[0],n=t[1]-e[1],a=t[0]-r[0],s=t[1]-r[1];return i*s-a*n===0&&i*a<=0&&n*s<=0}function $a(t,e,r,i){let n=[e[0]-t[0],e[1]-t[1]];return R0([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(vh(t,e,r,i)&&vh(r,i,t,e))}function L0(t,e,r){for(let i of r)for(let n=0;n0&&c<0||h<0&&c>0}function wl(t,e,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;a===0&&(a=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=a}gn(e,t)}function $0(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function bh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t)for(let l of o){let u=[l.x+a[0],l.y+a[1]];Zp(u,e,r,n),s.push(u)}return s}function wh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t){let l=[];for(let u of o){let h=[u.x+a[0],u.y+a[1]];gn(e,h),l.push(h)}s.push(l)}if(e[2]-e[0]<=n/2){$0(e);for(let o of s)for(let l of o)Zp(l,e,r,n)}return s}function N0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!ui(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!V0(o,a))return!1}return!0}function U0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!Yp(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!O0(o,a))return!1}return!0}var Dl=class ha{constructor(e,r){this.type=tt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'within\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:s,coordinates:o}=a.geometry;s==="Polygon"&&n.push(o),s==="MultiPolygon"&&n.push(...o)}if(n.length)return new ha(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new ha(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new ha(i,i)}return r.error("\'within\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return N0(e,this.geometries);if(e.geometryType()==="LineString")return U0(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Hp=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}},Dh=Math.PI/180,_l=class{constructor(t){let e=Dh*6378.137*1e3,r=Math.cos(t*Dh),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=e*n*r,this.ky=e*n*i*.9933056200098587}distance(t,e){let r=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(t,e){let r=1/0,i,n,a,s;for(let o=0;o1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p)),h=this.wrap(e[0]-l)*this.kx,c=(e[1]-u)*this.ky;let f=h*h+c*c;f180;)t-=360;return t}};function Kp(t,e){return e[0]-t[0]}function ga(t){return t[1]-t[0]+1}function Le(t,e){return t[1]>=t[0]&&t[1]t[1])return[null,null];let r=ga(t);if(e){if(r===2)return[t,null];let n=Math.floor(r/2);return[[t[0],t[0]+n],[t[0]+n,t[1]]]}if(r===1)return[t,null];let i=Math.floor(r/2)-1;return[[t[0],t[0]+i],[t[0]+i+1,t[1]]]}function no(t,e){if(!Le(e,t.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)gn(r,t[i]);return r}function ao(t){let e=[1/0,1/0,-1/0,-1/0];for(let r of t)for(let i of r)gn(e,i);return e}function _h(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Al(t,e,r){if(!_h(t)||!_h(e))return NaN;let i=0,n=0;return t[2]e[2]&&(i=t[0]-e[2]),t[1]>e[3]&&(n=t[1]-e[3]),t[3]=i)return i;if(en(n,a)){if(Ah(t,e))return 0}else if(Ah(e,t))return 0;let s=1/0;for(let o of t)for(let l=0,u=o.length,h=u-1;l0;){let l=s.pop();if(l[0]>=a)continue;let u=l[1],h=e?50:100;if(ga(u)<=h){if(!Le(u,t.length))return NaN;if(e){let c=X0(t,u,r,i);if(isNaN(c)||c===0)return c;a=Math.min(a,c)}else for(let c=u[0];c<=u[1];++c){let p=G0(t[c],r,i);if(a=Math.min(a,p),a===0)return 0}}else{let c=io(u,e);Sh(s,a,i,t,o,c[0]),Sh(s,a,i,t,o,c[1])}}return a}function va(t,e,r,i,n,a=1/0){let s=Math.min(a,n.distance(t[0],r[0]));if(s===0)return s;let o=new Hp([[0,[0,t.length-1],[0,r.length-1]]],Kp);for(;o.length>0;){let l=o.pop();if(l[0]>=s)continue;let u=l[1],h=l[2],c=e?50:100,p=i?50:100;if(ga(u)<=c&&ga(h)<=p){if(!Le(u,t.length)&&Le(h,r.length))return NaN;let f;if(e&&i)f=q0(t,u,r,h,n),s=Math.min(s,f);else if(e&&!i){let d=t.slice(u[0],u[1]+1);for(let y=h[0];y<=h[1];++y)if(f=hr(r[y],d,n),s=Math.min(s,f),s===0)return s}else if(!e&&i){let d=r.slice(h[0],h[1]+1);for(let y=u[0];y<=u[1];++y)if(f=hr(t[y],d,n),s=Math.min(s,f),s===0)return s}else f=j0(t,u,r,h,n),s=Math.min(s,f)}else{let f=io(u,e),d=io(h,i);Gn(o,s,n,t,r,f[0],d[0]),Gn(o,s,n,t,r,f[0],d[1]),Gn(o,s,n,t,r,f[1],d[0]),Gn(o,s,n,t,r,f[1],d[1])}}return s}function W0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!1,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!1,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!1,s.coordinates,n,a))}if(a===0)return a}return a}function Z0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!0,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!0,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!0,s.coordinates,n,a))}if(a===0)return a}return a}function H0(t,e){let r=t.geometry();if(r.length===0||r[0].length===0)return NaN;let i=Ra(r,0).map(s=>s.map(o=>o.map(l=>bl([l.x,l.y],t.canonical)))),n=new _l(i[0][0][0][1]),a=1/0;for(let s of e)for(let o of i){switch(s.type){case"Point":a=Math.min(a,xa([s.coordinates],!1,o,n,a));break;case"LineString":a=Math.min(a,xa(s.coordinates,!0,o,n,a));break;case"Polygon":a=Math.min(a,Y0(o,s.coordinates,n,a))}if(a===0)return a}return a}function Ls(t){return t.type==="MultiPolygon"?t.coordinates.map(e=>({type:"Polygon",coordinates:e})):t.type==="MultiLineString"?t.coordinates.map(e=>({type:"LineString",coordinates:e})):t.type==="MultiPoint"?t.coordinates.map(e=>({type:"Point",coordinates:e})):[t]}var El=class ca{constructor(e,r){this.type=I,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'distance\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection")return new ca(i,i.features.map(n=>Ls(n.geometry)).flat());if(i.type==="Feature")return new ca(i,Ls(i.geometry));if("type"in i&&"coordinates"in i)return new ca(i,Ls(i))}return r.error("\'distance\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return W0(e,this.geometries);if(e.geometryType()==="LineString")return Z0(e,this.geometries);if(e.geometryType()==="Polygon")return H0(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},K0=class Jp{constructor(e){let r=null;for(let i of e)if(!r)r=i.type;else{if(r===i.type)continue;r=Z;break}this.type=Ut(r!=null?r:Z,e.length),this.arr=e}static parse(e,r){if(e.length!==2)return r.error(`\'semiliteral\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i);if(n.kind==="array"){let a=i.map(s=>r.parse(s,null,Z));return new Jp(a)}return new ri(n,i)}evaluate(e){return this.arr.map(r=>r.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},Fl=class Qp{constructor(e){this.key=e,this.type=Z}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Qp(i):r.error(`Global state property must be string, but found ${typeof e[1]} instead.`)}evaluate(e){var i,n;let r=(i=e.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=ji(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},Yr={"==":b0,"!=":w0,">":_0,"<":D0,">=":S0,"<=":A0,array:Ie,at:i0,boolean:Ie,case:o0,coalesce:Rp,collator:Up,format:Ep,image:F0,in:n0,"index-of":a0,interpolate:be,"interpolate-hcl":be,"interpolate-lab":be,length:k0,let:Cp,literal:ri,match:s0,number:Ie,"number-format":E0,object:Ie,semiliteral:K0,slice:l0,step:vl,string:Ie,"to-boolean":jr,"to-color":jr,"to-number":jr,"to-string":jr,var:Bp,within:Dl,distance:El,"global-state":Fl},ve=class extends Error{constructor(t,e){super(e),this.message=e,this.key=t}},J0=class tf{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(e){return new tf(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}},ef=class rf{constructor(e,r,i=[],n,a=new J0,s=[]){this.registry=e,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=a,this.errors=s,this.expectedType=n,this._isConstant=r}parse(e,r,i,n,a={}){return r?this.concat(r,i,n)._parse(e,a):this._parse(e,a)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);let i=this.key;function n(a,s,o){return o==="assert"?new Ie(s,[a],i):o==="coerce"?new jr(s,[a],i):a}if(Array.isArray(e)){if(e.length===0)return this.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');let a=e[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[a];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){let l=this.expectedType,u=o.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")o=n(o,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))o=n(o,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(o instanceof ri)&&o.type.kind!=="resolvedImage"&&this._isConstant(o)){let l=new Ap;try{o=new ri(o.type,o.evaluate(l))}catch(u){return this.error(u.message),null}}return o}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return e===void 0?this.error("\'undefined\' value invalid. Use null instead."):typeof e=="object"?this.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,i){let n=typeof e=="number"?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new rf(this.registry,this._isConstant,n,r||null,a,this.errors)}error(e,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ve(i,e))}checkSubtype(e,r){let i=tn(e,r);return i&&this.error(i),i}},_r=class Ri{constructor(e,r,i,n,a){this.name=e,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let i=e[0],n=Ri.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter(([u])=>!Array.isArray(u)||u.length===e.length-1),l=null;for(let[u,h]of o){l=new ef(r.registry,ba,r.path,null,r.scope);let c=[],p=!1;for(let f=1;ftm(c)).join(" | "),h=[];for(let c=1;c>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}function sr(t){return{type:t}}_r.register(Yr,{error:[R1,[Y],(t,[e],r)=>{throw new ft(e.evaluate(t),r)}],typeof:[Y,[Z],(t,[e])=>yt(_t(e.evaluate(t)))],"to-rgba":[Ut(I,4),[ce],(t,[e])=>{let[r,i,n,a]=e.evaluate(t).rgb;return[r*255,i*255,n*255,a]}],rgb:[ce,[I,I,I],Eh],rgba:[ce,[I,I,I,I],Eh],has:{type:tt,overloads:[[[Y],(t,[e])=>Fh(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Fh(e.evaluate(t),r.evaluate(t))]]},get:{type:Z,overloads:[[[Y],(t,[e])=>Vs(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Vs(e.evaluate(t),r.evaluate(t))]]},"feature-state":[Z,[Y],(t,[e])=>Vs(e.evaluate(t),t.featureState||{})],properties:[fr,[],t=>t.properties()],"geometry-type":[Y,[],t=>t.geometryType()],id:[Z,[],t=>t.id()],zoom:[I,[],t=>t.globals.zoom],"heatmap-density":[I,[],t=>t.globals.heatmapDensity||0],elevation:[I,[],t=>t.globals.elevation||0],"line-progress":[I,[],t=>t.globals.lineProgress||0],accumulated:[Z,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[I,sr(I),(t,e)=>{let r=0;for(let i of e)r+=i.evaluate(t);return r}],"*":[I,sr(I),(t,e)=>{let r=1;for(let i of e)r*=i.evaluate(t);return r}],"-":{type:I,overloads:[[[I,I],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[I],(t,[e])=>-e.evaluate(t)]]},"/":[I,[I,I],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[I,[I,I],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[I,[],()=>Math.LN2],pi:[I,[],()=>Math.PI],e:[I,[],()=>Math.E],"^":[I,[I,I],(t,[e,r])=>e.evaluate(t)**+r.evaluate(t)],sqrt:[I,[I],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[I,[I],(t,[e])=>Math.log(e.evaluate(t))],log2:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[I,[I],(t,[e])=>Math.sin(e.evaluate(t))],cos:[I,[I],(t,[e])=>Math.cos(e.evaluate(t))],tan:[I,[I],(t,[e])=>Math.tan(e.evaluate(t))],asin:[I,[I],(t,[e])=>Math.asin(e.evaluate(t))],acos:[I,[I],(t,[e])=>Math.acos(e.evaluate(t))],atan:[I,[I],(t,[e])=>Math.atan(e.evaluate(t))],min:[I,sr(I),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[I,sr(I),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[I,[I],(t,[e])=>Math.abs(e.evaluate(t))],round:[I,[I],(t,[e])=>{let r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[I,[I],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[I,[I],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[tt,[Y,Z],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[tt,[Z],(t,[e])=>t.id()===e.value],"filter-type-==":[tt,[Y],(t,[e])=>t.geometryType()===e.value],"filter-<":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i{let r=t.id(),i=e.value;return typeof r==typeof i&&r":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[tt,[Z],(t,[e])=>{let r=e.value,i=t.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[tt,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[tt,[Ut(Y)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[tt,[Ut(Z)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[tt,[Y,Ut(Z)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[tt,[Y,Ut(Z)],(t,[e,r])=>Q0(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[tt,[tt],(t,[e])=>!e.evaluate(t)],"is-supported-script":[tt,[Y],(t,[e])=>{let r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[Y,[Y],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Y,[Y],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Y,sr(Z),(t,e)=>e.map(r=>Gi(r.evaluate(t))).join("")],split:[Ut(Y),[Y,Y],(t,[e,r])=>e.evaluate(t).split(r.evaluate(t))],join:[Y,[Ut(Y),Y],(t,[e,r])=>e.evaluate(t).join(r.evaluate(t))],"resolved-locale":[Y,[Pa],(t,[e])=>e.evaluate(t).resolvedLocale()]});function tm(t){return Array.isArray(t)?`(${t.map(yt).join(", ")})`:`(${yt(t.type)}...)`}function ba(t){if(t instanceof Bp)return ba(t.boundExpression);if(t instanceof _r&&t.name==="error"||t instanceof Up||t instanceof Dl||t instanceof El||t instanceof Fl)return!1;let e=t instanceof jr||t instanceof Ie,r=!0;return t.eachChild(i=>{r&&(r=e?ba(i):i instanceof ri)}),r?Na(t)&&Ua(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function Na(t){if(t instanceof _r&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Dl||t instanceof El)return!1;let e=!0;return t.eachChild(r=>{e&&!Na(r)&&(e=!1)}),e}function rn(t){if(t instanceof _r&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!rn(r)&&(e=!1)}),e}function Ua(t,e){if(t instanceof _r&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(i=>{r&&!Ua(i,e)&&(r=!1)}),r}function ii(t){return t["property-type"]==="data-driven"||t["property-type"]==="cross-faded-data-driven"}function nf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function kl(t){return!!t.expression&&t.expression.interpolated}var Tl=/^(.*)-transition$/;function nn(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function Q(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function qa(t){return typeof t=="object"&&!!t&&!Array.isArray(t)&&_t(t)===fr}function em(t){return t}function rm(t){switch(t.type){case"color":return gt.parse;case"padding":return Ae.parse;case"numberArray":return Se.parse;case"colorArray":return oe.parse;default:return null}}function im(t){switch(t){case"exponential":return sf;case"interval":return am;case"categorical":return nm;case"identity":return sm;default:throw Error(`Unknown function type "${t}"`)}}function af(t,e){let r=t.stops&&typeof t.stops[0][0]=="object",i=r||t.property!==void 0,n=r||!i,a=t.type||(kl(e)?"exponential":"interval"),s=rm(e);if(s&&(t=nn({},t),t.stops&&(t.stops=t.stops.map(h=>[h[0],s(h[1])])),t.default?t.default=s(t.default):t.default=s(e.default)),t.colorSpace&&!Z1(t.colorSpace))throw Error(`Unknown color space: "${t.colorSpace}"`);let o=im(a),l,u;if(a==="categorical"){l=Object.create(null);for(let h of t.stops)l[h[0]]=h[1];u=typeof t.stops[0][0]}if(r){let h={},c=[];for(let d=0;dd[0]),evaluate({zoom:d},y){return sf({stops:p,base:t.base},e,d).evaluate(d,y)}}}if(n){let h=a==="exponential"?{name:"exponential",base:t.base===void 0?1:t.base}:null;return{kind:"camera",interpolationType:h,interpolationFactor:be.interpolationFactor.bind(void 0,h),zoomStops:t.stops.map(c=>c[0]),evaluate:({zoom:c})=>o(t,e,c,l,u)}}return{kind:"source",evaluate(h,c){let p=c&&c.properties?c.properties[t.property]:void 0;return p===void 0?xn(t.default,e.default):o(t,e,p,l,u)}}}function xn(t,e,r){if(t!==void 0)return t;if(e!==void 0)return e;if(r!==void 0)return r}function nm(t,e,r,i,n){return xn(typeof r===n?i[r]:void 0,t.default,e.default)}function am(t,e,r){if(Q(r)!=="number")return xn(t.default,e.default);let i=t.stops.length;if(i===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];let n=Oa(t.stops.map(a=>a[0]),r,"");return t.stops[n][1]}function sf(t,e,r){let i=t.base===void 0?1:t.base;if(Q(r)!=="number")return xn(t.default,e.default);let n=t.stops.length;if(n===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];let a=Oa(t.stops.map(h=>h[0]),r,""),s=om(r,i,t.stops[a][0],t.stops[a+1][0]),o=t.stops[a][1],l=t.stops[a+1][1],u=gr[e.type]||em;return typeof o.evaluate=="function"?{evaluate(...h){let c=o.evaluate.apply(void 0,h),p=l.evaluate.apply(void 0,h);if(c!==void 0&&p!==void 0)return u(c,p,s,t.colorSpace)}}:u(o,l,s,t.colorSpace)}function sm(t,e,r){switch(e.type){case"color":r=gt.parse(r);break;case"formatted":r=ze.fromString(r.toString());break;case"resolvedImage":r=_e.fromString(r.toString());break;case"padding":r=Ae.parse(r);break;case"colorArray":r=oe.parse(r);break;case"numberArray":r=Se.parse(r);break;default:Q(r)!==e.type&&(e.type!=="enum"||!e.values[r])&&(r=void 0)}return xn(r,t.default,e.default)}function om(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}function so(t){return{result:"success",value:t}}function Nr(t){return{result:"error",value:t}}var Il=class{constructor(t,e,r,i){this.expression=t,this._warningHistory={},this._evaluator=new Ap,this._defaultValue=r?pf(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=e}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,a){this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ft(`Expected value to be one of ${Object.keys(this._enumValues).map(o=>JSON.stringify(o)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let o=s instanceof ft?s.path:"",l=`${o}|${s.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(of(this._rootKey,o,s.message,this._defaultValue))),this._defaultValue}}};function of(t,e,r,i){return`${t}${e}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function lf(t){if(!t)throw Error(\'rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".\')}function ja(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Yr}function er(t,e,r,i){lf(e);let n=new ef(Yr,ba,[],r?hm(r):void 0),a=n.parse(t,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?so(new Il(a,e,r,i)):Nr(n.errors)}var an=class{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this._globalState=r}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}},wa=class{constructor(t,e,r,i,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}interpolationFactor(t,e,r){return this.interpolationType?be.interpolationFactor(this.interpolationType,t,e,r):0}};function lm(t){return t._styleExpression!==void 0}function uf(t,e,r,i){let n=er(t,e,r,i);if(n.result==="error")return n;let a=n.value.expression,s=Na(a);if(!s&&!ii(r))return Nr([new ve("","data expressions not supported")]);let o=Ua(a,["zoom"]);if(!o&&!nf(r))return Nr([new ve("","zoom expressions not supported")]);let l=pa(a);if(!l&&!o)return Nr([new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')]);if(l instanceof ve)return Nr([l]);if(l instanceof be&&!kl(r))return Nr([new ve("",\'"interpolate" expressions cannot be used with this property\')]);if(!l)return so(s?new an("constant",n.value,i):new an("source",n.value,i));let u=l instanceof be?l.interpolation:void 0;return so(s?new wa("camera",n.value,l.labels,u,i):new wa("composite",n.value,l.labels,u,i))}var hf=class cf{constructor(e,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,lf(r),this._parameters=e,this._specification=i,this._rootKey=r,this._defaultValue=pf(i),this._warningHistory={};let n=af(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,r){try{return this._innerEvaluate(e,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(of(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(e){return new cf(e._parameters,e._rootKey,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function um(t,e,r,i){if(qa(t))return new hf(t,e,r);if(ja(t)){let n=uf(t,e,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=t;return r.type==="color"&&typeof t=="string"?n=gt.parse(t):r.type==="padding"&&(typeof t=="number"||Array.isArray(t))?n=Ae.parse(t):r.type==="numberArray"&&(typeof t=="number"||Array.isArray(t))?n=Se.parse(t):r.type==="colorArray"&&(typeof t=="string"||Array.isArray(t))?n=oe.parse(t):r.type==="variableAnchorOffsetCollection"&&Array.isArray(t)?n=De.parse(t):r.type==="projectionDefinition"&&typeof t=="string"&&(n=Dr.parse(t)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function pa(t){let e=null;if(t instanceof Cp)e=pa(t.result);else if(t instanceof Rp){for(let r of t.args)if(e=pa(r),e)break}else(t instanceof vl||t instanceof be)&&t.input instanceof _r&&t.input.name==="zoom"&&(e=t);return e instanceof ve||t.eachChild(r=>{let i=pa(r);i instanceof ve?e=i:!e&&i?e=new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):e&&i&&e!==i&&(e=new ve("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))}),e}function vn(t,e=new Set){return t instanceof Fl&&e.add(t.key),t.eachChild(r=>{vn(r,e)}),e}function hm(t){let e={color:ce,string:Y,number:I,enum:Y,boolean:tt,formatted:yn,padding:za,numberArray:La,colorArray:Qi,projectionDefinition:Ba,resolvedImage:mn,variableAnchorOffsetCollection:Va};return t.type==="array"?Ut(e[t.value]||Z,t.length):e[t.type]}function pf(t){if(t.type==="color"&&qa(t.default))return new gt(0,0,0,0);switch(t.type){case"color":return gt.parse(t.default)||null;case"padding":return Ae.parse(t.default)||null;case"numberArray":return Se.parse(t.default)||null;case"colorArray":return oe.parse(t.default)||null;case"variableAnchorOffsetCollection":return De.parse(t.default)||null;case"projectionDefinition":return Dr.parse(t.default)||null;default:return t.default===void 0?null:t.default}}function ni(t,e){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o}=t!=null?t:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:e}}function cm(t){let e=!1;for(let r of t){let i=ff(r);if(i==="expression")return"expression";i==="legacy"&&(e=!0)}return e?"legacy":"neutral"}function ff(t){if(typeof t=="boolean")return"neutral";if(!Array.isArray(t)||t.length===0)return"legacy";switch(t[0]){case"has":return t.length<2||t[1]==="$id"||t[1]==="$type"?"legacy":t.length===2?"neutral":"expression";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return cm(t.slice(1));default:return"expression"}}function Cl(t){return ff(t)!=="legacy"}function kh(t){return t==="$type"?["geometry-type"]:t==="$id"?["id"]:["get",t]}function pm(t){switch(t[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return t.length!==3||typeof t[1]!="string"?null:[t[0],kh(t[1]),t[2]];case"in":case"!in":{if(t.length<2||typeof t[1]!="string")return null;let e=["in",kh(t[1]),["literal",t.slice(2)]];return t[0]==="!in"?["!",e]:e}case"has":case"!has":{if(t.length!==2||typeof t[1]!="string"||t[1]==="$type"||t[1]==="$id")return null;let e=["has",t[1]];return t[0]==="!has"?["!",e]:e}default:return null}}function df(t){if((t[0]==="<"||t[0]==="<="||t[0]===">"||t[0]===">=")&&t[1]==="$type")return`"$type" cannot be use with operator "${t[0]}"`;let e=pm(t);return e?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(t)} with ${JSON.stringify(e)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(t)} to expression syntax.`}function Os(t,e,r){let i=r[t];return Array.isArray(i)?Cl(i)?Ml(i,e.concat(t)):{path:e.concat(t),legacyFilter:i}:null}function Ml(t,e=[]){if(!Array.isArray(t)||t.length<1)return null;switch(t[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${e}${i}: ${df(r.legacyFilter)}`)}var dm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ai(t,e,r){if(t==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Cl(t)?fm(t,e):t=Da(t);let i=er(t,e,dm,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,s)=>i.value.evaluate(n,a,{},s),needGeometry:yf(t),getGlobalStateRefs:()=>vn(i.value.expression)}}function ym(t,e){return te)}function yf(t){if(!Array.isArray(t))return!1;if(t[0]==="within"||t[0]==="distance")return!0;for(let e=1;e"||e==="<="||e===">="?Rs(t[1],t[2],e):e==="any"?mm(t.slice(1)):e==="all"?["all"].concat(t.slice(1).map(Da)):e==="none"?["all"].concat(t.slice(1).map(Da).map(Xn)):e==="in"?Th(t[1],t.slice(2)):e==="!in"?Xn(Th(t[1],t.slice(2))):e==="has"?Ih(t[1]):e!=="!has"||Xn(Ih(t[1]))}function Rs(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function mm(t){return["any"].concat(t.map(Da))}function Th(t,e){if(e.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",t,["literal",e.sort(ym)]]:["filter-in-small",t,["literal",e]]}}function Ih(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Xn(t){return["!",t]}function mf(t){let e=t.key,r=t.value;return r?[new E(e,r,"constants have been deprecated as of v8")]:[]}function Dt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function xr(t){if(Array.isArray(t))return t.map(xr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){let e={};for(let r in t)e[r]=xr(t[r]);return e}return Dt(t)}function te(t){let e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},a=t.style,s=t.styleSpec,o=t.validateSpec,l=[],u=Q(r);if(u!=="object")return[new E(e,r,`object expected, ${u} found`)];for(let h in r){let c=h.split(".")[0],p=ji(i,c)||i["*"],f;if(ji(n,c))f=n[c];else if(ji(i,c)){if(r[h]===void 0)continue;f=o}else if(n["*"])f=n["*"];else if(i["*"])f=o;else{l.push(new E(e,r[h],`unknown property "${h}"`));continue}l=l.concat(f({key:(e&&`${e}.`)+h,value:r[h],valueSpec:p,style:a,styleSpec:s,object:r,objectKey:h,validateSpec:o},r))}for(let h in i)n[h]||i[h].required&&i[h].default===void 0&&r[h]===void 0&&l.push(new E(e,r,`missing required property "${h}"`));return l}function Bl(t){let e=t.value,r=t.valueSpec,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.key,o=t.arrayElementValidator||i;if(Q(e)!=="array")return[new E(s,e,`array expected, ${Q(e)} found`)];if(r.length&&e.length!==r.length)return[new E(s,e,`array length ${r.length} expected, length ${e.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Q(r.value)==="object"&&(l=r.value);let u=[];for(let h=0;hi.maximum?[new E(e,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new E(e,r,`number expected, ${n} found`)]}function gf(t){let e=t.valueSpec,r=Dt(t.value.type),i,n={},a,s,o=r!=="categorical"&&t.value.property===void 0,l=!o,u=Q(t.value.stops)==="array"&&Q(t.value.stops[0])==="array"&&Q(t.value.stops[0][0])==="object",h=te({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:c,default:d}});return r==="identity"&&o&&h.push(new E(t.key,t.value,\'missing required property "property"\')),r!=="identity"&&!t.value.stops&&h.push(new E(t.key,t.value,\'missing required property "stops"\')),r==="exponential"&&t.valueSpec.expression&&!kl(t.valueSpec)&&h.push(new E(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ii(t.valueSpec)?h.push(new E(t.key,t.value,"property functions not supported")):o&&!nf(t.valueSpec)&&h.push(new E(t.key,t.value,"zoom functions not supported"))),(r==="categorical"||u)&&t.value.property===void 0&&h.push(new E(t.key,t.value,\'"property" property is required\')),h;function c(y){if(r==="identity")return[new E(y.key,y.value,\'identity function may not have a "stops" property\')];let m=[],g=y.value;return m=m.concat(Bl({key:y.key,value:g,valueSpec:y.valueSpec,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,arrayElementValidator:p})),Q(g)==="array"&&g.length===0&&m.push(new E(y.key,g,"array must have at least one stop")),m}function p(y){let m=[],g=y.value,x=y.key;if(Q(g)!=="array")return[new E(x,g,`array expected, ${Q(g)} found`)];if(g.length!==2)return[new E(x,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Q(g[0])!=="object")return[new E(x,g,`object expected, ${Q(g[0])} found`)];if(g[0].zoom===void 0)return[new E(x,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new E(x,g,"object stop key must have value")];if(s&&s>Dt(g[0].zoom))return[new E(x,g[0].zoom,"stop zoom values must appear in ascending order")];Dt(g[0].zoom)!==s&&(s=Dt(g[0].zoom),a=void 0,n={}),m=m.concat(te({key:`${x}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{zoom:Ga,value:f}}))}else m=m.concat(f({key:`${x}[0]`,value:g[0],valueSpec:{},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec},g));return ja(xr(g[1]))?m.concat([new E(`${x}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(y.validateSpec({key:`${x}[1]`,value:g[1],valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec}))}function f(y,m){let g=Q(y.value),x=Dt(y.value),v=y.value===null?m:y.value;if(!i)i=g;else if(g!==i)return[new E(y.key,v,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new E(y.key,v,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return ii(e)&&r===void 0&&(b+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new E(y.key,v,b)]}return r==="categorical"&&g==="number"&&(!isFinite(x)||Math.floor(x)!==x)?[new E(y.key,v,`integer expected, found ${x}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&xnew E(`${t.key}${i.key}`,t.value,i.message));let r=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!r.outputDefined())return[new E(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with layout properties.\')];if(t.expressionContext==="filter"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with filters.\')];if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ua(r,["zoom","feature-state"]))return[new E(t.key,t.value,\'"zoom" and "feature-state" expressions are not supported with cluster properties.\')];if(t.expressionContext==="cluster-initial"&&!Na(r))return[new E(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function gm(t){let e=t.value,r=t.key,i=Q(e);return i==="boolean"?[]:[new E(r,e,`boolean expected, ${i} found`)]}function oo(t){let e=t.key,r=t.value,i=Q(r);return i==="string"?gt.parse(String(r))?[]:[new E(e,r,`color expected, "${r}" found`)]:[new E(e,r,`color expected, ${i} found`)]}function sn(t){let e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function xm(t,e){let r=t;for(let i of e)r=r[i];return r}function vm(t,e){let r=Ml(e);return r?[new E(`${t.key}${r.path.map(i=>`[${i}]`).join("")}`,xm(t.value,r.path),df(r.legacyFilter),null,"warning")]:[]}function Pl(t){let e=xr(t.value);return Cl(e)?[...vm(t,e),...si(nn({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:xf(t)}function xf(t){let e=t.value,r=t.key;if(Q(e)!=="array")return[new E(r,e,`array expected, ${Q(e)} found`)];let i=t.styleSpec,n,a=[];if(e.length<1)return[new E(r,e,"filter array must have at least 1 element")];switch(a=a.concat(sn({key:`${r}[0]`,value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Dt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Dt(e[1])==="$type"&&a.push(new E(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&a.push(new E(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=Q(e[1]),n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)));for(let s=2;s{c in r&&e.push(new E(i,r[c],`"${c}" is prohibited for ref layers`))});let h;n.layers.forEach(c=>{Dt(c.id)===o&&(h=c)}),h?h.ref?e.push(new E(i,r.ref,"ref cannot reference another ref layer")):s=Dt(h.type):e.push(new E(i,r.ref,`ref layer "${o}" not found`))}else if(s!=="background")if(!r.source)e.push(new E(i,r,\'missing required property "source"\'));else{let h=n.sources&&n.sources[r.source],c=h&&Dt(h.type);h?c==="vector"&&s==="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster source`)):c!=="raster-dem"&&s==="hillshade"||c!=="raster-dem"&&s==="color-relief"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster-dem source`)):c==="raster"&&s!=="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a vector source`)):c==="vector"&&!r["source-layer"]?e.push(new E(i,r,`layer "${r.id}" must specify a "source-layer"`)):c==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new E(i,r.source,"raster-dem source can only be used with layer type \'hillshade\' or \'color-relief\'.")):s==="line"&&r.paint&&r.paint["line-gradient"]&&(c!=="geojson"||!h.lineMetrics)&&e.push(new E(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):e.push(new E(i,r.source,`source "${r.source}" not found`))}return s==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&e.push(new E(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),e=e.concat(te({key:i,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*"(){return[]},type(){return t.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"})},filter:Pl,layout(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return wf(nn({layerType:s},c))}}})},paint(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return bf(nn({layerType:s},c))}}})}}})),e}function tr(t){let e=t.value,r=t.key,i=Q(e);return i==="string"?[]:[new E(r,e,`string expected, ${i} found`)]}function bm(t){var c;let e=(c=t.sourceName)!=null?c:"",r=t.value,i=t.styleSpec,n=i.source_raster_dem,a=t.style,s=[],o=Q(r);if(r===void 0)return s;if(o!=="object")return s.push(new E("source_raster_dem",r,`object expected, ${o} found`)),s;let l=Dt(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(let p in r)!l&&u.includes(p)?s.push(new E(p,r[p],`In "${e}": "${p}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[p]?s=s.concat(t.validateSpec({key:p,value:r[p],valueSpec:n[p],validateSpec:t.validateSpec,style:a,styleSpec:i})):s.push(new E(p,r[p],`unknown property "${p}"`));return s}var Ch={promoteId:wm};function _f(t){let e=t.value,r=t.key,i=t.styleSpec,n=t.style,a=t.validateSpec;if(!e.type)return[new E(r,e,\'"type" is required\')];let s=Dt(e.type),o;switch(s){case"vector":case"raster":return o=te({key:r,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:t.style,styleSpec:i,objectElementValidators:Ch,validateSpec:a}),o;case"raster-dem":return o=bm({sourceName:r,value:e,style:t.style,styleSpec:i,validateSpec:a}),o;case"geojson":if(o=te({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:Ch}),e.cluster)for(let l in e.clusterProperties){let[u,h]=e.clusterProperties[l],c=typeof u=="string"?[u,["accumulated"],["get",l]]:u;o.push(...si({key:`${r}.${l}.map`,value:h,validateSpec:a,expressionContext:"cluster-map"})),o.push(...si({key:`${r}.${l}.reduce`,value:c,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return te({key:r,value:e,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return te({key:r,value:e,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new E(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sn({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function wm({key:t,value:e}){if(Q(e)==="string")return tr({key:t,value:e});{let r=[];for(let i in e)r.push(...tr({key:`${t}.${i}`,value:e[i]}));return r}}function Af(t){let e=t.value,r=t.styleSpec,i=r.light,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("light",e,`object expected, ${s} found`)]),a;for(let o in e){let l=o.match(Tl);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,validateSpec:t.validateSpec,style:n,styleSpec:r})):i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)])}return a}function Sf(t){let e=t.value,r=t.styleSpec,i=r.sky,n=t.style,a=Q(e);if(e===void 0)return[];if(a!=="object")return[new E("sky",e,`object expected, ${a} found`)];let s=[];for(let o in e){let l=o.match(Tl);s=l&&i[l[1]]&&i[l[1]].transition?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,style:n,styleSpec:r})):i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)])}return s}function Ef(t){let e=t.value,r=t.styleSpec,i=r.terrain,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("terrain",e,`object expected, ${s} found`)]),a;for(let o in e)a=i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)]);return a}function Dm(t){return tr(t).length===0?[]:si(t)}function _m(t){return tr(t).length===0?[]:si(t)}function Am(t){let e=t.key,r=t.value;if(Q(r)==="array"){if(r.length<1||r.length>4)return[new E(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new E(t,e,\'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"\')],n=r.match(Mm);if(!n)return i();let[,a,s,o]=n;if(o!==void 0)return o.length>6?i():[];let l=parseInt(a,16),u=s===void 0?l:parseInt(s,16);return l>Mh||u>Mh?[new E(t,e,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new E(t,e,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Tf(t){var o,l;let e=(o=t.key)!=null?o:"font-faces",r=t.value,i=t.validateSpec,n=(l=t.styleSpec)!=null?l:pp,a=t.style;if(!lo(r))return[new E(e,r,`object expected, ${Q(r)} found`)];let s=[];for(let u in r){let h=r[u],c=Q(h);if(c==="string")s.push(...tr({key:`${e}.${u}`,value:h}));else if(c==="array"){let p={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[f,d]of h.entries()){let y=`${e}.${u}[${f}]`;s.push(...te({key:y,value:d,valueSpec:p,styleSpec:n,style:a,validateSpec:i}));let m=lo(d)?d["unicode-range"]:void 0;if(Q(m)==="array")for(let[g,x]of m.entries())s.push(...Bm(`${y}.unicode-range[${g}]`,x))}}else s.push(new E(`${e}.${u}`,h,`string or array expected, ${c} found`))}return s}var Bh={"*"(){return[]},array:Bl,boolean:gm,number:Ga,color:oo,constants:mf,enum:sn,filter:Pl,function:gf,layer:Df,object:te,source:_f,light:Af,sky:Sf,terrain:Ef,projection:km,projectionDefinition:Tm,string:tr,formatted:Dm,resolvedImage:_m,padding:Am,numberArray:Sm,colorArray:Em,variableAnchorOffsetCollection:Fm,sprite:Ff,state:kf,fontFaces:Tf};function Xi(t){let e=t.value,r=t.valueSpec,i=t.styleSpec;return t.validateSpec=Xi,r.expression&&qa(Dt(e))?gf(t):r.expression&&ja(xr(e))?si(t):r.type&&Bh[r.type]?Bh[r.type](t):te(nn({},t,{valueSpec:r.type?i[r.type]:r}))}function If(t){let e=t.value,r=t.key,i=tr(t);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{fontstack}" token\')),e.indexOf("{range}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{range}" token\'))),i}function Qt(t,e=w){let r=[];return r=r.concat(Xi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Xi,objectElementValidators:{glyphs:If,"*"(){return[]}}})),t.constants&&(r=r.concat(mf({key:"constants",value:t.constants,style:t,styleSpec:e,validateSpec:Xi}))),Cf(r)}Qt.source=ie(re(_f)),Qt.sprite=ie(re(Ff)),Qt.glyphs=ie(re(If)),Qt.fontFaces=ie(re(Tf)),Qt.light=ie(re(Af)),Qt.sky=ie(re(Sf)),Qt.terrain=ie(re(Ef)),Qt.state=ie(re(kf)),Qt.layer=ie(re(Df)),Qt.filter=ie(re(Pl)),Qt.paintProperty=ie(re(bf)),Qt.layoutProperty=ie(re(wf));function re(t){return function(e){return t(Object.assign({},e,{validateSpec:Xi}))}}function Cf(t){return[].concat(t).sort((e,r)=>e.line-r.line)}function ie(t){return function(...e){return Cf(t.apply(this,e))}}var Pm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},zm=class{constructor(t,e,r){this._rootKey=e,this._globalState=r,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!=null?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none"){this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let e=er(t,this._rootKey,Pm,this._globalState);if(e.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=vn(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function Lm(t,e,r){return new zm(t,e,r)}var Ph=Qt,y5=new Set(Object.keys(w).filter(t=>t.startsWith("source_")).map(t=>t.slice(7).replaceAll("_","-")));function Vm(t,e){let r=!1;for(let i of e){if(i.severity==="warning"){Bt(i.message);continue}t.fire(new ma(Error(i.message))),r=!0}return r}function Om(t,e,r,i){return(i==null?void 0:i.validate)!==!1&&Vm(t,e(je({styleSpec:w},r)))}var uo=class Mf{constructor(e,r,i){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let s=new Int32Array(this.arrayBuffer);e=s[0],r=s[1],i=s[2],this.d=r+2*i;for(let u=0;u=c[f+0]&&n>=c[f+1])?(o[p]=!0,s.push(h[p])):o[p]=!1}}}_forEachCell(e,r,i,n,a,s,o,l){let u=this._convertToCellCoord(e),h=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=this._convertToCellCoord(n);for(let f=u;f<=c;f++)for(let d=h;d<=p;d++){let y=this.d*d+f;if((!l||l(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&a.call(this,e,r,i,n,y,s,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,i=0;for(let s of this.cells)i+=s.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let s=0;sr?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}},$m="-transition",Xa=class{constructor(t,e,r,i){this.property=t,this.value=e,this.expression=um(e===void 0?t.specification.default:e,r,t.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}},ho=class{constructor(t,e,r){this.property=t,this.value=new Xa(t,void 0,e,r)}transitioned(t,e){return new Lh(this.property,this.value,e,Gt({},t.transition,this.transition),t.now)}untransitioned(){return new Lh(this.property,this.value,null,{},0)}},Nm=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return He(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].value=new Xa(this._values[t].property,e===null?void 0:He(e),this._propertyRootKey(t),this._globalState)}getTransition(t){return He(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].transition=He(e)||void 0}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r);let i=this.getTransition(e);i!==void 0&&(t[`${e}${$m}`]=i)}return t}transitioned(t,e){let r=new Vh(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(t,e._values[i]);return r}untransitioned(){let t=new Vh(this._properties);for(let e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}},Lh=class{constructor(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){let i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Lf=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){if(t.value!==void 0){if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new st(Math.floor(e.zoom-1),e)),t.expression.evaluate(new st(Math.floor(e.zoom),e)),t.expression.evaluate(new st(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Wa=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)}interpolate(){return!1}},Xt=class{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let e in t){let r=t[e];r.specification.overridable&&this.overridableProperties.push(e);let i=this.defaultPropertyValues[e]=new Xa(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[e]=new ho(r,r.name,void 0);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}};C("DataDrivenProperty",N),C("DataConstantProperty",V),C("CrossFadedDataDrivenProperty",on),C("CrossFadedProperty",Lf),C("ColorRampProperty",Wa);var Rh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",$s=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",de=class extends O1{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=Lm(this.visibility,`layers[${this.id}].layout.visibility`,r),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=ai(t.filter,`layers[${this.id}].filter`,r)),e.layout&&(this._unevaluatedLayout=new Um(e.layout,`layers[${this.id}].layout`,r)),e.paint)){this._transitionablePaint=new Nm(e.paint,`layers[${this.id}].paint`,r);for(let i in t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(let i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ya(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=ai(t,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if(t==="visibility")return this.visibility;if((e=this._transitionablePaint)!=null&&e.hasProperty(t))throw Error(t+Rh);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;for(let e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(let e in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[e];for(let i of r.getGlobalStateRefs())t.add(i)}for(let e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(e=t.get(n))!=null?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){var i;if(t==="visibility"){this.visibility=e,this._visibilityExpression.setValue(e),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(t)){this.fire(new ma(Error(t+Rh)));return}e!=null&&this._validate(Ph.layoutProperty,`layers.${this.id}.layout.${t}`,t,e,r)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,r;if(t.endsWith("-transition")){let i=t.slice(0,-11);if(i==="visibility"||(e=this._unevaluatedLayout)!=null&&e.hasProperty(i))throw Error(t+$s);return this._transitionablePaint.getTransition(i)}if(t==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(t))throw Error(t+$s);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){var i;if(t==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(t))return this.fire(new ma(Error(t+$s))),!1;if(e!=null&&this._validate(Ph.paintProperty,`layers.${this.id}.paint.${t}`,t,e,r))return!1;if(t.endsWith("-transition"))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{let n=this._transitionablePaint._values[t],a=n.property.specification["property-type"]==="cross-faded-data-driven",s=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);let l=this._transitionablePaint._values[t].value;return l.isDataDriven()||s||a||this._handleOverridablePaintPropertyUpdate(t,o,l)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t=this.minzoom,e=!1){return this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&t>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var e,r;let t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),T1(t,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(t,e,r,i,n={}){return Om(this,t,{key:e,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let e=this.paint.get(t);if(e instanceof se&&ii(e.property.specification)&&(e.value.kind==="source"||e.value.kind==="composite")&&e.value.isStateDependent)return!0}return!1}},qm,jm=()=>qm||(qm=new Xt({"raster-opacity":new V(w.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new V(w.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new V(w.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new V(w.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new V(w.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new V(w.paint_raster["raster-contrast"],"raster-contrast"),resampling:new V(w.paint_raster.resampling,"resampling"),"raster-resampling":new V(w.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new V(w.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Gm={get paint(){return jm()}};var Xm=class extends de{constructor(t,e){super(t,Gm,e)}},Ym={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=class{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},xt=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function At(t,e=1){let r=0,i=0;return{members:t.map(n=>{let a=Wm(n.type),s=r=$h(r,Math.max(e,a)),o=n.components||1;return i=Math.max(i,a),r+=a*o,{name:n.name,type:n.type,components:o,offset:s}}),size:$h(r,Math.max(i,e)),alignment:e}}function Wm(t){return Ym[t].BYTES_PER_ELEMENT}function $h(t,e){return Math.ceil(t/e)*e}var ln=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.int16[i+0]=e,this.int16[i+1]=r,t}};ln.prototype.bytesPerElement=4,C("StructArrayLayout2i4",ln);var co=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t}};co.prototype.bytesPerElement=6,C("StructArrayLayout3i6",co);var Nh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,t}};Nh.prototype.bytesPerElement=8,C("StructArrayLayout4i8",Nh);var po=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};po.prototype.bytesPerElement=12,C("StructArrayLayout2i4i12",po);var fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*4,l=t*8;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=s,t}};fo.prototype.bytesPerElement=8,C("StructArrayLayout2i4ub8",fo);var un=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.float32[i+0]=e,this.float32[i+1]=r,t}};un.prototype.bytesPerElement=8,C("StructArrayLayout2f8",un);var yo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,a,s,o,l,u)}emplace(t,e,r,i,n,a,s,o,l,u,h){let c=t*10;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,t}};yo.prototype.bytesPerElement=20,C("StructArrayLayout10ui20",yo);var mo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,i,n,a,s,o)}emplace(t,e,r,i,n,a,s,o,l){let u=t*8;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,t}};mo.prototype.bytesPerElement=16,C("StructArrayLayout8ui16",mo);var go=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,i,n,a,s,o,l,u,h,c,p)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=t*14,y=t*7;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[y+6]=f,t}};go.prototype.bytesPerElement=28,C("StructArrayLayout4i4ui4i1f28",go);var xo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t}};xo.prototype.bytesPerElement=12,C("StructArrayLayout3f12",xo);var vo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint32[r+0]=e,t}};vo.prototype.bytesPerElement=4,C("StructArrayLayout1ul4",vo);var bo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,a,s,o,l)}emplace(t,e,r,i,n,a,s,o,l,u){let h=t*10,c=t*5;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[c+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,t}};bo.prototype.bytesPerElement=20,C("StructArrayLayout6i1ul2ui20",bo);var wo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};wo.prototype.bytesPerElement=12,C("StructArrayLayout2i2i2i12",wo);var Uh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n)}emplace(t,e,r,i,n,a){let s=t*4,o=t*8;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=i,this.int16[o+6]=n,this.int16[o+7]=a,t}};Uh.prototype.bytesPerElement=16,C("StructArrayLayout2f1f2i16",Uh);var Do=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*16,l=t*4,u=t*8;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=s,t}};Do.prototype.bytesPerElement=16,C("StructArrayLayout2ub2f2i16",Do);var _o=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t}};_o.prototype.bytesPerElement=6,C("StructArrayLayout3ui6",_o);var Ao=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=t*26,b=t*13,D=t*52;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[D+36]=f,this.uint8[D+37]=d,this.uint8[D+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,t}};Ao.prototype.bytesPerElement=52,C("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Ao);var So=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P){let L=this.length;return this.resize(L+1),this.emplace(L,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P,L){let F=t*34,$=t*17;return this.int16[F+0]=e,this.int16[F+1]=r,this.int16[F+2]=i,this.int16[F+3]=n,this.int16[F+4]=a,this.int16[F+5]=s,this.int16[F+6]=o,this.int16[F+7]=l,this.uint16[F+8]=u,this.uint16[F+9]=h,this.uint16[F+10]=c,this.uint16[F+11]=p,this.uint16[F+12]=f,this.uint16[F+13]=d,this.uint16[F+14]=y,this.uint16[F+15]=m,this.uint16[F+16]=g,this.uint16[F+17]=x,this.uint16[F+18]=v,this.uint16[F+19]=b,this.uint16[F+20]=D,this.uint16[F+21]=A,this.uint16[F+22]=_,this.uint32[$+12]=S,this.float32[$+13]=k,this.float32[$+14]=z,this.uint16[F+30]=O,this.uint16[F+31]=P,this.float32[$+16]=L,t}};So.prototype.bytesPerElement=68,C("StructArrayLayout8i15ui1ul2f2ui1f68",So);var _a=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.float32[r+0]=e,t}};_a.prototype.bytesPerElement=4,C("StructArrayLayout1f4",_a);var Eo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*6,a=t*3;return this.uint16[n+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,t}};Eo.prototype.bytesPerElement=12,C("StructArrayLayout1ui2f12",Eo);var Fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*2,a=t*4;return this.uint32[n+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=i,t}};Fo.prototype.bytesPerElement=8,C("StructArrayLayout1ul2ui8",Fo);var ko=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.uint16[i+0]=e,this.uint16[i+1]=r,t}};ko.prototype.bytesPerElement=4,C("StructArrayLayout2ui4",ko);var qh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint16[r+0]=e,t}};qh.prototype.bytesPerElement=2,C("StructArrayLayout1ui2",qh);var To=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,t}};To.prototype.bytesPerElement=16,C("StructArrayLayout4f16",To);var Vf=class extends bn{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new B(this.anchorPointX,this.anchorPointY)}};Vf.prototype.size=20;var Ll=class extends bo{get(t){return new Vf(this,t)}};C("CollisionBoxArray",Ll);var Of=class extends bn{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};Of.prototype.size=52;var Rf=class extends Ao{get(t){return new Of(this,t)}};C("PlacedSymbolArray",Rf);var $f=class extends bn{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};$f.prototype.size=68;var Nf=class extends So{get(t){return new $f(this,t)}};C("SymbolInstanceArray",Nf);var Uf=class extends _a{getoffsetX(t){return this.float32[t*1+0]}};C("GlyphOffsetArray",Uf);var qf=class extends co{getx(t){return this.int16[t*3+0]}gety(t){return this.int16[t*3+1]}gettileUnitDistanceFromAnchor(t){return this.int16[t*3+2]}};C("SymbolLineVertexArray",qf);var jf=class extends bn{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}};jf.prototype.size=12;var Gf=class extends Eo{get(t){return new jf(this,t)}};C("TextAnchorOffsetArray",Gf);var Xf=class extends bn{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}};Xf.prototype.size=8;var Yf=class extends Fo{get(t){return new Xf(this,t)}};C("FeatureIndexArray",Yf);var Zm=class extends ln{};var Hm=class extends ln{},Km=class extends ln{},Jm=class extends po{},Qm=class extends fo{},tg=class extends un{},Vr=class extends yo{},jh=class extends mo{},eg=class extends go{},rg=class extends xo{},ig=class extends vo{},Gh=class extends wo{};var ng=class extends Do{};var wn=class extends _o{},Io=class extends ko{};var Co=At([{name:"a_pos",components:2,type:"Int16"}],4),ag=Co.members;Co.size,Co.alignment;var ee=class Ur{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,i,n){let a=this.segments[this.segments.length-1];return e>Ur.MAX_VERTEX_ARRAY_LENGTH&&Bt(`Max vertices per segment is ${Ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${Ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>Ur.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(e,r,i){let n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,r,i){return this.prepareSegment(0,e,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,i,n){return new Ur([{vertexOffset:e,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};ee.MAX_VERTEX_ARRAY_LENGTH=2**16-1,C("SegmentVector",ee);function Xh(t,e){return t=Ji(Math.floor(t),0,255),e=Ji(Math.floor(e),0,255),256*t+e}var sg=At([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),og=At([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),lg=fl(((t,e)=>{function r(i,n){for(var a=i.length&3,s=i.length-a,o=n,l,u=3432918353,h=461845907,c,p=0;p>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c,o=o<<13|o>>>19,l=(o&65535)*5+(((o>>>16)*5&65535)<<16)&4294967295,o=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(c=0,a){case 3:c^=(i.charCodeAt(p+2)&255)<<16;case 2:c^=(i.charCodeAt(p+1)&255)<<8;case 1:c^=i.charCodeAt(p)&255,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c}return o^=i.length,o^=o>>>16,o=(o&65535)*2246822507+(((o>>>16)*2246822507&65535)<<16)&4294967295,o^=o>>>13,o=(o&65535)*3266489909+(((o>>>16)*3266489909&65535)<<16)&4294967295,o^=o>>>16,o>>>0}e!==void 0&&(e.exports=r)})),ug=fl(((t,e)=>{function r(i,n){for(var a=i.length,s=n^a,o=0,l;a>=4;)l=i.charCodeAt(o)&255|(i.charCodeAt(++o)&255)<<8|(i.charCodeAt(++o)&255)<<16|(i.charCodeAt(++o)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^l,a-=4,++o;switch(a){case 3:s^=(i.charCodeAt(o+2)&255)<<16;case 2:s^=(i.charCodeAt(o+1)&255)<<8;case 1:s^=i.charCodeAt(o)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}e.exports=r})),Mo=h1(fl(((t,e)=>{var r=lg(),i=ug();e.exports=r,e.exports.murmur3=r,e.exports.murmur2=i}))(),1),Wf=class Zf{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,i,n){this.ids.push(Yh(e)),this.positions.push(r,i,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=Yh(e),i=0,n=this.ids.length-1;for(;i>1;this.ids[s]>=r?n=s:i=s+1}let a=[];for(;this.ids[i]===r;){let s=this.positions[3*i],o=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:s,start:o,end:l}),i++}return a}static serialize(e,r){let i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Bo(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(e){let r=new Zf;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}};function Yh(t){let e=+t;return!isNaN(e)&&e<=2**53-1?e:(0,Mo.default)(String(t))}function Bo(t,e,r,i){for(;r>1],a=r-1,s=i+1;for(;;){do a++;while(t[a]n);if(a>=s)break;Yn(t,a,s),Yn(e,3*a,3*s),Yn(e,3*a+1,3*s+1),Yn(e,3*a+2,3*s+2)}s-r`u_${i}`),this.type=r}setUniform(t,e,r){t.set(r.constantOr(this.value))}getBinding(t,e,r){return this.type==="color"?new cg(t,e):new Ol(t,e)}},ur=class{constructor(t,e){this.uniformNames=e.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&t.set(n)}getBinding(t,e,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new hg(t,e):new Ol(t,e)}},ke=class{constructor(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(t,e,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new st(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(i,t,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(0,n),r,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if(this.type==="color"){let i=Po(r);for(let n=t;n`u_${s}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(s=>({name:`a_${s}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(t,e,r){let i=this.expression.evaluate(new st(this.zoom,r),e,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new st(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(a,t,i,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(this.zoom,n),r,i),s=this.expression.evaluate(new st(this.zoom+1,n),r,i);this._setPaintValue(t,e,a,s)}_setPaintValue(t,e,r,i){if(this.type==="color"){let n=Po(r),a=Po(i);for(let s=t;s`#define HAS_UNIFORM_${i}`))}return t}getBinderAttributes(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof ke||r instanceof he)for(let i of r.paintVertexAttributes)t.push(i.name);else if(r instanceof Ye){let i=r.getVertexAttributes();for(let n of i)t.push(n.name)}}return t}getBinderUniforms(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof $i||r instanceof ur||r instanceof he)for(let i of r.uniformNames)t.push(i)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof $i||n instanceof ur||n instanceof he){for(let a of n.uniformNames)if(e[a]){let s=n.getBinding(t,e[a],a);r.push({name:a,property:i,binding:s})}}}return r}setUniforms(t,e,r,i){for(let{name:n,property:a,binding:s}of e)this.binders[a].setUniform(s,i,r.get(a),n)}updatePaintBuffers(t){this._buffers=[];for(let e in this.binders){let r=this.binders[e];if(t&&r instanceof Ye){let i=t.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof ke||r instanceof he)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(t){for(let e in this.binders){let r=this.binders[e];(r instanceof ke||r instanceof he||r instanceof Ye)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let e=this.binders[t];(e instanceof ke||e instanceof he||e instanceof Ye)&&e.destroy()}}},vr=class{constructor(t,e,r=()=>!0){this.programConfigurations={};for(let i of t)this.programConfigurations[i.id]=new Jf(i,e,r);this.needsUpload=!1,this._featureMap=new Wf,this._bufferOffset=0}populatePaintArrays(t,e,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,i);e.id!==void 0&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(t,this._featureMap,e,n,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}};function pg(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function fg(t){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr},"line-dasharray":{source:jh,composite:jh}}[t]}function Wh(t,e,r){var n;let i={color:{source:un,composite:To},number:{source:_a,composite:un}};return((n=fg(t))==null?void 0:n[r])||i[e][r]}C("ConstantBinder",$i),C("CrossFadedConstantBinder",ur),C("SourceExpressionBinder",ke),C("CrossFadedPatternBinder",Hf),C("CrossFadedDasharrayBinder",Kf),C("CompositeExpressionBinder",he),C("ProgramConfiguration",Jf,{omit:["_buffers"]}),C("ProgramConfigurationSet",vr);var zo=2**14-1,Zh=-zo-1;function Ar(t){let e=mt/t.extent,r=t.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*e),s=Math.round(n.y*e);n.x=Ji(a,Zh,zo),n.y=Ji(s,Zh,zo),(an.x+1||sn.y+1)&&Bt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function hi(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Ar(t):[]}}var Hh=-32768;function dg(t,e,r,i,n){t.emplaceBack(Hh+e*8+i,Hh+r*8+n)}var Rl=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Hm,this.indexArray=new wn,this.segments=new ee,this.programConfigurations=new vr(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){let i=this.layers[0],n=[],a=null,s=!1,o=i.type==="heatmap";if(i.type==="circle"){let c=i;a=c.layout.get("circle-sort-key"),s=!a.isConstant(),o||(o=c.paint.get("circle-pitch-alignment")==="map")}let l=o?e.subdivisionGranularity.circle:1,u=new st(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:c,id:p,index:f,sourceLayerIndex:d}of t){let y=hi(c,h);if(!this.layers[0]._featureFilter.filter(u,y,r))continue;let m=s?a.evaluate(y,{},r):void 0,g={id:p,properties:c.properties,type:c.type,sourceLayerIndex:d,index:f,geometry:h?y.geometry:Ar(c),patterns:{},sortKey:m};n.push(g)}s&&n.sort((c,p)=>c.sortKey-p.sortKey);for(let c of n){let{geometry:p,index:f,sourceLayerIndex:d}=c,y=t[f].feature;this.addFeature(c,p,f,r,l),e.featureIndex.insert(y,p,f,d,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures(t){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ag),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let o of e)for(let l of o){let u=l.x,h=l.y;if(u<0||u>=8192||h<0||h>=8192)continue;let c=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;for(let f=0;f=3){for(let n of i)if(oi(t,n))return!0}if(gg(t,i,r))return!0}return!1}function gg(t,e,r){if(t.length>1){if($l(t,e))return!0;for(let i of e)if(Lo(i,t,r))return!0}for(let i of t)if(Lo(i,e,r))return!0;return!1}function $l(t,e){if(t.length===0||e.length===0)return!1;for(let r=0;r1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function Kh(t,e){let r=!1,i,n,a;for(let s of t){i=s;for(let o=0,l=i.length-1;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function oi(t,e){let r=!1;for(let i=0,n=t.length-1;ie.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function vg(t,e,r,i,n){for(let s of t)if(e<=s.x&&r<=s.y&&i>=s.x&&n>=s.y)return!0;let a=[new B(e,r),new B(e,n),new B(i,n),new B(i,r)];if(t.length>2){for(let s of a)if(oi(t,s))return!0}for(let s=0;sn.x&&e.x>n.x||t.yn.y&&e.y>n.y)return!1;let a=Ke(t,e,r[0]);return a!==Ke(t,e,r[1])||a!==Ke(t,e,r[2])||a!==Ke(t,e,r[3])}function Wr(t,e,r){let i=e.paint.get(t).value;return i.kind==="constant"?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ha(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(t,e,r,i,n){if(!e[0]&&!e[1])return t;let a=B.convert(e)._mult(n);r==="viewport"&&a._rotate(-i);let s=[];for(let o of t)s.push(o.sub(a));return s}function wg(t){let e=[];for(let r=0;rNl(n,e,r,i))}var kg,Tg=()=>kg||(kg=new Xt({"circle-sort-key":new N(w.layout_circle["circle-sort-key"],"circle-sort-key")})),Ig,Cg=()=>Ig||(Ig=new Xt({"circle-radius":new N(w.paint_circle["circle-radius"],"circle-radius"),"circle-color":new N(w.paint_circle["circle-color"],"circle-color"),"circle-blur":new N(w.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new N(w.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new V(w.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new V(w.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new V(w.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new V(w.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new N(w.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new N(w.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new N(w.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Mg={get paint(){return Cg()},get layout(){return Tg()}};var Bg=class extends de{constructor(t,e){super(t,Mg,e)}createBucket(t){return new Rl(t)}queryRadius(t){let e=t;return Wr("circle-radius",this,e)+Wr("circle-stroke-width",this,e)+Ha(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=Ka(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return c==="map"?(p=l,f=u*a):(p=Fg(l,n,s,o),f=u),ed({queryGeometry:p,size:f,transform:n,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},i)}},rd=class extends Rl{};C("HeatmapBucket",rd,{omit:["layers"]});var Pg,zg=()=>Pg||(Pg=new Xt({"heatmap-radius":new N(w.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new N(w.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new V(w.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new Wa(w.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new V(w.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Lg={get paint(){return zg()}};function Ul(t,{width:e,height:r},i,n){if(!n)n=new Uint8Array(e*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==e*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${e*r*i}`);return t.width=e,t.height=r,t.data=n,t}function id(t,{width:e,height:r},i){if(e===t.width&&r===t.height)return;let n=Ul({},{width:e,height:r},i);ql(t,n,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},i),t.width=e,t.height=r,t.data=n.data}function ql(t,e,r,i,n,a){if(n.width===0||n.height===0)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw RangeError("out of range destination coordinates for image copy");let s=t.data,o=e.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=l;let u=t.expression.evaluate(e);n.setPixel(s/4/r,o/4,u)};if(t.clips)for(let s=0,o=0;s$g||($g=new Xt({"hillshade-illumination-direction":new V(w.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new V(w.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new V(w.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new V(w.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new V(w.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new V(w.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new V(w.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new V(w.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new V(w.paint_hillshade.resampling,"resampling")})),Ug={get paint(){return Ng()}};var qg=class extends de{constructor(t,e){super(t,Ug,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(t.length,e.length,r.length,i.length);t=t.concat(Array(n-t.length).fill(t.at(-1))),e=e.concat(Array(n-e.length).fill(e.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=e.map(ch);return{directionRadians:t.map(ch),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},jg,Gg=()=>jg||(jg=new Xt({"color-relief-opacity":new V(w["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new Wa(w["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new V(w["paint_color-relief"].resampling,"resampling")})),Xg={get paint(){return Gg()}};function Wn(t){return"data"in t}var Jh=class{constructor(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,i)}update(t,e,r){var u;let{width:i,height:n}=t,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!(e!=null&&e.useMipmap),a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&(e==null?void 0:e.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===o.RGBA&&i>0&&n>0){let h=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,h,o.RGBA8,i,n),Wn(t)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:c}=t;l&&c&&(c=Ns(c)),c&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGBA,o.UNSIGNED_BYTE,c)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t)}else Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,l,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(t,o));else{let{x:h,y:c}=r||{x:0,y:0};Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,l,h,c,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(t,h,c,o))}this.useMipmap&&!(Wn(t)&&t.data===null)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,r,i,n){let{data:a}=t;e&&a&&(a=Ns(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(t,e,r,i){i.texSubImage2D(i.TEXTURE_2D,0,e,r,i.RGBA,i.UNSIGNED_BYTE,t)}_updateRawData(t,e,r,i,n,a,s){let{data:o}=t;e&&o&&(o=Ns(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,i,n,a,s.RGBA,s.UNSIGNED_BYTE,o)}bind(t,e,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||t;t!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),this.magFilter=t),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)}generateMipmap(){if(!this.useMipmap)return;let{gl:t}=this.context;t.bindTexture(t.TEXTURE_2D,this.texture),t.generateMipmap(t.TEXTURE_2D)}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Pe,jl=(Pe=class{constructor(e,r,i,n=1,a=1,s=1,o=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Bt(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Pe.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let h=-2;h=l)&&this.data.copyWithin(this._idx(0,h),c,c+l),this.data.fill(this.data[c],this._idx(-2,h),this._idx(0,h)),this.data.fill(this.data[c+l-1],this._idx(l,h),this._idx(l+1,h)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let h=0;hthis.max&&(this.max=f),f=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),s=((n+2)*this.stride+i+2)*4,o=this.stride*4,l=e-i,u=r-n,h=this._unpackAtIndex(a,s),c=this._unpackAtIndex(a,s+4),p=this._unpackAtIndex(a,s+o),f=this._unpackAtIndex(a,s+o+4);return h*(1-l)*(1-u)+c*l*(1-u)+p*(1-l)*u+f*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,i){return e*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return sd(e,this.getUnpackVector())}getPixels(){return new Zt({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,s=i*this.dim,o=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:s=o-2;break;case 1:o=s+2}let l=-r*this.dim,u=-i*this.dim;for(let h=s;h80*r){o=t[0],l=t[1];let h=o,c=l;for(let p=r;ph&&(h=f),d>c&&(c=d)}u=Math.max(h-o,c-l),u=u===0?0:32767/u}return Ro(a,s,o,l,u),s}function od(t,e,r,i,n){let a=null;if(n===fx(t,e,r,i)>0)for(let s=e;s=e;s-=i)a=ec(s/i|0,t[s],t[s+1],a);return a&&cn(a,a.next)&&(fn(a),a=a.next),a}function br(t,e=t){let r=e===t,i=t,n;do n=!1,i!==i.next&&(hn.size===0||!hn.has(i))&&(cn(i,i.next)||Ft(i.prev,i,i.next)===0)?((r||i===e)&&(e=i.prev),Oo=!0,fn(i),i=i.prev,n=!0):(r||i!==e)&&(i=i.next,n=!r);while(n||i!==e);return e}function Ro(t,e,r,i,n){n&&ox(t,r,i,n);let a=t,s=!1;for(;t.prev!==t.next;){let o=t.prev,l=t.next;if(Ft(o,t,l)<0&&(n?Kg(t,r,i,n):Hg(t))){e.push(o.i,t.i,l.i),fn(t),t=l,a=l;continue}if(t=l,t===a){if(Oo=!1,t=br(t),Oo){a=t;continue}if(!s){t=Jg(t,e),a=t,s=!0;continue}Qg(t,e,r,i,n);break}}}function Hg(t){let e=t.prev,r=t,i=t.next,n=e.x,a=r.x,s=i.x,o=e.y,l=r.y,u=i.y,h=Math.min(n,a,s),c=Math.min(o,l,u),p=Math.max(n,a,s),f=Math.max(o,l,u),d=i.next;for(;d!==e;){if(d.x>=h&&d.x<=p&&d.y>=c&&d.y<=f&&(n!==d.x||o!==d.y)&&Ea(n,o,a,l,s,u,d.x,d.y)&&Ft(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Kg(t,e,r,i){let n=t.prev,a=t,s=t.next,o=n.x,l=a.x,u=s.x,h=n.y,c=a.y,p=s.y,f=Math.min(o,l,u),d=Math.min(h,c,p),y=Math.max(o,l,u),m=Math.max(h,c,p),g=qo(f,d,e,r,i),x=qo(y,m,e,r,i),v=t.prevZ;for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==s&&(o!==v.x||h!==v.y)&&Ea(o,h,l,c,u,p,v.x,v.y)&&Ft(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let b=t.nextZ;for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==s&&(o!==b.x||h!==b.y)&&Ea(o,h,l,c,u,p,b.x,b.y)&&Ft(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Jg(t,e){let r=t,i=!1;do{let n=r.prev,a=r.next.next;ud(n,r,r.next,a,!1)&&pn(n,a)&&pn(a,n)&&(e.push(n.i,r.i,a.i),fn(r),fn(r.next),r=t=a,i=!0),r=r.next}while(r!==t);return i?br(r):r}function Qg(t,e,r,i,n){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&hx(a,s)){let o=hd(a,s);a=br(a,a.next),o=br(o,o.next),Ro(a,e,r,i,n),Ro(o,e,r,i,n);return}s=s.next}a=a.next}while(a!==t)}var $o=!1;function tx(t,e,r,i){let n=[];for(let a=0,s=e.length;as&&(s=r.x),r.yo&&(o=r.y),h.xs&&(s=h.x),h.yo&&(o=h.y),r=h}while(++l<16&&r!==e);Uo[i]=r;let u=i*4;wt[u]=n,wt[u+1]=a,wt[u+2]=s,wt[u+3]=o}while(r!==e)}function nx(t,e){let r=t.z*4;e.xwt[r+2]&&(wt[r+2]=e.x),e.y>wt[r+3]&&(wt[r+3]=e.y)}function Qh(t){let e=Uo[t];for(;e.prev.next!==e;)e=e.next;return Uo[t]=e,e}function tc(t){let e=No[t];for(;e.prev.next!==e;)e=e.next;return No[t]=e,e}function ax(t,e){let r=e,i=t.x,n=t.y,a=-1/0,s;if(cn(t,r))return r;for(let p=0,f=0;pwt[f+3]||wt[f]>i||wt[f+2]<=a)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r){if(cn(t,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let y=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(y<=i&&y>a&&(a=y,s=r.xi||wt[f+3]h)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r&&i>=r.x&&r.x>=o&&i!==r.x&&Ea(ni)&&(ys.x||r.x===s.x&&sx(s,r)))&&(s=r,c=y)}r=r.next}while(r!==d)}return s}function sx(t,e){return Ft(t.prev,t,e.prev)<0&&Ft(e.next,t,t.next)<0}var ae=[],Ti=[],or=new Uint32Array,Ii=new Uint32Array,Ci=new Uint32Array(256);function ox(t,e,r,i){let n=t,a=0;do n.z=qo(n.x,n.y,e,r,i),ae[a++]=n,n=n.next;while(n!==t);lx(a);let s=null;for(let o=0;o=0&&ae[n].z>i;)ae[n+1]=ae[n],n--;ae[n+1]=r}return}or.length>>a&255]++;let s=0;for(let o=0;o<256;o++){let l=Ci[o];Ci[o]=s,s+=l}for(let o=0;o>>a&255]++;i[u]=e[o],n[u]=l}}function qo(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function ux(t){let e=t,r=t;do(e.x=(t-s)*(a-o)&&(t-s)*(i-o)>=(r-s)*(e-o)&&(r-s)*(a-o)>=(n-s)*(i-o)}function hx(t,e){let r=cn(t,e)&&Ft(t.prev,t,t.next)>0&&Ft(e.prev,e,e.next)>0;return t.next.i!==e.i&&(r||pn(t,e)&&pn(e,t)&&(Ft(t.prev,t,e.prev)!==0||Ft(t,e.prev,e)!==0))&&!cx(t,e)&&(r||px(t,e))}function Ft(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function cn(t,e){return t.x===e.x&&t.y===e.y}function ud(t,e,r,i,n=!0){let a=Ft(t,e,r),s=Ft(t,e,i),o=Ft(r,i,t),l=Ft(r,i,e);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)?!0:n?!!(a===0&&Hn(t,r,e)||s===0&&Hn(t,i,e)||o===0&&Hn(r,t,i)||l===0&&Hn(r,e,i)):!1}function Hn(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function cx(t,e){let r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.y,e.y),s=t;do{let o=s.next;if(s.x>i&&o.x>i||s.xa&&o.y>a||s.y=0&&Ft(t,t.prev,e)>=0:Ft(t,e,t.prev)<0||Ft(t,t.next,e)<0}function px(t,e){let r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do{let s=r.next;r.y>a!=s.y>a&&n<(s.x-r.x)*(a-r.y)/(s.y-r.y)+r.x&&(i=!i),r=s}while(r!==t);return i}function hd(t,e){let r=jo(t.i,t.x,t.y),i=jo(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function ec(t,e,r,i){let n=jo(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),$o&&nx(t.prev,t.next)}function jo(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function fx(t,e,r,i){let n=0;for(let a=e,s=r-i;at)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){let e=1<32767||e>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(t)|0,i=Math.round(e)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(t){if(this._granularity<2)return gx(this._vertexBuffer,t);let e=[],r=t.length;for(let i=0;i=1||b<=0)||m&&(ln)){h>=i&&h<=n&&a.push(r[(s+1)%3]);continue}if(!m&&v>0){let _=o+f*v,S=l+d*v;a.push(this._vertexToIndex(_,S))}let D=o+f*Math.max(v,0),A=o+f*Math.min(b,1);if(y||this._generateIntraEdgeVertices(a,o,l,u,h,D,A),!m&&b<1){let _=o+f*b,S=l+d*b;a.push(this._vertexToIndex(_,S))}(m||h>=i&&h<=n)&&a.push(r[(s+1)%3]),!m&&(h<=i||h>=n)&&this._generateInterEdgeVertices(a,o,l,u,h,c,p,A,i,n)}return a}_generateIntraEdgeVertices(t,e,r,i,n,a,s){let o=i-e,l=n-r,u=l===0,h=u?Math.min(e,i):Math.min(a,s),c=u?Math.max(e,i):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;if(u?e=p;d--){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}}_generateInterEdgeVertices(t,e,r,i,n,a,s,o,l,u){let h=n-r,c=a-i,p=s-n,f=(l-n)/p,d=(u-n)/p,y=Math.min(f,d),m=Math.max(f,d),g=i+c*y,x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o=1||m<=0){let _=e-a,S=r-s,k=(l-s)/S,z=(u-s)/S,O=a+_*Math.min(k,z);x=Math.floor(Math.min(O,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(O,o)/this._granularityCellSize)-1,b=o0?u:l;if(b)for(let _=x;_<=v;_++){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}else for(let _=v;_>=x;_--){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}}_generateOutline(t){let e=[];for(let r of t){let i=cr(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let s=1;sn==(a===-32768)?(t.push(r),t.push(e),t.push(this._vertexToIndex(i,a)),t.push(this._vertexToIndex(n,a)),t.push(r),t.push(this._vertexToIndex(i,a))):(t.push(e),t.push(r),t.push(this._vertexToIndex(i,a)),t.push(r),t.push(this._vertexToIndex(n,a)),t.push(this._vertexToIndex(i,a)))}_fillPoles(t,e,r){let i=this._vertexBuffer,n=mt,a=t.length;for(let s=2;s=2&&((s=this._canonical)==null?void 0:s.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(o=>this._removeLinesOutsideTileX(o))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(t){let e=this._vertexBuffer[t*2];return e<0||e>8192}_removeTrianglesOutsideTileX(t){let e=[];for(let r=0;r0?(Math.floor(_/s)+1)*s:(Math.ceil(_/s)-1)*s,O=b>0?(Math.floor(S/s)+1)*s:(Math.ceil(S/s)-1)*s,P=Math.abs(_-z),L=Math.abs(S-O),F=Math.abs(_-y),$=Math.abs(S-m),U=g?P/D:1/0,T=x?L/A:1/0;if((F<=P||!g)&&($<=L||!x))break;if(U0?(r.push(n),r.push(s),r.push(a)):(r.push(n),r.push(a),r.push(s))}return r}function xx(t,e,r){if(e.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=t[e[0]*2];for(let l=1;l=0?s-1:a-1,u=(o+1)%a,h=t[e[l]*2],c=t[e[l]*2+1],p=t[e[u]*2],f=t[e[u]*2+1],d=t[e[s]*2],y=t[e[s]*2+1],m=t[e[o]*2],g=t[e[o]*2+1],x=!1;if(hp)x=!1;else{let v=g-y,b=-(m-d),D=y((p-d)*v+(f-y)*b)*D&&(x=!0)}if(x){let v=e[l],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),s--,s<0&&(s=a-1)}else{let v=e[u],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),o++,o>=a&&(o=0)}if(l===u)break}}function pd(t,e,r,i,n,a,s,o,l){let u=n.length/2,h=s&&o&&l;if(uee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=Zi(s,i,a,o,p,y,u),b=Zi(s,i,a,o,f,m,u),D=Zi(s,i,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+D-l),u.primitiveLength++}}function bx(t,e,r,i,n,a){let s=[];for(let c=0;cee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,h=0);let x=Zi(s,i,a,o,f,y,u),v=Zi(s,i,a,o,d,m,u);r.emplaceBack(h+x-l,h+v-l),u.primitiveLength++}}var fd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Km,this.indexArray=new wn,this.indexArray2=new Io,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.segments2=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("fill",this.layers,e);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r,e.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;if(this.hasDependencies){let f=Gl("fill",this.layers,l,{zoom:this.zoom},e);this.patternFeatures.push(f)}else this.addFeature(l,u,h,r,{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:t,canonical:e,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity)}detectSdfPatterns(t){for(let e of this.patternFeatures)for(let r in e.patterns){let i=e.patterns[r];this.recordSdfPattern(r,t[i.min]),this.recordSdfPattern(r,t[i.mid]),this.recordSdfPattern(r,t[i.max])}for(let e of this.layers){let r=e.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(e.id,t[r.from.toString()]),this.recordSdfPattern(e.id,t[r.to.toString()]))}}recordSdfPattern(t,e){if(!e)return;let r=e.sdf===!0,i=this.sdfPatterns[t];i===void 0?this.sdfPatterns[t]=r:i!==r&&Bt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${t}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,r,i,n,a){for(let s of Ra(e,500)){let o=cd(s,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;pd((u,h)=>{l.emplaceBack(u,h)},this.segments,this.layoutVertexArray,this.indexArray,o.verticesFlattened,o.indicesTriangles,this.segments2,this.indexArray2,o.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}};C("FillBucket",fd,{omit:["layers","patternFeatures"]});var wx,Dx=()=>wx||(wx=new Xt({"fill-sort-key":new N(w.layout_fill["fill-sort-key"],"fill-sort-key")})),_x,Ax=()=>_x||(_x=new Xt({"fill-antialias":new V(w.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new N(w.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new V(w.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new N(w.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new N(w.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new V(w.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new V(w.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new on(w.paint_fill["fill-pattern"],"fill-pattern")})),Sx={get paint(){return Ax()},get layout(){return Dx()}};var Ex=class extends de{constructor(t,e){super(t,Sx,e)}recalculate(t,e){super.recalculate(t,e);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new fd(t)}queryRadius(){return Ha(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:i}){return Qf(Ka(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),e)}isTileClipped(){return!0}},Go=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Fx=At([{name:"a_centroid",components:2,type:"Int16"}],4),kx=Go.members;Go.size,Go.alignment;var Fa=class Xo{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let r=new Xo;return r.extend(e(new B(this.minX,this.minY))),r.extend(e(new B(this.maxX,this.minY))),r.extend(e(new B(this.minX,this.maxY))),r.extend(e(new B(this.maxX,this.maxY))),r}static fromPoints(e){let r=new Xo;for(let i of e)r.extend(i);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}},g5=Fa.fromPoints([new B(0,0),new B(mt,mt)]);function Yo(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function rc(t){return t.every(e=>e.x<0)||t.every(e=>e.x>8192)||t.every(e=>e.y<0)||t.every(e=>e.y>8192)}var Dn=class{constructor(t,e,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n;t.pos>3,a===0)continue}if(a--,n===1)s+=t.readSVarint(),o+=t.readSVarint(),i&&r.push(i),i=[new B(s,o)];else if(n===2)s+=t.readSVarint(),o+=t.readSVarint(),i&&i.push(new B(s,o));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=1,i=0,n=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos>3,i===0)continue}if(i--,r===1||r===2)n+=t.readSVarint(),a+=t.readSVarint(),no&&(o=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(t,e,r){let i=this.extent*2**r,n=this.extent*t,a=this.extent*e,s=this.loadGeometry();function o(c){return[(c.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(c.y+a)*2/i)*Math.PI))-90]}function l(c){return c.map(o)}let u;if(this.type===1){let c=[];for(let f of s)c.push(f[0]);let p=l(c);u=c.length===1?{type:"Point",coordinates:p[0]}:{type:"MultiPoint",coordinates:p}}else if(this.type===2){let c=s.map(l);u=c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}}else if(this.type===3){let c=dd(s),p=[];for(let f of c)p.push(f.map(l));u=p.length===1?{type:"Polygon",coordinates:p[0]}:{type:"MultiPolygon",coordinates:p}}else throw Error("unknown feature type");let h={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(h.id=this.id),h}};Dn.types=["Unknown","Point","LineString","Polygon"];function dd(t){let e=t.length;if(e<=1)return[t];let r=[],i,n;for(let a=0;a=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];let e=this._pbf.readVarint()+this._pbf.pos;return new Dn(this._pbf,e,this.extent,this._keys,this._values)}};function Cx(t){let e=null,r=t.readVarint()+t.pos;for(;t.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ui(F1(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let r=Math.PI/180,i=this.lat*r,n=e.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-this.lng)*r);return yd*Math.acos(Math.min(a,1))}static convert(e){if(e instanceof Ui)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Ui(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e)return new Ui(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},md=2*Math.PI*yd;function gd(t){return md*Math.cos(t*Math.PI/180)}function Mx(t){return(180+t)/360}function Bx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Px(t,e){return t/gd(e)}function zx(t){return t*360-180}function Wo(t){let e=180-t*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Lx(t,e){return t*gd(Wo(e))}function Vx(t){return 1/Math.cos(t*Math.PI/180)}var Yl=class xd{constructor(e,r,i=0){this.x=+e,this.y=+r,this.z=+i}static fromLngLat(e,r=0){let i=ic.convert(e);return new xd(Mx(i.lng),Bx(i.lat),Px(r,i.lat))}toLngLat(){return new ic(zx(this.x),Wo(this.y))}toAltitude(){return Lx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/md*Vx(Wo(this.y))}};function Ox(t,e,r){let i=1/(1<Nx(n,i))}function $x(t,e){let r=Rx(mt/2,mt/2,e),i=Yl.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;)e.pop();return e}function qx(t,e,r,i,n){let a=e.sub(r),s=i.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6){t.push(r.clone());return}a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){t.push(r.clone());return}let h=.2,c=Math.min(n,o*h,l*h),p=r.add(a.mult(c)),f=r.add(s.mult(c)),d=Math.sqrt((1+u)/2),y=r.add(a.add(s)._unit()._mult(c/d)),m=p.sub(y).angleWith(f.sub(y)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let x=0;x<=g;x++)t.push(p.rotateAround(x/g*m,y))}var js=8192;function Mi(t,e,r,i,n,a,s,o){t.emplaceBack(e,r,Math.floor(i*js)*2+s,n*js*2,a*js*2,Math.round(o))}var vd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Jm,this.centroidVertexArray=new Zm,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.features=[],this.hasDependencies=Aa("fill-extrusion",this.layers,e);let i=new st(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),s=n._featureFilter.needGeometry;for(let{feature:o,id:l,index:u,sourceLayerIndex:h}of t){let c=hi(o,s);if(!n._featureFilter.filter(i,c,r))continue;let p=s?c.geometry:Ar(o),f={id:l,sourceLayerIndex:h,index:u,geometry:a>0?nc(p,a,r):p,properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(Gl("fill-extrusion",this.layers,f,{zoom:this.zoom},e)):this.addFeature(f,f.geometry,u,r,{},e.subdivisionGranularity),e.featureIndex.insert(o,f.geometry,u,h,this.index,!0)}}addFeatures({options:t,canonical:e,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,e,r,t.subdivisionGranularity)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kx),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Fx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,r,i,n,a){let s=this.layers[0],o=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,l=o>0?nc(e,o,i):e;for(let u of Ra(l,500)){let h={x:0,y:0,sampleCount:0},c=this.layoutVertexArray.length;this.processPolygon(h,i,t,u,a);let p=this.layoutVertexArray.length-c,f=Math.floor(h.x/h.sampleCount),d=Math.floor(h.y/h.sampleCount);for(let y=0;y{Mi(u,h,c,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let r=0;for(let i=1;iee.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=n.sub(a)._perp()._unit(),o=a.dist(n);r+o>32768&&(r=0),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,1,r),r+=o,Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}};function jx(t,e){for(let r=0;rGx||(Gx=new Xt({"fill-extrusion-rounded-corner-distance":new V(w["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Yx,Wx=()=>Yx||(Yx=new Xt({"fill-extrusion-opacity":new V(w["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new N(w["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new V(w["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new V(w["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new on(w["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new N(w["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new N(w["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new V(w["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),Zx={get paint(){return Wx()},get layout(){return Xx()}};var Hx=class extends de{constructor(t,e){super(t,Zx,e)}createBucket(t){return new vd(t)}queryRadius(){return Ha(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=Ka(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=Qx(o,s,0),c=Jx(i,u,l,s),p=c[0],f=c[1];return Kx(p,f,h)}};function Bi(t,e){return t.x*e.x+t.y*e.y}function ac(t,e){if(t.length===1){let r=0,i=e[r++],n;for(;!n||i.equals(n);)if(n=e[r++],!n)return 1/0;for(;r>1),s=r-e,o,l=t[e],u=t[e+1],h=t[r],c=t[r+1];for(let p=e+3;pn){o=p,n=f;continue}if(f===n){let d=Math.abs(p-a);di&&(o-e>3&&Zo(t,e,o,i),t[o+2]=n,r-o>3&&Zo(t,o,r,i))}function t2(t,e,r,i,n,a){let s=n-r,o=a-i;if(s!==0||o!==0){let l=((t-r)*s+(e-i)*o)/(s*s+o*o);l>1?(r=n,i=a):l>0&&(r+=s*l,i+=o*l)}return s=t-r,o=e-i,s*s+o*o}function Mt(t,e,r,i){let n={type:e,geom:r},a={id:t!=null?t:null,type:n.type,geometry:n.geom,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(n.type){case"Point":case"MultiPoint":Pi(a,n.geom);break;case"LineString":Pi(a,n.geom.points);break;case"Polygon":Pi(a,n.geom[0].points);break;case"MultiLineString":for(let s of n.geom)Pi(a,s.points);break;case"MultiPolygon":for(let s of n.geom)Pi(a,s[0].points)}return a}function Wl(t){let e=t;t.points.length>64&&(e.points=new Float64Array(t.points))}function Pi(t,e){for(let r=0;r1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if(e.geometry.type==="GeometryCollection"){r2(t,e,e.geometry,r,i,n+1);return}if(!((o=e.geometry.coordinates)!=null&&o.length))return;let a=e2(e,r,i),s=(r.tolerance/((1<0&&(s+=i?(n*h-u*a)/2:Math.sqrt((u-n)**2+(h-a)**2)),n=u,a=h}let o=e.points.length-3;e.points[2]=1,r>0&&Zo(e.points,0,o,r),e.points[o+2]=1,Wl(e),e.size=Math.abs(s),e.start=0,e.end=e.size}function Kl(t,e,r,i){for(let n=0;n1?1:r}function u2(t){return{type:"FeatureCollection",features:t.map(e=>ka(e))}}function ka(t){let e={type:"Feature",geometry:h2(t),properties:t.tags};return t.id!=null&&(e.id=t.id),e}function h2(t){let{type:e,geometry:r}=t;switch(e){case"Point":return{type:e,coordinates:bd(r[0],r[1])};case"MultiPoint":return{type:e,coordinates:Kn(r)};case"LineString":return{type:e,coordinates:Kn(r.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:r.map(i=>Kn(i.points))};case"MultiPolygon":return{type:e,coordinates:r.map(i=>i.map(n=>Kn(n.points)))}}}function Kn(t){let e=[];for(let r=0;r=r&&s=i)return null;let l=[];for(let u of t){let h=n===0?u.minX:u.minY,c=n===0?u.maxX:u.maxY;if(h>=r&&c=i))switch(u.type){case"Point":case"MultiPoint":c2(u,l,r,i,n);continue;case"LineString":p2(u,l,r,i,n,o);continue;case"MultiLineString":f2(u,l,r,i,n);continue;case"Polygon":d2(u,l,r,i,n);continue;case"MultiPolygon":y2(u,l,r,i,n);continue}}return l.length?l:null}function c2(t,e,r,i,n){let a=[];if(m2(t.geometry,a,r,i,n),!a.length)return;let s=a.length===3?"Point":"MultiPoint";e.push(Mt(t.id,s,a,t.tags))}function p2(t,e,r,i,n,a){let s=[];if(_d(t.geometry,s,r,i,n,!1,a.lineMetrics),s.length){if(a.lineMetrics){for(let o of s)e.push(Mt(t.id,"LineString",o,t.tags));return}if(s.length>1){e.push(Mt(t.id,"MultiLineString",s,t.tags));return}e.push(Mt(t.id,"LineString",s[0],t.tags))}}function f2(t,e,r,i,n){let a=[];if(Jl(t.geometry,a,r,i,n,!1),a.length){if(a.length===1){e.push(Mt(t.id,"LineString",a[0],t.tags));return}e.push(Mt(t.id,"MultiLineString",a,t.tags))}}function d2(t,e,r,i,n){let a=[];Jl(t.geometry,a,r,i,n,!0),a.length&&e.push(Mt(t.id,"Polygon",a,t.tags))}function y2(t,e,r,i,n){let a=[];for(let s of t.geometry){let o=[];Jl(s,o,r,i,n,!0),o.length&&a.push(o)}a.length&&e.push(Mt(t.id,"MultiPolygon",a,t.tags))}function m2(t,e,r,i,n){for(let a=0;a=r&&s<=i&&Kr(e,t[a],t[a+1],t[a+2])}}function _d(t,e,r,i,n,a,s){let o=sc(t),l=n===0?g2:x2,u=t.start,h,c;for(let g=0;gr&&(c=l(o,x,v,D,A,r),s&&(o.start=u+h*c)):_>i?S=r&&(c=l(o,x,v,D,A,r),k=!0),S>i&&_<=i&&(c=l(o,x,v,D,A,i),k=!0),!a&&k&&(s&&(o.end=u+h*c),e.push(o),o=sc(t)),s&&(u+=h)}let p=t.points.length-3,f=t.points[p],d=t.points[p+1],y=t.points[p+2],m=n===0?f:d;m>=r&&m<=i&&Kr(o.points,f,d,y),p=o.points.length-3,a&&p>=3&&(o.points[p]!==o.points[0]||o.points[p+1]!==o.points[1])&&Kr(o.points,o.points[0],o.points[1],o.points[2]),o.points.length&&(Wl(o),e.push(o))}function sc(t){return{points:[],size:t.size,start:t.start,end:t.end}}function Jl(t,e,r,i,n,a){for(let s of t)_d(s,e,r,i,n,a,!1)}function Kr(t,e,r,i){t.push(e,r,i)}function g2(t,e,r,i,n,a){let s=(a-e)/(i-e);return Kr(t.points,a,r+(n-r)*s,1),s}function x2(t,e,r,i,n,a){let s=(a-r)/(n-r);return Kr(t.points,e+(i-e)*s,a,1),s}function Ql(t,e){let r=e.buffer/e.extent,i=t,n=Te(t,1,-1-r,r,0,-1,2,e),a=Te(t,1,1-r,2+r,0,-1,2,e);return!n&&!a||(i=Te(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=oc(n,1).concat(i)),a&&(i=i.concat(oc(a,-1)))),i}function oc(t,e){let r=[];for(let i of t)switch(i.type){case"Point":case"MultiPoint":{let n=v2(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"LineString":{let n=Gs(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiLineString":case"Polygon":{let n=[];for(let a of i.geometry)n.push(Gs(a,e));r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiPolygon":{let n=[];for(let a of i.geometry){let s=[];for(let o of a)s.push(Gs(o,e));n.push(s)}r.push(Mt(i.id,i.type,n,i.tags));continue}}return r}function v2(t,e){let r=[];for(let i=0;io.id));t=t.filter(o=>!s.has(o.id))}if(i.add.size){let s=Zl({type:"FeatureCollection",features:Array.from(i.add.values())},r);s=Ql(s,r),n=n.concat(s),t=t.concat(s)}}if(i.update.size){let a=new Map,s=[];for(let o of t)i.update.has(o.id)?a.set(o.id,[...a.get(o.id)||[],o]):s.push(o);for(let[o,l]of i.update){let u=a.get(o);if(!u||u.length===0)continue;let h=w2(u,l,r);n=n.concat(u,h),s=s.concat(h)}t=s}return{affected:n,source:t}}function w2(t,e,r){var a,s;let i=!!e.newGeometry,n=e.removeAllProperties||((a=e.removeProperties)==null?void 0:a.length)>0||((s=e.addOrUpdateProperties)==null?void 0:s.length)>0;if(i){let o=t[0],l=Zl({type:"FeatureCollection",features:[{type:"Feature",id:o.id,geometry:e.newGeometry,properties:n?lc(o.tags,e):o.tags}]},r);return l=Ql(l,r),l}if(n){let o=[];for(let l of t){let u=je({},l);u.tags=lc(u.tags,e),o.push(u)}return o}return t}function lc(t,e){if(e.removeAllProperties)return{};let r=je({},t||{});if(e.removeProperties)for(let i of e.removeProperties)delete r[i];if(e.addOrUpdateProperties)for(let{key:i,value:n}of e.addOrUpdateProperties)r[i]=n;return r}function D2(t,e){var r,i;return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map((r=t.add)==null?void 0:r.map(n=>[e.promoteId?n.properties[e.promoteId]:n.id,n])),update:new Map((i=t.update)==null?void 0:i.map(n=>[n.id,n]))}:{remove:new Set,add:new Map,update:new Map}}var uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],dt=new Uint32Array(96),_2=class Ad{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(e,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=uc[i&15];if(!a)throw Error("Unrecognized array type.");let[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Ad(o,s,a,void 0,e)}constructor(e,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=uc.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+l+u,e*2),this._pos=e*2,this._finished=!0;else{let h=this.data=new n(8+o+l+u);this.ids=new this.IndexArrayType(h,8,e),this.coords=new i(h,8+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(h,0,2).set([219,16+s]),new Uint16Array(h,2,1)[0]=r,new Uint32Array(h,4,1)[0]=e}}add(e,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Ho(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=[];for(;l>0;){let h=dt[--l],c=dt[--l],p=dt[--l];if(c-p<=o){for(let m=p;m<=c;m++){let g=s[2*m],x=s[2*m+1];g>=e&&g<=i&&x>=r&&x<=n&&u.push(a[m])}continue}let f=p+c>>1,d=s[2*f],y=s[2*f+1];d>=e&&d<=i&&y>=r&&y<=n&&u.push(a[f]),(h===0?e<=d:r<=y)&&(dt[l++]=p,dt[l++]=f-1,dt[l++]=1-h),(h===0?i>=d:n>=y)&&(dt[l++]=f+1,dt[l++]=c,dt[l++]=1-h)}return u}within(e,r,i){let n=[];return this.withinInto(e,r,i,n),n}withinInto(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=0,h=i*i;for(;l>0;){let c=dt[--l],p=dt[--l],f=dt[--l];if(p-f<=o){for(let g=f;g<=p;g++)hc(s[2*g],s[2*g+1],e,r)<=h&&(n[u++]=a[g]);continue}let d=f+p>>1,y=s[2*d],m=s[2*d+1];hc(y,m,e,r)<=h&&(n[u++]=a[d]),(c===0?e-i<=y:r-i<=m)&&(dt[l++]=f,dt[l++]=d-1,dt[l++]=1-c),(c===0?e+i>=y:r+i>=m)&&(dt[l++]=d+1,dt[l++]=p,dt[l++]=1-c)}return u}};function Ho(t,e,r,i,n,a){if(n-i<=r)return;let s=i+n>>1;Sd(t,e,s,i,n,a),Ho(t,e,r,i,s-1,1-a),Ho(t,e,r,s+1,n,1-a)}function Sd(t,e,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,h=r-i+1,c=Math.log(u),p=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*p*(u-p)/u)*(h-u/2<0?-1:1);Sd(t,e,r,Math.max(i,Math.floor(r-h*p/u+f)),Math.min(n,Math.floor(r+(u-h)*p/u+f)),a)}let s=e[2*r+a],o=i,l=n;for(zi(t,e,i,r),e[2*n+a]>s&&zi(t,e,i,n);os;)l--}e[2*i+a]===s?zi(t,e,i,l):(l++,zi(t,e,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function zi(t,e,r,i){Xs(t,r,i),Xs(e,2*r,2*i),Xs(e,2*r+1,2*i+1)}function Xs(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function hc(t,e,r,i){let n=t-r,a=e-i;return n*n+a*a}var Ko={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},A2=class{constructor(t){this.options=Object.assign(Object.create(Ko),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){let e=[];for(let r of t){if(!r.geometry)continue;let[i,n]=r.geometry.coordinates,[a,s]=[Zr(i),Hr(n)],o={id:r.id,type:"Point",geometry:[a,s],tags:r.properties};e.push(o)}this.createIndex(e)}initialize(t){let e=[];for(let r of t)r.type==="Point"&&e.push(r);this.createIndex(e)}updateIndex(t,e,r){this.options=Object.assign(Object.create(Ko),r.clusterOptions),this.initialize(t)}createIndex(t){let{log:e,minZoom:r,maxZoom:i}=this.options;e&&console.time("total time");let n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;let a=[];for(let o=0;o=r;o--){let l=Date.now();s=this.trees[o]=this.createTree(this.cluster(s,o)),e&&console.log("z%d: %d clusters in %dms",o,s.numItems,Date.now()-l)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(r=>ka(r))}getClustersInternal(t,e){let r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){let h=this.getClustersInternal([r,i,180,a],e),c=this.getClustersInternal([-180,i,n,a],e);return h.concat(c)}let s=this.trees[this.limitZoom(e)],o=s.range(Zr(r),Hr(a),Zr(n),Hr(i)),l=s.flatData,u=[];for(let h of o){let c=this.stride*h;u.push(l[c+5]>1?S2(l,c,this.clusterProps):this.points[l[c+3]])}return u}getChildren(t){let e=this.getOriginId(t),r=this.getOriginZoom(t),i=Error("No cluster with the specified id: "+t),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(e*this.stride>=a.length)throw i;let s=this.options.radius/(this.options.extent*2**(r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=n.within(o,l,s),h=[];for(let c of u){let p=c*this.stride;a[p+4]===t&&h.push(a[p+5]>1?E2(a,p,this.clusterProps):ka(this.points[a[p+3]]))}if(h.length===0)throw i;return h}getLeaves(t,e,r){e||(e=10),r||(r=0);let i=[];return this.appendLeaves(i,t,e,r,0),i}getTile(t,e,r){let i=this.trees[this.limitZoom(t)];if(!i)return null;let n=2**t,{extent:a,radius:s}=this.options,o=s/a,l=(r-o)/n,u=(r+1+o)/n,h={transformed:!0,features:[],source:null,x:e,y:r,z:t};return this.addTileFeatures(i.range((e-o)/n,l,(e+1+o)/n,u),i.flatData,e,r,n,h),e===0&&this.addTileFeatures(i.range(1-o/n,l,1,u),i.flatData,n,r,n,h),e===n-1&&this.addTileFeatures(i.range(0,l,o/n,u),i.flatData,-1,r,n,h),h}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,r,i,n){let a=this.getChildren(e);for(let s of a){let o=s.properties;if(o!=null&&o.cluster?n+o.point_count<=i?n+=o.point_count:n=this.appendLeaves(t,o.cluster_id,r,i,n):n1,u,h,c;if(l)u=tu(e,o,this.clusterProps),h=e[o],c=e[o+1];else{let d=this.points[e[o+3]];u=d.tags,[h,c]=d.geometry}let p={type:1,geometry:[[Math.round(this.options.extent*(h*n-r)),Math.round(this.options.extent*(c*n-i))]],tags:u},f;f=l||this.options.generateId?e[o+3]:this.points[e[o+3]].id,f!==void 0&&(p.id=f),a.features.push(p)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,s=r/(i*2**e),o=t.flatData,l=[],u=this.stride;for(let h=0;he&&(y+=o[g+5])}if(y>d&&y>=a){let m=c*d,g=p*d,x,v=-1,b=((h/u|0)<<5)+(e+1)+this.points.length;for(let D of f){let A=D*u;if(o[A+2]<=e)continue;o[A+2]=e;let _=o[A+5];m+=o[A]*_,g+=o[A+1]*_,o[A+4]=b,n&&(x||(x=this.map(o,h,!0),v=this.clusterProps.length,this.clusterProps.push(x)),n(x,this.map(o,A)))}o[h+4]=b,l.push(m/y,g/y,1/0,b,-1,y),n&&l.push(v)}else{for(let m=0;m1)for(let m of f){let g=m*u;if(!(o[g+2]<=e)){o[g+2]=e;for(let x=0;x>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,r){if(t[e+5]>1){let a=this.clusterProps[t[e+6]];return r?Object.assign({},a):a}let i=this.points[t[e+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}};function S2(t,e,r){return{id:t[e+3],type:"Point",tags:tu(t,e,r),geometry:[t[e],t[e+1]]}}function E2(t,e,r){return{type:"Feature",id:t[e+3],properties:tu(t,e,r),geometry:{type:"Point",coordinates:[wd(t[e]),Dd(t[e+1])]}}}function tu(t,e,r){let i=t[e+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,a=t[e+6],s=a===-1?{}:Object.assign({},r[a]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:i,point_count_abbreviated:n})}var Ed="geojsonvt_clip_start",Fd="geojsonvt_clip_end";function cc(t,e,r,i,n){let a=e===n.maxZoom?0:n.tolerance/((1<0&&e.size<(n?s:i)){r.numPoints+=e.points.length/3;return}let o=[];for(let l=0;ls)&&(r.numSimplified++,o.push(e.points[l],e.points[l+1])),r.numPoints++;n&&M2(o,a),t.push(o)}function M2(t,e){let r=0;for(let i=0,n=t.length,a=n-2;i0===e)for(let i=0,n=t.length;i1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],s=cc(t,i,n,a,r);s.source=t;let o=Jn(i,n,a);if(this.tiles[o]=s,this.tileCoords.push({z:i,x:n,y:a,id:o}),r.debug){let l=`z${i}`;this.stats[l]=(this.stats[l]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,r){return null}getTile(t,e,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);let o=t,l=e,u=r,h;for(;!h&&o>0;)o--,l>>=1,u>>=1,h=this.tiles[Jn(o,l,u)];return!(h!=null&&h.source)||(n>1&&(console.log("found parent tile z%d-%d-%d",o,l,u),console.time("drilling down")),this.splitTile(h.source,o,l,u,t,e,r),n>1&&console.timeEnd("drilling down"),!this.tiles[s])?null:pc(this.tiles[s],i)}splitTile(t,e,r,i,n,a,s){let o=[t,e,r,i],l=this.options,u=l.debug;for(;o.length;){i=o.pop(),r=o.pop(),e=o.pop(),t=o.pop();let h=1<1&&console.time("creation"),p=this.tiles[c]=cc(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i,id:c}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let _=`z${e}`;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(p.source=t,n==null){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===n)continue;if(n!=null){let _=n-e;if(r!==a>>_||i!==s>>_)continue}}if(p.source=null,!t.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,v=null,b=null,D=Te(t,h,r-f,r+y,0,p.minX,p.maxX,l),A=Te(t,h,r+d,r+m,0,p.minX,p.maxX,l);D&&(g=Te(D,h,i-f,i+y,1,p.minY,p.maxY,l),x=Te(D,h,i+d,i+m,1,p.minY,p.maxY,l)),A&&(v=Te(A,h,i-f,i+y,1,p.minY,p.maxY,l),b=Te(A,h,i+d,i+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),o.push(g||[],e+1,r*2,i*2),o.push(x||[],e+1,r*2,i*2+1),o.push(v||[],e+1,r*2+1,i*2),o.push(b||[],e+1,r*2+1,i*2+1)}}invalidateTiles(t){if(!t.length)return;let e=this.options,{debug:r}=e,i=1/0,n=-1/0,a=1/0,s=-1/0;for(let u of t)i=Math.min(i,u.minX),n=Math.max(n,u.maxX),a=Math.min(a,u.minY),s=Math.max(s,u.maxY);let o=e.buffer/e.extent,l=new Set;for(let u in this.tiles){let h=this.tiles[u],c=1<=f||s=y)continue;let m=!1;for(let g of t)if(g.maxX>=p&&g.minX=d&&g.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",h.z,h.x,h.y,h.numFeatures,h.numPoints,h.numSimplified);let g=`z${h.z}`;this.stats[g]=(this.stats[g]||0)-1,this.total--}delete this.tiles[u],l.add(u)}}l.size&&(this.tileCoords=this.tileCoords.filter(u=>!l.has(u.id)))}};function Jn(t,e,r){return((1<24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");let i=Zl(t,e);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),i=Ql(i,e),e.updateable&&(this.source=i),this.initializeIndex(i,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new A2(e.clusterOptions):new z2(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,r){return t=+t,e=+e,r=+r,t<0||t>24?null:this.tileIndex.getTile(t,e,r)}updateData(t,e){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=b2(this.source,t,r);e&&({affected:i,source:n}=this.filterUpdate(n,i,e)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(t,e,r){let i=new Set;for(let n of t)n.id!=null&&(r(ka(n))||(e.push(n),i.add(n.id)));return t=t.filter(n=>!i.has(n.id)),{affected:e,source:t}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return u2(this.source)}updateClusterOptions(t,e){let r=this.options.cluster;if(this.options.cluster=t,this.options.clusterOptions=e,r==t){this.tileIndex.updateIndex(this.source,[],this.options);return}this.initializeIndex(this.source,this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,r){return this.tileIndex.getLeaves(t,e,r)}},Jo=At([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),V2=Jo.members;Jo.size,Jo.alignment;var Qo=At([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),O2=Qo.members;Qo.size,Qo.alignment;var R2=Math.cos(75/2*(Math.PI/180)),Id=1/2,fc=2**14/Id,Cd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new Qm,this.layoutVertexArray2=new tg,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("line",this.layers,e)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},dashes:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;this.hasDependencies?(Aa("line",this.layers,e)?Gl("line",this.layers,l,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,e),this.patternFeatures.push(l)):this.addFeature(l,u,h,r,{},{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:t,canonical:e,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,i,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,O2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,V2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,"geojsonvt_clip_start")&&Object.hasOwn(t.properties,"geojsonvt_clip_end"))return{start:+t.properties[Ed],end:+t.properties[Fd]}}addFeature(t,e,r,i,n,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap").evaluate(t,{}),h=o.get("line-miter-limit").evaluate(t,{}),c=o.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(let p of e)this.addLine(p,t,l,u,h,c,i,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(t,e,r,i,n,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(t=cr(t,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&t[h-1].equals(t[h-2]);)h--;let c=0;for(;c0;if(k&&v>c){let L=d.dist(y);if(L>2*p){let F=d.sub(d.sub(y)._mult(p/L)._round());this.updateDistance(y,F),this.addCurrentVertex(F,g,0,0,f),y=F}}let O=y&&m,P=O?r:u?"butt":i;if(O&&P==="round"&&(_n&&(P="bevel"),P==="bevel"&&(_>2&&(P="flipbevel"),_100)b=x.mult(-1);else{let L=_*g.add(x).mag()/g.sub(x).mag();b._perp()._mult(L*(z?-1:1))}this.addCurrentVertex(d,b,0,0,f),this.addCurrentVertex(d,b.mult(-1),0,0,f)}else if(P==="bevel"||P==="fakeround"){let L=-Math.sqrt(_*_-1),F=z?L:0,$=z?0:L;if(y&&this.addCurrentVertex(d,g,F,$,f),P==="fakeround"){let U=Math.round(S*180/Math.PI/20);for(let T=1;T2*p){let F=d.add(m.sub(d)._mult(p/L)._round());this.updateDistance(d,F),this.addCurrentVertex(F,x,0,0,f),d=F}}}}addCurrentVertex(t,e,r,i,n,a=!1){let s=e.x+e.y*r,o=e.y-e.x*r,l=-e.x+e.y*i,u=-e.y-e.x*i;this.addHalfVertex(t,s,o,a,!1,r,n),this.addHalfVertex(t,l,u,a,!0,-i,n),this.distance>fc/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,i,n,a))}addHalfVertex({x:t,y:e},r,i,n,a,s,o){let l=(this.lineClips?this.scaledDistance*(fc-1):this.scaledDistance)*Id;if(this.layoutVertexArray.emplaceBack((t<<1)+ +!!n,(e<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(s===0?0:s<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let h=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(h,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(let e of t){let r=e.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(t,e,r,i){for(let n of t){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let s=n.layout.get("line-cap").evaluate(e,{})==="round",o={dasharray:a.value.evaluate({zoom:r-1},e,{}),round:s},l={dasharray:a.value.evaluate({zoom:r},e,{}),round:s},u={dasharray:a.value.evaluate({zoom:r+1},e,{}),round:s},h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`,p=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[h]=o,i.dashDependencies[c]=l,i.dashDependencies[p]=u,e.dashes[n.id]={min:h,mid:c,max:p}}}};C("LineBucket",Cd,{omit:["layers","patternFeatures"]});var $2,N2=()=>$2||($2=new Xt({"line-cap":new N(w.layout_line["line-cap"],"line-cap"),"line-join":new N(w.layout_line["line-join"],"line-join"),"line-miter-limit":new N(w.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new N(w.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new N(w.layout_line["line-sort-key"],"line-sort-key")})),U2,q2=()=>U2||(U2=new Xt({"line-opacity":new N(w.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new V(w.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new N(w.paint_line["line-color"],"line-color"),"line-translate":new V(w.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new V(w.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new N(w.paint_line["line-width"],"line-width"),"line-gap-width":new N(w.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new N(w.paint_line["line-offset"],"line-offset"),"line-blur":new N(w.paint_line["line-blur"],"line-blur"),"line-dasharray":new on(w.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new on(w.paint_line["line-pattern"],"line-pattern"),"line-gradient":new Wa(w.paint_line["line-gradient"],"line-gradient")})),dc={get paint(){return q2()},get layout(){return N2()}},j2=class extends N{possiblyEvaluate(t,e){return e=new st(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,i){return e=Gt({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,i)}},Qn;var G2=class extends de{constructor(t,e){super(t,dc,e),this.gradientVersion=0,Qn||(Qn=new j2(dc.paint.properties["line-width"].specification,"line-floorwidth"),Qn.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let e=this.gradientExpression();this.stepInterpolant=lm(e)?e._styleExpression.expression instanceof vl:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Qn.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cd(t)}queryRadius(t){let e=t,r=yc(Wr("line-width",this,e),Wr("line-gap-width",this,e)),i=Wr("line-offset",this,e);return r/2+Math.abs(i)+Ha(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let s=Ka(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),o=a/2*yc(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(i=Dg(i,l*a)),mg(s,i,o)}isTileClipped(){return!0}};function yc(t,e){return e>0?e+2*t:t}var X2=At([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),Y2=At([{name:"a_projected_pos",components:3,type:"Float32"}],4);At([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var W2=At([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);At([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);var mc=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),x5=At([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);At([{name:"triangle",components:3,type:"Uint16"}]),At([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Float32",name:"heightOffset"}]),At([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"},{type:"Float32",name:"heightOffset"}]),At([{type:"Float32",name:"offsetX"}]),At([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),At([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wr=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(wr.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,e){return rt(this,null,function*(){if(this.isParsed())return this.getState();if(t.pluginStatus!=="loading")return this.setState(t),t;let r=t.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield e(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};function Z2(t){return/[\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u077F\\u07C0-\\u07FA\\u07FD-\\u07FF\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\u1800\\u1801\\u1804\\u1806-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\uA840-\\uA877\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF80-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDEFF\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB]|\\uD805[\\uDE60-\\uDE6C]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9C-\\uDC9F]|\\uD83A[\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function H2(t){return/[\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC57-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD1F-\\uDD39\\uDD3F-\\uDD59\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F-\\uDE48\\uDE50-\\uDE58\\uDE60-\\uDE9F\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF00-\\uDF35\\uDF39-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD27\\uDD30-\\uDD39\\uDD40-\\uDD65\\uDD69-\\uDD85\\uDD8E\\uDD8F\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEAB-\\uDEAD\\uDEB0\\uDEB1\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDF27\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function K2(t){return/[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t))}function Qa(t){return/[\\u02EA\\u02EB\\u1100-\\u11FF\\u1401-\\u167F\\u18B0-\\u18FF\\u2065\\u20DD-\\u20E0\\u20E2-\\u20E4\\u2B97\\u2BF0-\\u2BFF\\u2E50\\u2E51\\u2E80-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u30FB\\u30FD-\\uA4CF\\uA960-\\uA97F\\uAC00-\\uD7FF\\uF900-\\uFAFF\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7\\uFFF0-\\uFFF8]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|[\\uD80C-\\uD810\\uD81C-\\uD822\\uD83C\\uD83D\\uD840-\\uD87E\\uD880-\\uD8BE][\\uDC00-\\uDFFF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFFF]|\\uD823[\\uDC00-\\uDDFF]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFF]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83E[\\uDD00-\\uDEFF]|[\\uD87F\\uD8BF][\\uDC00-\\uDFFD]/gim.test(String.fromCodePoint(t))}function J2(t){return/[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(t))}function Q2(t){return/[\\r\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0600-\\u0605\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DD\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0890\\u0891\\u0897-\\u089F\\u08CA-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E33-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB3-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1037\\u1039-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1084-\\u1086\\u108D\\u109D\\u1100-\\u11FF\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA960-\\uA97C\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD69-\\uDD6D\\uDEAB\\uDEAC\\uDEFA-\\uDEFF\\uDF46-\\uDF50\\uDF82-\\uDF85]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC70\\uDC73\\uDC74\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCBD\\uDCC2\\uDCCD\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC2\\uDDC3\\uDDC9-\\uDDCC\\uDDCE\\uDDCF\\uDE2C-\\uDE37\\uDE3E\\uDE41\\uDEDF-\\uDEEA\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74\\uDFB8-\\uDFC0\\uDFC2\\uDFC5\\uDFC7-\\uDFCA\\uDFCC-\\uDFD2\\uDFE1\\uDFE2]|\\uD805[\\uDC35-\\uDC46\\uDC5E\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDEAB-\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF2B]|\\uD806[\\uDC2C-\\uDC3A\\uDD30-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDDD1-\\uDDD7\\uDDDA-\\uDDE0\\uDDE4\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE84-\\uDE99\\uDF60-\\uDF67]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDEF3-\\uDEF6\\uDF00-\\uDF03\\uDF34-\\uDF3A\\uDF3E-\\uDF42\\uDF5A]|\\uD80D[\\uDC40\\uDC47-\\uDC55]|\\uD818[\\uDD1E-\\uDD2F]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDD63\\uDD67-\\uDD6A\\uDF4F\\uDF51-\\uDF87\\uDF8F-\\uDF92\\uDFE4\\uDFF0\\uDFF1]|\\uD82F[\\uDC9D\\uDC9E]|\\uD833[\\uDF00-\\uDF2D\\uDF30-\\uDF46]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDC8F\\uDD30-\\uDD36\\uDEAE\\uDEEC-\\uDEEF]|\\uD839[\\uDCEC-\\uDCEF\\uDDEE\\uDDEF\\uDEE3\\uDEE6\\uDEEE\\uDEEF\\uDEF5]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDDE6-\\uDDFF\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF]/.test(t)}function gc(t){return/[\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FD4\\u0FD9\\u0FDA\\u1000-\\u103F\\u1050-\\u108F\\u109A-\\u109F\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19DE\\u19DF\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1AA0-\\u1AAD\\u1B00-\\u1B4C\\u1B4E-\\u1B7F\\uA980-\\uA9CD\\uA9D0-\\uA9D9\\uA9DE-\\uA9EF\\uA9FA-\\uA9FE\\uAA60-\\uAAC2\\uAADB-\\uAADF]|\\uD805[\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF3A\\uDF3B\\uDF3F-\\uDF46]/gim.test(String.fromCodePoint(t))}function tv(t,e){return/(?:[\\u1039\\u17D2\\u1A60\\u1BAB\\u200D\\uAAF6]|\\uD802\\uDE3F|\\uD804[\\uDD33\\uDFD0]|\\uD806[\\uDD3E\\uDE47\\uDE99]|\\uD807[\\uDD45\\uDD97\\uDF42])$/.test(t)||new RegExp("^\\\\p{gc=Mc}","u").test(e)}var ev={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rv={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},iv={\\u0644\\u0622:[65269,65270],\\u0644\\u0623:[65271,65272],\\u0644\\u0625:[65273,65274],\\u0644\\u0627:[65275,65276]},xc=1604,nv=/[\\u0600-\\u06ff\\u0750-\\u077f\\u0870-\\u089f\\u08a0-\\u08ff\\ufb50-\\ufdff\\ufe70-\\ufeff]/;function av(t,e,r){let i=0;for(let n of t.split(";")){let[a,s]=n.split(",").map(l=>parseInt(l,36)),o=i+a;for(let l=o;l{let r=e.codePointAt(0);return{codePoint:r,type:sv(r),form:null}})}function cv(t){let e=t.filter(r=>r.type!=="T");for(let r=0;r0&&ov(e[r-1].type),a=r+1String.fromCodePoint(dv(r))).join("")}function mv(t,e,r){var n;let i=e.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?t=t.toLocaleUpperCase():i==="lowercase"&&(t=t.toLocaleLowerCase()),((n=wr.applyArabicShaping)!=null?n:yv)(t)}function gv(t,e,r){for(let i of t.sections)i.text=mv(i.text,e,r);return t}function xv(t){let e={},r={},i=[],n=0;function a(u){i.push(t[u]),n++}function s(u,h,c){let p=r[u];return delete r[u],r[h]=p,i[p].geometry[0].pop(),i[p].geometry[0]=i[p].geometry[0].concat(c[0]),p}function o(u,h,c){let p=e[h];return delete e[h],e[u]=p,i[p].geometry[0].shift(),i[p].geometry[0]=c[0].concat(i[p].geometry[0]),p}function l(u,h,c){let p=c?h[0][h[0].length-1]:h[0][0];return`${u}:${p.x}:${p.y}`}for(let u=0;uu.geometry)}var Bd=typeof Intl<"u"&&"Segmenter"in Intl,ta,ea;function tl(t){if(!Bd||!Q2(t))return[...t];ta!=null||(ta=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let e=[];for(let{segment:r}of ta.segment(t)){let i=e.length-1;i>=0&&tv(e[i],r)?e[i]+=r:e.push(r)}return e}function vv(t){let e=new Set;if(Bd){ea!=null||(ea=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of ea.segment(t))e.add(i);return e}let r=0;for(let i of t.split(new RegExp("\\\\b|(?=\\\\p{Ideo})","u")))e.add(r),r+=i.length;return e}function Pd(t){let e=t.codePointAt(0);return t.length>(e>65535?2:1)}function ru(t){return/\\s/u.test(String.fromCodePoint(t))}function el(t){for(let e of t)if(Qa(e.codePointAt(0)))return!0;return!1}function bv(t){for(let e of t)if(!wv(e.codePointAt(0)))return!1;return!0}function wv(t){return!Z2(t)}function vc(t){return!(Qa(t)||J2(t))}function zd(t){return new RegExp("\\\\p{sc=Arab}","u").test(String.fromCodePoint(t))}function Ld(t){return H2(t)}function Vd(t){for(let e of t)if(Ld(e.codePointAt(0)))return!0;return!1}var Gr={"!":"\\uFE15","#":"\\uFF03",$:"\\uFF04","%":"\\uFF05","&":"\\uFF06","(":"\\uFE35",")":"\\uFE36","*":"\\uFF0A","+":"\\uFF0B",",":"\\uFE10","-":"\\uFE32",".":"\\u30FB","/":"\\uFF0F",":":"\\uFE13",";":"\\uFE14","<":"\\uFE3F","=":"\\uFF1D",">":"\\uFE40","?":"\\uFE16","@":"\\uFF20","[":"\\uFE47","\\\\":"\\uFF3C","]":"\\uFE48","^":"\\uFF3E",_:"\\uFE33","`":"\\uFF40","{":"\\uFE37","|":"\\u2015","}":"\\uFE38","~":"\\uFF5E","\\xA2":"\\uFFE0","\\xA3":"\\uFFE1","\\xA5":"\\uFFE5","\\xA6":"\\uFFE4","\\xAC":"\\uFFE2","\\xAF":"\\uFFE3","\\u2013":"\\uFE32","\\u2014":"\\uFE31","\\u2018":"\\uFE43","\\u2019":"\\uFE44","\\u201C":"\\uFE41","\\u201D":"\\uFE42","\\u2026":"\\uFE19","\\u22EF":"\\uFE19","\\u2027":"\\u30FB","\\u20A9":"\\uFFE6","\\u3001":"\\uFE11","\\u3002":"\\uFE12","\\u3008":"\\uFE3F","\\u3009":"\\uFE40","\\u300A":"\\uFE3D","\\u300B":"\\uFE3E","\\u300C":"\\uFE41","\\u300D":"\\uFE42","\\u300E":"\\uFE43","\\u300F":"\\uFE44","\\u3010":"\\uFE3B","\\u3011":"\\uFE3C","\\u3014":"\\uFE39","\\u3015":"\\uFE3A","\\u3016":"\\uFE17","\\u3017":"\\uFE18","\\uFF01":"\\uFE15","\\uFF08":"\\uFE35","\\uFF09":"\\uFE36","\\uFF0C":"\\uFE10","\\uFF0D":"\\uFE32","\\uFF0E":"\\u30FB","\\uFF1A":"\\uFE13","\\uFF1B":"\\uFE14","\\uFF1C":"\\uFE3F","\\uFF1E":"\\uFE40","\\uFF1F":"\\uFE16","\\uFF3B":"\\uFE47","\\uFF3D":"\\uFE48","\\uFF3F":"\\uFE33","\\uFF5B":"\\uFE37","\\uFF5C":"\\u2015","\\uFF5D":"\\uFE38","\\uFF5F":"\\uFE35","\\uFF60":"\\uFE36","\\uFF61":"\\uFE12","\\uFF62":"\\uFE41","\\uFF63":"\\uFE42"};function Dv(t){let e="",r={premature:!0,value:void 0},i=t[Symbol.iterator](),n=i.next(),a=t[Symbol.iterator]();a.next();let s=a.next();for(;!n.done;)(s.done||!vc(s.value.codePointAt(0))||Gr[s.value])&&(r.premature||!vc(r.value.codePointAt(0))||Gr[r.value])&&Gr[n.value]?e+=Gr[n.value]:e+=n.value,r={value:n.value,premature:!1},n=i.next(),s=a.next();return e}var _v={10:!0,13:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Av={40:!0};function bc(t,e,r,i,n,a){if("fontStack"in e){let s=r[e.fontStack],o=s==null?void 0:s[t];if(o)return o.metrics.advance*e.scale+n;let l=0;for(let u of t){let h=s==null?void 0:s[u];h&&(l+=h.metrics.advance*e.scale+n)}return l}{let s=i[e.imageName];return s?s.displaySize[0]*e.scale*24/a+n:0}}function wc(t,e,r,i){let n=(t-e)**2;return i?tr&&Dc(e[i-1]);)i--;this.text=e.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(e,r){let i=this.graphemes().slice(e,r).join(""),n=this.sectionIndex.slice(e,r);return new rl(i,this.sections,n)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=tl(n+e);this.text+=e,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let s=a.length-+!!n;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,r,i,n,a){let s=[],o=this.determineAverageLineWidth(e,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),h=null,c=0,p=0;for(let f=0;f0){let y=u[f-1].codePointAt(0),m=d.codePointAt(0),g=K2(y),x=gc(y)&&gc(m);(_v[y]||g||"imageName"in this.getSection(f-1)||u[f+1]!==void 0&&Av[m]||x&&(h!=null?h:h=vv(this.text)).has(p))&&s.push(_c(f,c,o,s,Sv(y,m,g&&l),!1))}ru(d.codePointAt(0))||(c+=bc(d,this.getSection(f),i,n,e,a)),p+=d.length}return Od(_c(this.length(),c,o,s,0,!0))}determineAverageLineWidth(e,r,i,n,a){let s=0,o=0;for(let u of this.graphemes()){let h=this.getSection(o);s+=bc(u,h,i,n,e,a),o++}let l=Math.max(1,Math.ceil(s/r));return s/l}};function Ev(){return(function(t){var e={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(e).forEach(function(R,J){r[R]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(R,J){var W=0,M=new Map,ut=J&&new Map,X;return R.split(",").forEach(function G(K){if(K.indexOf("+")!==-1)for(var Nt=+K;Nt--;)G(X);else{X=K;var vt=K.split(">"),nt=vt[0],Tt=vt[1];nt=String.fromCodePoint(W+=parseInt(nt,36)),Tt=String.fromCodePoint(W+=parseInt(Tt,36)),M.set(nt,Tt),J&&ut.set(Tt,nt)}}),{map:M,reverseMap:ut}}var y,m,g;function x(){if(!y){var R=d(f.pairs,!0),J=R.map,W=R.reverseMap;y=J,m=W,g=d(f.canonical,!1).map}}function v(R){return x(),y.get(R)||null}function b(R){return x(),m.get(R)||null}function D(R){return x(),g.get(R)||null}var A=r.L,_=r.R,S=r.EN,k=r.ES,z=r.ET,O=r.AN,P=r.CS,L=r.B,F=r.S,$=r.ON,U=r.BN,T=r.NSM,q=r.AL,at=r.LRO,ot=r.RLO,pt=r.LRE,Et=r.RLE,qt=r.PDF,Ht=r.LRI,Ve=r.RLI,ye=r.FSI,Kt=r.PDI;function Oe(R,J){for(var W=125,M=new Uint32Array(R.length),ut=0;ut0)Fe--;else if(rs>0){for(Ne=0;!lt[lt.length-1]._isolate;)lt.pop();var is=lt[lt.length-1]._isolInitIndex;is!=null&&(Nt.set(is,zt),Nt.set(zt,is)),lt.pop(),rs--}bt=lt[lt.length-1],K[zt]=bt._level,bt._override&&G(zt,bt._override)}else Lt&qt?(Fe===0&&(Ne>0?Ne--:!bt._isolate&<.length>1&&(lt.pop(),bt=lt[lt.length-1])),K[zt]=bt._level):Lt&L&&(K[zt]=nt.level);else K[zt]=bt._level,bt._override&&Lt!==U&&G(zt,bt._override)}for(var Cr=[],me=null,ar=nt.start;ar<=nt.end;ar++){var ns=M[ar];if(!(ns&o)){var Bu=K[ar],Pu=ns&n,Wy=ns===Kt;me&&Bu===me._level?(me._end=ar,me._endsWithIsolInit=Pu):Cr.push(me={_start:ar,_end:ar,_level:Bu,_startsWithPDI:Wy,_endsWithIsolInit:Pu})}}for(var as=[],Sn=0;Sn=0;kn--)if(!(M[kn]&o)){Vu=K[kn];break}var us=Mr[Mr.length-1],Hy=K[us],Ou=nt.level;if(!(M[us]&n)){for(var Tn=us+1;Tn<=nt.end;Tn++)if(!(M[Tn]&o)){Ou=K[Tn];break}}as.push({_seqIndices:Mr,_sosType:Math.max(Vu,Zy)%2?_:A,_eosType:Math.max(Ou,Hy)%2?_:A})}}for(var hs=0;hs=0;Cn--)if(!(M[j[Cn]]&o)){ps=M[j[Cn]];break}G(Ru,ps&(n|Kt)?$:ps)}}if(X.get(S))for(var Mn=0;Mn=-1;Bn--){var Nu=Bn===-1?yi:M[j[Bn]];if(Nu&a){Nu===q&&G($u,O);break}}}if(X.get(q))for(var fs=0;fs=0&&(Pr=M[j[ms]],Pr&o);ms--);for(var gs=mi+1;gs=0&&M[j[Pn]]&(z|o);Pn--)G(j[Pn],S);for(ge++;ge=0&&M[j[zn]]&o;zn--)G(j[zn],$);for(var Ln=gi+1;Ln=0;bi--){var bs=zr[bi].char;if(bs===Yu||bs===b(D(vi))||v(D(bs))===vi){Vn.push([zr[bi].seqIndex,Lr]),zr.length=bi;break}}}Vn.sort(function(Yt,ue){return Yt[0]-ue[0]});for(var ws=0;ws=0;As--){var Ju=j[As];if(M[Ju]&Xu){var Qu=M[Ju]&xi?_:A;xe=Qu===Br?Br:Qu;break}}}if(xe){if(M[j[On]]=M[j[Ds]]=xe,xe!==Br){for(var wi=On+1;wi=0;_i--)if(M[j[_i]]&o)th=_i;else{Es=M[j[_i]]&xi?_:A;break}for(var eh=Ky,Ai=Ue+1;Ai=0&&c(R[$n])&l;$n--)K[$n]=nt.level}}return{levels:K,paragraphs:vt};function rh(Yt,ue){for(var Wt=Yt;Wt=K&&c(R[nt])&l;nt--)vt[nt]=G.level;for(var Tt=G.level,di=1/0,nr=0;nrTt&&(Tt=Re),Re=di;$e--)for(var lt=0;lt=$e){for(var bt=lt;lt+1=$e;)lt++;lt>bt&&X.push([bt+K,lt+K])}}}),X}function Tr(R,J,W,M){var ut=Ir(R,J,W,M),X=[].concat(R);return ut.forEach(function(G,K){X[K]=(J.levels[G]&1?kt(R[G]):null)||R[G]}),X.join("")}function Ir(R,J,W,M){for(var ut=ir(R,J,W,M),X=[],G=0;G=0;i--){let n=nu.getBidiCharTypeName(t[i].text[0]);Tv.has(n)?(t[i].level=e,r=!0):r&&kv.has(n)?t[i].level=e:r=!1}}function Mv(t,e){let r=e,i=1/0;for(let{level:a}of t)a>r&&(r=a),(a|1)=i;a--)for(let s=0;s=a;)o++;for(let l=s,u=o;le>=n.start&&e<=n.end))==null?void 0:r.level)!=null?i:0}function zv(t,e,r,i,n){let a=Iv(t,e,i,n);Cv(a,r);let s="",o=[];for(let l of Mv(a,r)){if(Fv.test(l.text))continue;let u=Bv(l);s+=u,o.push(...Array(u.length).fill(l.index))}return{text:s,sourceIndices:o}}function Lv(t,e){let r=e.filter(a=>a>0&&aa-s),n=[];for(let a=0;a+1n.start))).map(([n,a])=>zv(t,r,Pv(i,n),n,a))}function Vv(t,e){return Rd(t,e).map(r=>r.text)}function Ov(t,e,r){return Rd(t,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=e[n])!=null?a:0})])}var il=4294967296,Ac=1/il,Sc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),au=class{constructor(t){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(t,e,r=this.length){let i;for(;i=this.nextField(r);)t(i,e,this);return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*il;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*il;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let e=this.buf,r=e[this.pos++];if(r<128)return r;let i=r&127,n;return n=e[this.pos++],i|=(n&127)<<7,n<128||(n=e[this.pos++],i|=(n&127)<<14,n<128)||(n=e[this.pos++],i|=(n&127)<<21,n<128)?i:(n=e[this.pos],i|=(n&15)<<28,$v(i,t,this))}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sc?Sc.decode(this.buf.subarray(e,t)):tb(this.buf,e,t)}readBytes(){let t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){let r=this.readPackedEnd();for(;this.pos=t)return 0;let e=this.readVarint();return this.type=e&7,this._valueStart=this.pos,e>>>3}skip(t){let e=t&7;if(e===0)for(;this.buf[this.pos++]>127;);else if(e===2)this.pos=this.readVarint()+this.pos;else if(e===5)this.pos+=4;else if(e===1)this.pos+=8;else throw Error(`Unimplemented type: ${e}`)}},Rv=class{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e=0&&t<128){this.pos>=this.length&&this.realloc(1),this.buf[this.pos++]=t;return}if(t>268435455||t<0){Uv(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;let e=this.pos;this.pos=eb(this.buf,t,this.pos);let r=this.pos-e;r>=128&&Ec(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let e=t.length;this.writeVarint(e),this.realloc(e),this.buf.set(t,this.pos),this.pos+=e}writeRawMessage(t,e){this.pos++;let r=this.pos;t(e,this);let i=this.pos-r;i>=128&&Ec(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Gv,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Xv,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Zv,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Yv,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Wv,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,Hv,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Kv,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Jv,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Qv,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}};function $v(t,e,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return Nv(t,n,e);throw Error("Expected varint not more than 10 bytes")}function Nv(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Uv(t,e){let r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),qv(r,i,e),jv(i,e)}function qv(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function jv(t,e){let r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Ec(t,e,r){let i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i),r.buf.copyWithin(t+i,t,r.pos)}function Gv(t,e){let r=t.length,i=e.buf,n=e.pos,a=e.length;for(let s=0;sa){e.pos=n,e.writeVarint(o),i=e.buf,n=e.pos,a=e.length;continue}for(;o>127;)i[n++]=o%128|128,o=Math.floor(o/128);i[n++]=o}e.pos=n}function Xv(t,e){for(let r=0;r239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function eb(t,e,r){for(let i=0,n,a;i55295&&n<57344)if(a){if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}else a&&(a=(t[r++]=239,t[r++]=191,t[r++]=189,null));n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}function rb(t){return typeof(t==null?void 0:t.renderWithWebGL)=="function"}function su(t){let e=0,r=0;for(let s of t)e+=s.w*s.h,r=Math.max(r,s.w);t.sort((s,o)=>o.h-s.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],n=0,a=0;for(let s of t)for(let o=i.length-1;o>=0;o--){let l=i[o];if(!(s.w>l.w||s.h>l.h)){if(s.x=l.x,s.y=l.y,a=Math.max(a,s.y+s.h),n=Math.max(n,s.x+s.w),s.w===l.w&&s.h===l.h){let u=i.pop();u&&o=r;a--)e.push(a);r=i+1}else{for(let a=r;at.toCodeUnitIndex(a)),i=wr.isParsed()?wr:null;if(t.sections.length===1)return i?i.processBidirectionalText(t.toString(),r).map(a=>kc(a,t.sections,[...a].map(()=>0))):Vv(t.toString(),r).map(a=>nl([...a],t.sections,[...a].map(()=>0)));let n=sb(t);return i?i.processStyledBidirectionalText(t.text,n,r).map(([a,s])=>kc(a,t.sections,s)):Ov(t.text,n,r).map(([a,s])=>{let o=[...a];return nl(o,t.sections,Ud(o).map(l=>{var u;return(u=s[l])!=null?u:0}))})}function nl(t,e,r){var a;let i=new iu(t.join(""),e,[]),n=0;for(let s of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...s].length;return i}function Ud(t){let e=[],r=0;for(let i of t)e.push(r),r+=i.length;return e}function kc(t,e,r){let i=[...t],n=Ud(i),a=ab(i);return nl(a.map(s=>i[s]),e,a.map(s=>{var o;return(o=r[n[s]])!=null?o:0}))}function ra(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d){let y=iu.fromFeature(t,n);c===2&&y.verticalizePunctuation();let m=y.determineLineBreaks(u,a,e,i,f),g=Vd(y.text)?ob(y,m):nb(y,m),x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return mb(v,e,r,i,g,s,o,l,c,u,p,d),!ib(x)&&v}function qd(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function lb(t,e,r){let i=e.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=e.getMaxImageSize(t),s=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:s}}function jd(t){switch(t){case"top":return 0;case"center":return .5;default:return 1}}function ub(t,e,r,i){var a;if(t!=null&&t.rect)return t;let n=(a=e[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function hb(t,e,r){return!(t===1||!e&&!Qa(r)||e&&(ru(r)||zd(r)))}function da(t){return new RegExp("\\\\p{Nd}","u").test(String.fromCodePoint(t))}function Gd(t){return new RegExp("\\\\p{Lu}","u").test(String.fromCodePoint(t))}function cb(t){return/[\\p{P}\\p{S}]/u.test(String.fromCodePoint(t))}function pb(t){let e=t.some(da)&&t.every(i=>da(i)||cb(i)),r=t.length<=3&&t.every(i=>Gd(i)||da(i));return e||r}function fb(t){return(da(t)||Gd(t))&&!zd(t)}function db(t,e){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map(Qa),n=a=>!i[a]&&!ru(r[a])&&!("imageName"in t.getSection(a));for(let a=0;au){let p=Math.ceil(i/u);r*=p/n,n=p}return{x1:e,y1:r,x2:e+i,y2:r+n}}function Tc(t,e,r,i,n,a){let s=t.image,o;if(s.content){let m=s.content,g=s.pixelRatio||1;o=[m[0]/g,m[1]/g,s.displaySize[0]-m[2]/g,s.displaySize[1]-m[3]/g]}let l=e.left*a,u=e.right*a,h,c,p,f;r==="width"||r==="both"?(f=n[0]+l-i[3],c=n[0]+u+i[1]):(f=n[0]+(l+u-s.displaySize[0])/2,c=f+s.displaySize[0]);let d=e.top*a,y=e.bottom*a;return r==="height"||r==="both"?(h=n[1]+d-i[0],p=n[1]+y+i[2]):(h=n[1]+(d+y-s.displaySize[1])/2,p=h+s.displaySize[1]),{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}var Ic=32640;function Cc(t,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new st(t+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=Db(r.zoomStops,t);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=_b(r),n=r.evaluate(new st(t+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function Db(t,e){let r=0;for(;rt.evaluate(new st(e===-1/0?t.zoomStops[1]-1:e)))}var Jr=class Yd extends B{constructor(e,r,i,n){super(e,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Yd(this.x,this.y,this.angle,this.segment)}};C("Anchor",Jr);function Wd(t,e,r,i,n){if(e.segment===void 0||r===0)return!0;let a=e,s=e.segment+1,o=0;for(;o>-r/2;){if(s--,s<0)return!1;o-=t[s].dist(a),a=t[s]}o+=t[s].dist(t[s+1]),s++;let l=[],u=0;for(;oi;)u-=l.shift().angleDelta;if(u>n)return!1;s++,o+=c.dist(p)}return!0}function Zd(t){let e=0;for(let r=0;ru){let d=(u-l)/f,y=new Jr(gr.number(c.x,p.x,d),gr.number(c.y,p.y,d),p.angleTo(c),h);return y._round(),!s||Wd(t,y,o,s,e)?y:void 0}l+=f}}function Sb(t,e,r,i,n,a,s,o,l){let u=Hd(i,a,s),h=Kd(i,n),c=h*s,p=t[0].x===0||t[0].x===l||t[0].y===0||t[0].y===l;e-c=0&&b=0&&D=0&&p+u<=h){let A=new Jr(b,D,x,d);A._round(),(!i||Wd(t,A,a,i,n))&&f.push(A)}}c+=g}return!o&&!f.length&&!s&&(f=Jd(t,c/2,r,i,n,a,s,!0,l)),f}function Eb(t,e,r,i,n){let a=[];for(let s of t){let o;for(let l=0;l=i&&h.x>=i)&&(u.x>=i?u=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round():h.x>=i&&(h=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round()),!(u.y>=n&&h.y>=n)&&(u.y>=n?u=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round():h.y>=n&&(h=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round()),(!o||!u.equals(o[o.length-1]))&&(o=[u],a.push(o)),o.push(h)))))}}return a}function Qd(t,e,r,i,n,a){let s=Mc(t,e,r,n,0);return s=Mc(s,e,i,a,1),s}function Mc(t,e,r,i,n){switch(e){case 1:return Fb(t,r,i,n);case 2:return Bc(t,r,i,n,!1);case 3:return Bc(t,r,i,n,!0)}return[]}function Fb(t,e,r,i){let n=[];for(let a of t)for(let s of a){let o=i===0?s.x:s.y;o>=e&&o<=r&&n.push([s])}return n}function kb(t,e,r,i,n){let a=i===0?Tb:Ib,s=[],o=[];for(let h=0;he&&s.push(a(c,p,e)):f>r?d=e&&(s.push(a(c,p,e)),y=!0),d>r&&f<=r&&(s.push(a(c,p,r)),y=!0),!n&&y&&(o.push(s),s=[])}let l=t.length-1,u=i===0?t[l].x:t[l].y;return u>=e&&u<=r&&s.push(t[l]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new B(s[0].x,s[0].y)),s.length>0&&o.push(s),o}function Bc(t,e,r,i,n){let a=[];for(let s of t){let o=kb(s,e,r,i,n);o.length>0&&a.push(...o)}return a}function Tb(t,e,r){let i=(r-t.x)/(e.x-t.x);return new B(r,t.y+(e.y-t.y)*i)}function Ib(t,e,r){let i=(r-t.y)/(e.y-t.y);return new B(t.x+(e.x-t.x)*i,r)}function Pc(t,e,r,i){let n=[],a=t.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(F,$)=>F+$[1]-$[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,D=0,A=y,_=0,S=m;if(a.content&&i){let F=a.content,$=F[2]-F[0],U=F[3]-F[1];(a.textFitWidth||a.textFitHeight)&&(u=Xd(t)),g=ia(h,0,F[0]),v=ia(c,0,F[1]),x=ia(h,F[0],F[2]),b=ia(c,F[1],F[3]),D=F[0]-g,_=F[1]-v,A=$-x,S=U-b}let k=u.x1,z=u.y1,O=u.x2-k,P=u.y2-z,L=(F,$,U,T)=>{let q=na(F.stretch-g,x,O,k),at=aa(F.fixed-D,A,F.stretch,f),ot=na($.stretch-v,b,P,z),pt=aa($.fixed-_,S,$.stretch,d),Et=na(U.stretch-g,x,O,k),qt=aa(U.fixed-D,A,U.stretch,f),Ht=na(T.stretch-v,b,P,z),Ve=aa(T.fixed-_,S,T.stretch,d),ye=new B(q,ot),Kt=new B(Et,ot),Oe=new B(Et,Ht),kr=new B(q,Ht),rr=new B(at/s,pt/s),fi=new B(qt/s,Ve/s),kt=e*Math.PI/180;if(kt){let R=Math.sin(kt),J=Math.cos(kt),W=[J,-R,R,J];ye._matMult(W),Kt._matMult(W),kr._matMult(W),Oe._matMult(W)}let Ee=F.stretch+F.fixed,ir=U.stretch+U.fixed,Tr=$.stretch+$.fixed,Ir=T.stretch+T.fixed;return{tl:ye,tr:Kt,bl:kr,br:Oe,tex:{x:a.paddedRect.x+1+Ee,y:a.paddedRect.y+1+Tr,w:ir-Ee,h:Ir-Tr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rr,pixelOffsetBR:fi,minFontScaleX:A/s/O,minFontScaleY:S/s/P,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(L({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));else{let F=zc(h,y,f),$=zc(c,m,d);for(let U=0;U0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let c=(h=a.image)!=null&&h.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xd(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-o[0],c.y2=c.y2*s+o[2],c.x1=c.x1*s-o[3],c.x2=c.x2*s+o[1];let p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){let f=new B(c.x1,c.y1),d=new B(c.x2,c.y1),y=new B(c.x1,c.y2),m=new B(c.x2,c.y2),g=u*Math.PI/180;f._rotate(g),d._rotate(g),y._rotate(g),m._rotate(g),c.x1=Math.min(f.x,d.x,y.x,m.x),c.x2=Math.max(f.x,d.x,y.x,m.x),c.y1=Math.min(f.y,d.y,y.y,m.y),c.y2=Math.max(f.y,d.y,y.y,m.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,i,n)}this.boxEndIndex=t.length}},Mb=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}};function Bb(t,e=1){let r=Fa.fromPoints(t[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new Mb([],Pb),{minX:s,minY:o,maxX:l,maxY:u}=r;if(i===0)return new B(s,o);for(let p=s;pc.d||!c.d)&&(c=p),!(p.max-c.d<=e)&&(n=p.h/2,a.push(new qr(p.p.x-n,p.p.y-n,n,t)),a.push(new qr(p.p.x+n,p.p.y-n,n,t)),a.push(new qr(p.p.x-n,p.p.y+n,n,t)),a.push(new qr(p.p.x+n,p.p.y+n,n,t)))}return h.d>0&&c.d-h.d<=e?h.p:c.p}function Pb(t,e){return e.max-t.max}var qr=class{constructor(t,e,r,i){this.p=new B(t,e),this.h=r,this.d=zb(this.p,i),this.max=this.d+this.h*Math.SQRT2}};function zb(t,e){let r=!1,i=1/0;for(let n of e)for(let a=0,s=n.length,o=s-1;at.y!=u.y>t.y&&t.x<(u.x-l.x)*(t.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,td(t,l,u))}return(r?1:-1)*Math.sqrt(i)}function Lb(t){let e=0,r=0,i=0,n=t[0];for(let a=0,s=n.length,o=s-1;ap*24);h.startsWith("top")?c[1]-=7:h.startsWith("bottom")&&(c[1]+=7),l[u+1]=c}return new De(l)}let a=i.get("text-variable-anchor");if(a){let o;o=t._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(e,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(e,{},r)*24,lu];let l=[];for(let u of a)l.push(u,ty(u,o));return new De(l)}return null}function Ob(t){var h,c;t.bucket.createArrays();let e=512*t.bucket.overscaling;t.bucket.tilePixelRatio=mt/e,t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let r=t.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new st(18))};if(t.bucket.textSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new st(p),t.canonical),n["text-size"].possiblyEvaluate(new st(f),t.canonical)]}if(t.bucket.iconSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new st(p),t.canonical),n["icon-size"].possiblyEvaluate(new st(f),t.canonical)]}let s=i.get("text-line-height")*24,o=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let p of t.bucket.features){let f=i.get("text-font").evaluate(p,{},t.canonical).join(","),d=u.evaluate(p,{},t.canonical),y=a.layoutTextSize.evaluate(p,{},t.canonical),m=a.layoutIconSize.evaluate(p,{},t.canonical),g={horizontal:{},vertical:void 0},x=p.text,v=[0,0];if(x){let _=x.toString(),S=i.get("text-letter-spacing").evaluate(p,{},t.canonical)*24,k=bv(_)?S:0,z=i.get("text-anchor").evaluate(p,{},t.canonical),O=ey(r,p,t.canonical);if(!O){let $=i.get("text-radial-offset").evaluate(p,{},t.canonical);v=$?ty(z,[$*24,lu]):i.get("text-offset").evaluate(p,{},t.canonical).map(U=>U*24)}let P=o?"center":i.get("text-justify").evaluate(p,{},t.canonical),L=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(p,{},t.canonical)*24:1/0,F=()=>{t.bucket.allowVerticalPlacement&&el(_)&&(g.vertical=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,"left",k,v,2,!0,y,d))};if(!o&&O){let $=new Set;if(P==="auto")for(let T=0;T{T.x<0||T.x>=8192||T.y<0||T.y>=8192||Nb(t,T,U,r,i,n,L,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,[D,D,D,D],S,l,v,A,k,d,e,a,u,h,s)};if(z==="line")for(let U of Eb(e.geometry,0,0,mt,mt)){let T=cr(U,F),q=Sb(T,b,_,r.vertical||y,i,24,x,t.overscaling,mt);for(let at of q){let ot=y;(!ot||!Ub(t,ot.text,O,at))&&$(T,at)}}else if(z==="line-center"){for(let U of e.geometry)if(U.length>1){let T=cr(U,F),q=Ab(T,_,r.vertical||y,i,24,x);q&&$(T,q)}}else if(e.type==="Polygon")for(let U of Ra(e.geometry,0)){let T=Bb(U,16);$(cr(U[0],F,!0),new Jr(T.x,T.y,0))}else if(e.type==="LineString")for(let U of e.geometry){let T=cr(U,F);$(T,new Jr(T[0].x,T[0].y,0))}else if(e.type==="Point")for(let U of e.geometry)for(let T of U)$([T],new Jr(T.x,T.y,0))}function $b(t,e){let r=t.length,i=e==null?void 0:e.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)],(x[0]>32640||x[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,o,a,s,h,e,u.lineStartIndex,u.lineLength,f,y,l);for(let v of c)p[v]=t.text.placedSymbolArray.length-1;return m.length*4}function ry(t){for(let e in t)return t[e];return null}function Nb(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S){let k=t.addToLineVertexArray(e,r),z=o.layout.get("symbol-height-offset").evaluate(b,{},_);z>t.maxHeightOffset&&(t.maxHeightOffset=z);let O,P,L,F,$=0,U=0,T=0,q=0,at=-1,ot=-1,pt={},Et=(0,Mo.default)("");if(t.allowVerticalPlacement&&i.vertical){let J=o.layout.get("text-rotate").evaluate(b,{},_)+90,W=i.vertical;L=new sa(l,e,u,h,c,W,p,f,d,J),s&&(F=new sa(l,e,u,h,c,s,m,g,d,J))}if(n){let J=o.layout.get("icon-rotate").evaluate(b,{}),W=o.layout.get("icon-text-fit")!=="none",M=Pc(n,J,A,W),ut=s?Pc(s,J,A,W):void 0;P=new sa(l,e,u,h,c,n,m,g,!1,J),$=M.length*4;let X=t.iconSizeData,G=null;X.kind==="source"?(G=[128*o.layout.get("icon-size").evaluate(b,{})],G[0]>32640&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):X.kind==="composite"&&(G=[128*D.compositeIconSizes[0].evaluate(b,{},_),128*D.compositeIconSizes[1].evaluate(b,{},_)],(G[0]>32640||G[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,M,G,v,x,b,0,e,k.lineStartIndex,k.lineLength,-1,_,z),at=t.icon.placedSymbolArray.length-1,ut&&(U=ut.length*4,t.addSymbols(t.icon,ut,G,v,x,b,2,e,k.lineStartIndex,k.lineLength,-1,_,z),ot=t.icon.placedSymbolArray.length-1)}let qt=Object.keys(i.horizontal);for(let J of qt){let W=i.horizontal[J];O||(O=(Et=(0,Mo.default)(W.text),new sa(l,e,u,h,c,W,p,f,d,o.layout.get("text-rotate").evaluate(b,{},_))));let M=W.positionedLines.length===1;if(T+=Vc(t,e,W,a,o,d,b,y,z,k,i.vertical?1:3,M?qt:[J],pt,at,D,_),M)break}i.vertical&&(q+=Vc(t,e,i.vertical,a,o,d,b,y,z,k,2,["vertical"],pt,ot,D,_));let Ht=O?O.boxStartIndex:t.collisionBoxArray.length,Ve=O?O.boxEndIndex:t.collisionBoxArray.length,ye=L?L.boxStartIndex:t.collisionBoxArray.length,Kt=L?L.boxEndIndex:t.collisionBoxArray.length,Oe=P?P.boxStartIndex:t.collisionBoxArray.length,kr=P?P.boxEndIndex:t.collisionBoxArray.length,rr=F?F.boxStartIndex:t.collisionBoxArray.length,fi=F?F.boxEndIndex:t.collisionBoxArray.length,kt=-1,Ee=(J,W)=>J!=null&&J.circleDiameter?Math.max(J.circleDiameter,W):W;kt=Ee(O,kt),kt=Ee(L,kt),kt=Ee(P,kt),kt=Ee(F,kt);let ir=+(kt>-1);ir&&(kt*=S/24),t.glyphOffsetArray.length>=t.maxGlyphs&&Bt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let Tr=ey(o,b,_),[Ir,R]=$b(t.textAnchorOffsets,Tr);t.symbolInstances.emplaceBack(e.x,e.y,pt.right>=0?pt.right:-1,pt.center>=0?pt.center:-1,pt.left>=0?pt.left:-1,pt.vertical||-1,at,ot,Et,Ht,Ve,ye,Kt,Oe,kr,rr,fi,u,T,q,$,U,ir,0,p,kt,Ir,R,z)}function Ub(t,e,r,i){let n=t.compareText;if(!(e in n))n[e]=[];else{let a=n[e];for(let s=a.length-1;s>=0;s--)if(i.dist(a[s])s.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cc(this.zoom,e["text-size"]),this.iconSizeData=Cc(this.zoom,e["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=Oc(r,"text-overlap","text-allow-overlap")!=="never"||Oc(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(s=>Nd[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=t.sourceID}createArrays(){this.text=new al(new vr(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new al(new vr(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new Uf,this.lineVertexArray=new qf,this.symbolInstances=new Nf,this.textAnchorOffsets=new Gf}calculateGlyphDependencies(t,e,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,s=iu.fromFeature(t,r),o=s.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=o.value.kind!=="constant"||!!o.value.value||Object.keys(o.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new st(this.zoom);for(let{feature:m,id:g,index:x,sourceLayerIndex:v}of t){let b=i._featureFilter.needGeometry,D=hi(m,b);if(!i._featureFilter.filter(d,D,r))continue;b||(D.geometry=Ar(m));let A;if(l){let z=i.getValueAndResolveTokens("text-field",D,r,f),O=ze.factory(z);this.hasRTLText||(this.hasRTLText=Gb(O)),A=gv(O,i,D)}let _;if(u){let z=i.getValueAndResolveTokens("icon-image",D,r,f);_=z instanceof _e?z:_e.fromString(z)}if(!A&&!_)continue;let S=this.sortFeaturesByKey?h.evaluate(D,{},r):void 0,k={id:g,text:A,icon:_,index:x,sourceLayerIndex:v,geometry:D.geometry,properties:m.properties,type:Dn.types[m.type],sortKey:S};if(this.features.push(k),_&&(c[_.name]=!0),A){let z=a.evaluate(D,{},r).join(","),O=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(y=this.writingModes)==null?void 0:y.includes(2);let P=el(A.toString());this.calculateGlyphDependencies(A,p,z,O,P);for(let L of A.sections)L.image&&(c[L.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=xv(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}))}addFeatures({options:t,canonical:e,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:s}){Ob({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:s,canonical:e,subdivisionGranularity:t.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){let r=this.lineVertexArray.length;if(t.segment!==void 0){let i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),a={};for(let s=t.segment+1;s=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(let s=0;s0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){let r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[s]-i[o]||n[o]-n[s]),a}addToSortKeyRanges(t,e){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let r=this.symbolInstances.get(e);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};C("SymbolBucket",iy,{omit:["layers","collisionBoxArray","features","compareText"]});function Xb(t,e){return e.replace(/{([^{}]+)}/g,(r,i)=>t&&i in t?String(t[i]):"")}var Yb,Wb=()=>Yb||(Yb=new Xt({"symbol-placement":new V(w.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new V(w.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new V(w.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new N(w.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new V(w.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new V(w.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new V(w.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new V(w.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new V(w.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new N(w.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new N(w.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new V(w.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new V(w.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new N(w.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new N(w.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new N(w.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new V(w.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new N(w.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new N(w.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new V(w.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new V(w.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new V(w.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new N(w.layout_symbol["text-field"],"text-field"),"text-font":new N(w.layout_symbol["text-font"],"text-font"),"text-size":new N(w.layout_symbol["text-size"],"text-size"),"text-max-width":new N(w.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new V(w.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new N(w.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new N(w.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new N(w.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new V(w.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new N(w.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new N(w.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new V(w.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new V(w.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new N(w.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new V(w.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new V(w.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new N(w.layout_symbol["text-transform"],"text-transform"),"text-offset":new N(w.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new V(w.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new V(w.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new V(w.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new V(w.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new N(w.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new V(w.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Zb,Hb=()=>Zb||(Zb=new Xt({"icon-opacity":new N(w.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new N(w.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new N(w.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new N(w.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new N(w.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new V(w.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new V(w.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new N(w.paint_symbol["text-opacity"],"text-opacity"),"text-color":new N(w.paint_symbol["text-color"],"text-color",{runtimeType:ce,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new N(w.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new N(w.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new N(w.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new V(w.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new V(w.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Ys={get paint(){return Hb()},get layout(){return Wb()}},ny=class{constructor(t){if(t.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:dn,this.defaultValue=t}evaluate(t){if(t.formattedSection){let e=this.defaultValue.property.overrides;if(e!=null&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){if(!this.defaultValue.isConstant()){let e=this.defaultValue.value;t(e._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};C("FormatSectionOverride",ny,{omit:["defaultValue"]});var Kb=class ol extends de{constructor(e,r){super(e,Ys,r)}recalculate(e,r){super.recalculate(e,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new se(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let s of n)a.includes(s)||a.push(s);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,i,n){let a=this.layout.get(e).evaluate(r,{},i,n),s=this._unevaluatedLayout._values[e];return!s.isDataDriven()&&!ja(s.value)&&a?Xb(r.properties,a):a}createBucket(e){return new iy(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Ys.paint.overridableProperties){if(!ol.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),i=new Il(new ny(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new an("source",i):new wa("composite",i,r.value.zoomStops),this.paint._values[e]=new se(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:ol.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let i=e.get("text-field"),n=Ys.paint.properties[r],a=!1,s=o=>{var l;for(let u of o)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof ze)s(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let o=u=>{if(!a)if(u instanceof ri&&_t(u.value)===yn){let h=u.value;s(h.sections)}else u instanceof Ep?s(u.sections):u.eachChild(o)},l=i.value;l._styleExpression&&o(l._styleExpression.expression)}return a}};function Jb(t,e,r,i=1){var a;let n=(a=t.get("icon-padding").evaluate(e,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}var Qb,tw=()=>Qb||(Qb=new Xt({"background-color":new V(w.paint_background["background-color"],"background-color"),"background-pattern":new Lf(w.paint_background["background-pattern"],"background-pattern"),"background-opacity":new V(w.paint_background["background-opacity"],"background-opacity")})),ew={get paint(){return tw()}};var rw=class extends de{constructor(t,e){super(t,ew,e)}};var iw=class extends de{constructor(t,e){super(t,{},e),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function ay(t,e){if(t.type==="custom")return new iw(t,e);switch(t.type){case"background":return new rw(t,e);case"circle":return new Bg(t,e);case"color-relief":return new Yg(t,e);case"fill":return new Ex(t,e);case"fill-extrusion":return new Hx(t,e);case"heatmap":return new Rg(t,e);case"hillshade":return new qg(t,e);case"line":return new G2(t,e);case"raster":return new Xm(t,e);case"symbol":return new Kb(t,e)}}var nw=class{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)==null||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},aw={once:!0},sy=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new nw(()=>this.process()),this.subscription=hh(this.target,"message",r=>this.receive(r),!1),this.globalScope=mr(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=e?hh(e.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new dl(e.signal.reason))},aw):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let s=[],o=Si(je({},t),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Yi(t.data,s)});this.target.postMessage(o,{transfer:s})})}receive(t){let e=t.data,r=e.id,i=["file://","resource://android","null"],n=[e.origin,location.origin],a=e.origin===location.origin,s=n.some(o=>i.includes(o));if((a||s)&&!(e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type===""){delete this.tasks[r];let o=this.abortControllers[r];delete this.abortControllers[r],o&&o.abort();return}if(mr(self)||e.mustQueue){this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){return rt(this,null,function*(){if(e.type===""){let n=this.resolveRejects[t];if(delete this.resolveRejects[t],!n)return;e.error?n.reject(Ki(Wi(e.error))):n.resolve(Wi(e.data));return}if(!this.messageHandlers[e.type]){this.completeTask(t,null,null);return}let r=Wi(e.data),i=new AbortController;this.abortControllers[t]=i;try{let n=yield this.messageHandlers[e.type](e.sourceMapId,r,i);this.completeTask(t,null,n)}catch(n){this.completeTask(t,Ki(n))}})}completeTask(t,e,r){let i=[];delete this.abortControllers[t];let n={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?Yi(e):null,data:Yi(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function sw(t,e,r){return!(t<0||t>25||r<0||r>=2**t||e<0||e>=2**t)}var oy=class{constructor(t,e,r){if(!sw(t,e,r))throw Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${2**t}, 0<=y<${2**t} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Hi(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){let i=lw(this.x,this.y,this.z),n=uw(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(t){let e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){let e=2**this.z;return new B((t.x*e-this.x)*mt,(t.y*e-this.y)*mt)}toString(){return`${this.z}/${this.x}/${this.y}`}},ow=class{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Hi(t,e.z,e.z,e.x,e.y)}},uu=class ne{constructor(e,r,i,n,a){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=r,this.canonical=new oy(i,+n,+a),this.key=Hi(r,e,i,n,a)}clone(){return new ne(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new ne(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ne(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,r){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?Hi(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Hi(this.wrap*+r,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(e.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-e.canonical.z;return r<0?!1:e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new ne(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new ne(r,this.wrap,r,i,n),new ne(r,this.wrap,r,i+1,n),new ne(r,this.wrap,r,i,n+1),new ne(r,this.wrap,r,i+1,n+1)]}isLessThan(e){return this.wrape.wrap?!1:this.overscaledZe.overscaledZ?!1:this.canonical.xe.canonical.x?!1:this.canonical.y=0&&e=0&&r=u)return null;let c=this.canonical.x+n,p=this.wrap;return c<0?(p-=Math.ceil(-c/u),c=(c%u+u)%u):c>=u&&(p+=Math.floor(c/u),c%=u),{tileID:new ne(this.overscaledZ,p,l,c,h),x:s,y:o}}};function Hi(t,e,r,i,n){t*=2,t<0&&(t=t*-1-1);let a=1<0;n--){let a=1<pw(n,a,r),t.layers[i])}function pw(t,e,r=""){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let s=0;s>31}function yw(t,e){let r=t.loadGeometry(),i=t.type,n=0,a=0;for(let s of r){let o=1;i===1&&(o=s.length),e.writeVarint(Zs(1,o));let l=i===3?s.length-1:s.length;for(let u=0;u=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${t} can\'t be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}},gw=class{constructor(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=i,this._z=e;for(let a in t.properties)typeof t.properties[a]=="string"&&t.properties[a].startsWith("__$json__:")&&(t.properties[a]=JSON.parse(t.properties[a].slice(10)));this.properties=t.properties,this.id=n}projectPoint(t,e,r,i){return[(t.x+e)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(t.y+r)*2/i)*Math.PI))-90]}projectLine(t,e,r,i){return t.map(n=>this.projectPoint(n,e,r,i))}get geometry(){if(this._geometry)return this._geometry;let t=this._vectorTileFeature,e=t.extent*2**this._z,r=t.extent*this._x,i=t.extent*this._y,n=t.loadGeometry();switch(t.type){case 1:{let a=[];for(let o of n)a.push(o[0]);let s=this.projectLine(a,r,i,e);this._geometry=a.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let a=n.map(s=>this.projectLine(s,r,i,e));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=dd(n),s=[];for(let o of a)s.push(o.map(l=>this.projectLine(l,r,i,e)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let e in this)e!=="_geometry"&&e!=="_vectorTileFeature"&&e!=="_x"&&e!=="_y"&&e!=="_z"&&(t[e]=this[e]);return t}},Sr=class{constructor(t,e,r){this._name=t,this.dataBuffer=e,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var e;return((e=this.nullabilityBuffer)==null?void 0:e.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},ts=class extends Sr{},pu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},fu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},uy=class extends Sr{constructor(t,e,r,i){super(t,e,i),this.delta=r}},du=class extends uy{constructor(t,e,r,i,n){super(t,n?Int32Array.of(e):Uint32Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}},yu=class extends Sr{constructor(t,e,r,i){super(t,i?Int32Array.of(e):Uint32Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},xw=class{constructor(t,e,r,i,n=4096){if(this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=i,this._extent=n,t.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var t;return(t=this._propertyVectors)!=null?t:[]}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let t=[],e=this.geometryVector.getGeometries();for(let r=0;r>>32-t;var ul=mu,py=65536;function gu(t,e){return t-t%e}function vw(t){return gu(t+31,32)}function bw(t){if(!Number.isFinite(t)||t<=0)return py;let e=gu(Math.floor(t),256);return e===0?256:e}function ww(t){let e=t>>>0;return((e&255)<<24|(e&65280)<<8|e>>>8&65280|e>>>24&255)>>>0}function Dw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n]=s>>>30&3}function _w(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(s&1)<<2)&7,r[n++]=s>>>1&7,r[n++]=s>>>4&7,r[n++]=s>>>7&7,r[n++]=s>>>10&7,r[n++]=s>>>13&7,r[n++]=s>>>16&7,r[n++]=s>>>19&7,r[n++]=s>>>22&7,r[n++]=s>>>25&7,r[n++]=s>>>28&7,r[n++]=(s>>>31|(o&3)<<1)&7,r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n]=o>>>29&7}function Aw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Sw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(s&7)<<2)&31,r[n++]=s>>>3&31,r[n++]=s>>>8&31,r[n++]=s>>>13&31,r[n++]=s>>>18&31,r[n++]=s>>>23&31,r[n++]=(s>>>28|(o&1)<<4)&31,r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=(o>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function Ew(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(s&15)<<2)&63,r[n++]=s>>>4&63,r[n++]=s>>>10&63,r[n++]=s>>>16&63,r[n++]=s>>>22&63,r[n++]=(s>>>28|(o&3)<<4)&63,r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n]=h>>>26&63}function Fw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(s&7)<<4)&127,r[n++]=s>>>3&127,r[n++]=s>>>10&127,r[n++]=s>>>17&127,r[n++]=s>>>24&127,r[n++]=(s>>>31|(o&63)<<1)&127,r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=(o>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(c&15)<<3)&127,r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n]=c>>>25&127}function kw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n]=p>>>24&255}function Tw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(s&15)<<5)&511,r[n++]=s>>>4&511,r[n++]=s>>>13&511,r[n++]=s>>>22&511,r[n++]=(s>>>31|(o&255)<<1)&511,r[n++]=o>>>8&511,r[n++]=o>>>17&511,r[n++]=(o>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(h&3)<<7)&511,r[n++]=h>>>2&511,r[n++]=h>>>11&511,r[n++]=h>>>20&511,r[n++]=(h>>>29|(c&63)<<3)&511,r[n++]=c>>>6&511,r[n++]=c>>>15&511,r[n++]=(c>>>24|(p&1)<<8)&511,r[n++]=p>>>1&511,r[n++]=p>>>10&511,r[n++]=p>>>19&511,r[n++]=(p>>>28|(f&31)<<4)&511,r[n++]=f>>>5&511,r[n++]=f>>>14&511,r[n]=f>>>23&511}function Iw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(s&255)<<2)&1023,r[n++]=s>>>8&1023,r[n++]=s>>>18&1023,r[n++]=(s>>>28|(o&63)<<4)&1023,r[n++]=o>>>6&1023,r[n++]=o>>>16&1023,r[n++]=(o>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=h>>>0&1023,r[n++]=h>>>10&1023,r[n++]=h>>>20&1023,r[n++]=(h>>>30|(c&255)<<2)&1023,r[n++]=c>>>8&1023,r[n++]=c>>>18&1023,r[n++]=(c>>>28|(p&63)<<4)&1023,r[n++]=p>>>6&1023,r[n++]=p>>>16&1023,r[n++]=(p>>>26|(f&15)<<6)&1023,r[n++]=f>>>4&1023,r[n++]=f>>>14&1023,r[n++]=(f>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function Cw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(s&1)<<10)&2047,r[n++]=s>>>1&2047,r[n++]=s>>>12&2047,r[n++]=(s>>>23|(o&3)<<9)&2047,r[n++]=o>>>2&2047,r[n++]=o>>>13&2047,r[n++]=(o>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(h&31)<<6)&2047,r[n++]=h>>>5&2047,r[n++]=h>>>16&2047,r[n++]=(h>>>27|(c&63)<<5)&2047,r[n++]=c>>>6&2047,r[n++]=c>>>17&2047,r[n++]=(c>>>28|(p&127)<<4)&2047,r[n++]=p>>>7&2047,r[n++]=p>>>18&2047,r[n++]=(p>>>29|(f&255)<<3)&2047,r[n++]=f>>>8&2047,r[n++]=f>>>19&2047,r[n++]=(f>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(y&1023)<<1)&2047,r[n++]=y>>>10&2047,r[n]=y>>>21&2047}function Mw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(s&15)<<8)&4095,r[n++]=s>>>4&4095,r[n++]=s>>>16&4095,r[n++]=(s>>>28|(o&255)<<4)&4095,r[n++]=o>>>8&4095,r[n++]=o>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(h&255)<<4)&4095,r[n++]=h>>>8&4095,r[n++]=h>>>20&4095,r[n++]=c>>>0&4095,r[n++]=c>>>12&4095,r[n++]=(c>>>24|(p&15)<<8)&4095,r[n++]=p>>>4&4095,r[n++]=p>>>16&4095,r[n++]=(p>>>28|(f&255)<<4)&4095,r[n++]=f>>>8&4095,r[n++]=f>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(y&15)<<8)&4095,r[n++]=y>>>4&4095,r[n++]=y>>>16&4095,r[n++]=(y>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function Bw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0,g=t[e+12]>>>0,x=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=y>>>0&65535,r[n++]=y>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=x>>>0&65535,r[n++]=x>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function Pw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0;r[n++]=o>>>0&1,r[n++]=o>>>1&1,r[n++]=o>>>2&1,r[n++]=o>>>3&1,r[n++]=o>>>4&1,r[n++]=o>>>5&1,r[n++]=o>>>6&1,r[n++]=o>>>7&1,r[n++]=o>>>8&1,r[n++]=o>>>9&1,r[n++]=o>>>10&1,r[n++]=o>>>11&1,r[n++]=o>>>12&1,r[n++]=o>>>13&1,r[n++]=o>>>14&1,r[n++]=o>>>15&1,r[n++]=o>>>16&1,r[n++]=o>>>17&1,r[n++]=o>>>18&1,r[n++]=o>>>19&1,r[n++]=o>>>20&1,r[n++]=o>>>21&1,r[n++]=o>>>22&1,r[n++]=o>>>23&1,r[n++]=o>>>24&1,r[n++]=o>>>25&1,r[n++]=o>>>26&1,r[n++]=o>>>27&1,r[n++]=o>>>28&1,r[n++]=o>>>29&1,r[n++]=o>>>30&1,r[n++]=o>>>31&1}}function zw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0;r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n++]=o>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function Lw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0;r[n++]=o>>>0&7,r[n++]=o>>>3&7,r[n++]=o>>>6&7,r[n++]=o>>>9&7,r[n++]=o>>>12&7,r[n++]=o>>>15&7,r[n++]=o>>>18&7,r[n++]=o>>>21&7,r[n++]=o>>>24&7,r[n++]=o>>>27&7,r[n++]=(o>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function Vw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0;r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=h>>>0&15,r[n++]=h>>>4&15,r[n++]=h>>>8&15,r[n++]=h>>>12&15,r[n++]=h>>>16&15,r[n++]=h>>>20&15,r[n++]=h>>>24&15,r[n++]=h>>>28&15}}function Ow(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0;r[n++]=o>>>0&31,r[n++]=o>>>5&31,r[n++]=o>>>10&31,r[n++]=o>>>15&31,r[n++]=o>>>20&31,r[n++]=o>>>25&31,r[n++]=(o>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(h&15)<<1)&31,r[n++]=h>>>4&31,r[n++]=h>>>9&31,r[n++]=h>>>14&31,r[n++]=h>>>19&31,r[n++]=h>>>24&31,r[n++]=(h>>>29|(c&3)<<3)&31,r[n++]=c>>>2&31,r[n++]=c>>>7&31,r[n++]=c>>>12&31,r[n++]=c>>>17&31,r[n++]=c>>>22&31,r[n++]=c>>>27&31}}function Rw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0;r[n++]=o>>>0&63,r[n++]=o>>>6&63,r[n++]=o>>>12&63,r[n++]=o>>>18&63,r[n++]=o>>>24&63,r[n++]=(o>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=h>>>0&63,r[n++]=h>>>6&63,r[n++]=h>>>12&63,r[n++]=h>>>18&63,r[n++]=h>>>24&63,r[n++]=(h>>>30|(c&15)<<2)&63,r[n++]=c>>>4&63,r[n++]=c>>>10&63,r[n++]=c>>>16&63,r[n++]=c>>>22&63,r[n++]=(c>>>28|(p&3)<<4)&63,r[n++]=p>>>2&63,r[n++]=p>>>8&63,r[n++]=p>>>14&63,r[n++]=p>>>20&63,r[n++]=p>>>26&63}}function $w(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0;r[n++]=o>>>0&127,r[n++]=o>>>7&127,r[n++]=o>>>14&127,r[n++]=o>>>21&127,r[n++]=(o>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(h&3)<<5)&127,r[n++]=h>>>2&127,r[n++]=h>>>9&127,r[n++]=h>>>16&127,r[n++]=h>>>23&127,r[n++]=(h>>>30|(c&31)<<2)&127,r[n++]=c>>>5&127,r[n++]=c>>>12&127,r[n++]=c>>>19&127,r[n++]=(c>>>26|(p&1)<<6)&127,r[n++]=p>>>1&127,r[n++]=p>>>8&127,r[n++]=p>>>15&127,r[n++]=p>>>22&127,r[n++]=(p>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n++]=f>>>25&127}}function Nw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0,d=t[a++]>>>0;r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function Uw(t,e,r,i){let n=i,a=e;for(let s=0;s<128;s++){let o=t[a++]>>>0;r[n++]=o&65535,r[n++]=o>>>16&65535}}function qw(t,e,r,i,n){let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0,u=i;for(let h=0;h<8;h++){for(let c=0;c<32;c++)if(o+n<=32){let p=l>>>o&a;r[u+c]=p|0,o+=n,o===32&&(o=0,s++,c!==31&&(l=t[s]>>>0))}else{let p=32-o,f=l>>>o;s++,l=t[s]>>>0;let d=n-p,y=-1>>>32-d>>>0,m=(f|(l&y)<>>0)}}var hl=bw(py),jw=3*hl/256+hl|0;function fy(){let t=new Uint8Array(jw);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Gw(t=16){if(t<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);let e=Math.max(16,t|0);return{encodedWords:new Uint32Array(e),decoderWorkspace:fy()}}function Xw(t,e){if(e<=t.encodedWords.length)return t.encodedWords;let r=new Uint32Array(Math.max(16,e*2));return t.encodedWords=r,r}function Yw(t,e,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let o=0;o>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let o=i.byteContainerI32;(!o||o.buffer!==n.buffer||o.byteOffset!==n.byteOffset||o.length>>2)),o.set(t.subarray(e,e+a))}let s=r&3;if(s>0){let o=t[e+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function Ww(t,e,r){let i=t[e++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(e>=t.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);let s=t[e++]>>>0,o=vw(s),l=s*a+31>>>5;if(e+l>t.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=s}return e}function Zw(t,e,r,i,n){switch(n){case 1:Pw(t,e,r,i);break;case 2:zw(t,e,r,i);break;case 3:Lw(t,e,r,i);break;case 4:Vw(t,e,r,i);break;case 5:Ow(t,e,r,i);break;case 6:Rw(t,e,r,i);break;case 7:$w(t,e,r,i);break;case 8:Nw(t,e,r,i);break;case 16:Uw(t,e,r,i);break;default:qw(t,e,r,i,n)}return e+(n<<3)|0}function Hw(t,e,r,i){if(r+2>e)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${e})`);let n=t[r++],a=t[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function Kw(t,e,r,i,n,a){if(r+1>e)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${e})`);let s=t[r++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let o=s-i|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${i}, maxBits=${s})`);if(r+n>e)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${e-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}function Jw(t,e,r,i,n,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=Kw(n,a,s,r,i,l);if(s=c,h===1){let m=1<y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${i}, size=${y}) at block ${l}`);for(let m=0;m0&&(c=Jw(n,m,d,y,o,l,c,u,p))}if(h!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${t.length})`)}function t3(t,e,r,i,n,a){let s=r|0,o=t[s]|0;if(o<=0||s+o>t.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);let l=s+1|0,u=s+o|0,h=t[u]>>>0,c=h+3>>>2,p=u+1,f=p+c;if(f>=t.length)throw Error(`FastPFOR decode: invalid byteSize=${h} (metaInts=${c}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${t.length})`);let d=Yw(t,p,h,a),y=h,m=Ww(t,f,a);return a.dataPointers.fill(0),Qw(t,s,l,u,e,i|0,n/256|0,d,y,a),m}function e3(t,e,r,i,n,a){let s=i+gu(n,256),o=i,l=r;for(;o!==s;){let u=Math.min(hl,s-o);l=t3(t,e,l,o,u,a),o=o+u|0}return l}function r3(t,e,r,i,n,a){if(a===0)return e;let s=0,o=e,l=e+r,u=n,h=n,c=n+a,p=0,f=0;for(;o>>s&255;if(s+=8,o+=s>>>5,s&=31,p|=(d&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${h-u}/${a}, inPos=${o}, inEnd=${l})`)}if(h!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${h-u}, expected=${a}, consumedWords=${o-e}/${r}, vbyteStart=${e}, vbyteEnd=${l})`);return o}function i3(t,e,r){let i=0,n=0,a=new Uint32Array(e),s=r!=null?r:fy();if(t.length>0){let u=t[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=e3(t,a,i,n,u,s),n=n+u|0}let o=t.length-i|0,l=e-n|0;return r3(t,i,o,a,n,l),a}function n3(t,e,r,i,n){switch(n){case 2:Dw(t,e,r,i);return;case 3:_w(t,e,r,i);return;case 4:Aw(t,e,r,i);return;case 5:Sw(t,e,r,i);return;case 6:Ew(t,e,r,i);return;case 7:Fw(t,e,r,i);return;case 8:kw(t,e,r,i);return;case 9:Tw(t,e,r,i);return;case 10:Iw(t,e,r,i);return;case 11:Cw(t,e,r,i);return;case 12:Mw(t,e,r,i);return;case 16:Bw(t,e,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=t[e+u|0]|0;return}let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0;for(let u=0;u<32;u++)if(o+n<=32){let h=l>>>o&a;r[i+u]=h|0,o+=n,o===32&&(o=0,s++,u!==31&&(l=t[s]>>>0))}else{let h=32-o,c=l>>>o;s++,l=t[s]>>>0;let p=ul[n-h]>>>0,f=(c|(l&p)<t.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${r}, bytes.length=${t.length})`);let n=Math.floor(r/4),a=r%4!=0,s=a?n+1:n;if(i.length0){let o=t.byteOffset+e;if(o&3)for(let l=0;l=64)throw Error("Varint too long")}return e.set(n),r}function o3(t,e,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=e[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=e[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(t>>>0);throw Error("Expected varint not more than 10 bytes")}function h3(t,e,r,i){return c3(t,e,r,i,Gw(r>>>2))}function c3(t,e,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${t.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=Xw(n,s);a3(t,a,r,o);let l=i3(o.subarray(0,s),e,n.decoderWorkspace);return i.add(r),l}function et(t){return t>>>1^-(t&1)}function Ot(t){return t>>BigInt(1)^-(t&BigInt(1))}function We(t){return t%2==1?(t+1)/-2:t/2}function p3(t){let e=new Int32Array(t.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=t[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return e}function jc(t){let e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Ot(t[0]));for(let r=1;r>>0,e[1]=et(t[1])>>>0;for(let r=2;r>>0,e[r+1]=e[r-1]+et(t[r+1])>>>0;return e}function F3(t,e,r,i){let n=yy(t,e,r,i);return new Uint32Array(n)}function k3(t){return t[1]}function T3(t){return et(t[1])}function I3(t){if(t.length===2){let e=et(t[1]);return[e,e]}return[et(t[2]),et(t[3])]}function C3(t){return t[1]}function M3(t){return Ot(t[1])}function B3(t){if(t.length===2){let e=Ot(t[1]);return[e,e]}return[Ot(t[2]),Ot(t[3])]}var St;(function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"})(St||(St={}));var jt;(function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"})(jt||(jt={}));var Me;(function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"})(Me||(Me={}));var Ct;(function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"})(Ct||(Ct={}));var P3=[St.PRESENT,St.DATA,St.OFFSET,St.LENGTH],Gc=[H.NONE,H.DELTA,H.COMPONENTWISE_DELTA,H.RLE,H.MORTON],z3=[le.NONE,le.FAST_PFOR,le.VARINT],L3=[jt.NONE,jt.SINGLE,jt.SHARED,jt.VERTEX,jt.MORTON,jt.FSST],V3=[Me.VERTEX,Me.INDEX,Me.STRING,Me.KEY],O3=[Ct.VAR_BINARY,Ct.GEOMETRIES,Ct.PARTS,Ct.RINGS,Ct.TRIANGLES,Ct.SYMBOL,Ct.DICTIONARY];function ct(t,e){let r=N3(t,e);return r.logicalLevelTechnique1===H.MORTON?R3(r,t,e):(H.RLE===r.logicalLevelTechnique1||H.RLE===r.logicalLevelTechnique2)&&le.NONE!==r.physicalLevelTechnique?$3(r,t,e):r}function R3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function $3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function N3(t,e){let r=t[e.get()],i=P3[r>>4],n={};switch(i){case St.DATA:n={dictionaryType:L3[r&15]};break;case St.OFFSET:n={offsetType:V3[r&15]};break;case St.LENGTH:n={lengthType:O3[r&15]}}e.increment();let a=t[e.get()],s=Gc[a>>5],o=Gc[a>>2&7],l=z3[a&3];e.increment();let u=$t(t,e,2),h=u[0],c=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:c,decompressedCount:h}}var ht;(function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ht||(ht={}));var fe=class{constructor(t,e){this.values=t,this._size=e}get(t){let e=Math.floor(t/8),r=t%8;return(this.values[e]>>r&1)==1}set(t,e){let r=Math.floor(t/8),i=t%8;this.values[r]=this.values[r]|+!!e<>r&1}size(){return this._size}getBuffer(){return this.values}};function Er(t,e,r){if(!e)return t;let i=e.size(),n=t.constructor,a=new n(i),s=0;for(let o=0;o=s);){let o=t[i.increment()];if(o<=127){let l=o+3,u=t[i.increment()],h=Math.min(a+l,e);n.fill(u,a,h),a=h}else{let l=256-o;for(let u=0;u=12?X3.decode(t.subarray(e,r)):Y3(t,e,r)}function Y3(t,e,r){let i="",n=e;for(;n239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function Ta(t,e,r,i,n){return J3(pi(t,e,r),r,i,n)}function Vt(t,e,r,i,n){return Q3(pi(t,e,r),r,i,n)}function Ze(t,e,r){return e6(pi(t,e,r),r)}function pi(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.FAST_PFOR:return h3(t,r.numValues,r.byteLength,e);case le.VARINT:return $t(t,e,r.numValues);case le.NONE:return j3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function _n(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.VARINT:return xu(t,e,r.numValues);case le.NONE:return G3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function W3(t,e,r){let i=pi(t,e,r);return i.length===1?et(i[0]):T3(i)}function wu(t,e,r){let i=pi(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?et(i[0]):i[0]:k3(i)}function vy(t,e,r){return I3(pi(t,e,r))}function by(t,e,r){return B3(xu(t,e,r.numValues))}function wy(t,e,r,i){return _y(_n(t,e,r),r,i)}function Du(t,e,r,i){return Ay(_n(t,e,r),r,i)}function Z3(t,e,r,i){let n=H3(t,e,r,!1);return i?Er(n,i,0):n}function H3(t,e,r,i){if(r.physicalLevelTechnique===le.VARINT)return t6(o3(t,e,r.numValues),r,i);let n=_n(t,e,r),a=i?_y(n,r):Ay(n,r);return Float64Array.from(a,Number)}function K3(t,e,r){let i=_n(t,e,r);return i.length===1?Ot(i[0]):M3(i)}function Dy(t,e,r){let i=_n(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?Ot(i[0]):i[0]:C3(i)}function J3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;if(!i)return A3(t,a.runs,a.numRleValues);t=cl(t,a.runs,a.numRleValues),n=Nc(t)}else n=Nc(t);break;case H.RLE:n=m3(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=new Int32Array(t);break;case H.COMPONENTWISE_DELTA:if(r&&!i)return yy(t,r.scale,r.min,r.max);n=b3(t);break;case H.NONE:n=p3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function Q3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;n=qc(cl(t,a.runs,a.numRleValues))}else n=qc(t);break;case H.RLE:n=cl(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=t;break;case H.COMPONENTWISE_DELTA:n=r&&!i?F3(t,r.scale,r.min,r.max):E3(t);break;case H.NONE:n=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function _y(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;if(!r)return S3(t,n.runs,n.numRleValues);t=pl(t,n.runs,n.numRleValues),i=Uc(t)}else i=Uc(t);break;case H.RLE:i=g3(t,e.runs,e.numRleValues);break;case H.NONE:i=f3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function Ay(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;i=jc(pl(t,n.runs,n.numRleValues))}else i=jc(t);break;case H.RLE:i=pl(t,e.runs,e.numRleValues);break;case H.NONE:i=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function t6(t,e,r){switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let i=e;t=dy(t,i.runs,i.numRleValues)}return y3(t),t;case H.RLE:return i6(t,e,r);case H.NONE:return r&&d3(t),t;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}function e6(t,e){if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.NONE)return w3(t);if(e.logicalLevelTechnique1===H.RLE&&e.logicalLevelTechnique2===H.NONE){let r=e;return _3(t,r.runs,r.numRleValues)}if(e.logicalLevelTechnique1===H.NONE&&e.logicalLevelTechnique2===H.NONE){v3(t);let r=new Uint32Array(e.numValues+1);return r[0]=0,r.set(t,1),r}if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.RLE){let r=e,i=D3(t,r.runs,r.numRleValues);return vu(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function es(t,e,r,i,n="int32"){let a=t.logicalLevelTechnique1;if(a===H.RLE)return t.runs===1?ht.CONST:ht.FLAT;if(a!==H.DELTA||t.logicalLevelTechnique2!==H.RLE)return t.numValues===1?ht.CONST:ht.FLAT;let s=e instanceof fe?e.size():e,o=t;if(o.numRleValues!==s)return ht.FLAT;if(o.runs===1)return ht.SEQUENCE;if(o.runs!==2)return t.numValues===1?ht.CONST:ht.FLAT;let l=i.get();if(t.physicalLevelTechnique===le.VARINT)return r6(r,i,n)?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT;let u=i.get(),h=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),h[2]===2&&h[3]===2?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT}function r6(t,e,r){let i=new cy(e.get());if(r==="int64"){let a=xu(t,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=$t(t,i,4);return n[2]===2&&n[3]===2}function i6(t,e,r){return r?x3(t,e.runs,e.numRleValues):dy(t,e.runs,e.numRleValues)}var Sy=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},Ey=class extends uy{constructor(t,e,r,i,n){super(t,n?BigInt64Array.of(e):BigUint64Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}};function _u(t,e,r){return{x:Xc(t,e)-r,y:Xc(t>>1,e)-r}}function Xc(t,e){let r=0;for(let i=0;i>i;return r}var Rt;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"})(Rt||(Rt={}));var n6;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"})(n6||(n6={}));var Fr;(function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"})(Fr||(Fr={}));function a6(t){let e=Array(t.numGeometries),r=1,i=1,n=1,a=0,s=0,o=0,l=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=t.vertexOffsets,d=!f||f.length===0,y=t.containsPolygonGeometry(),m=t.vertexBuffer;for(let g=0;g[D]),r+=v,i+=v}break;case Rt.LINESTRING:{let v;y?(v=p[i]-p[i-1],i++):v=c[r]-c[r-1],r++;let b;d?(b=Or(m,s,v,!1),s+=v*2):(b=lr(t.vertexBufferType,m,f,o,v,!1,l),o+=v),e[a++]=[b],h&&n++}break;case Rt.POLYGON:{let v=c[r]-c[r-1];r++;let b=Array(v-1),D,A=p[i]-p[i-1];if(i++,d){D=Or(m,s,A,!0),s+=A*2;for(let _=0;_r?e[a++]:1);return i}function Zc(t,e,r,i){let n=new Uint32Array(e[e.length-1]+1),a=0;n[0]=a;let s=1,o=0;for(let l=0;l0;)n[a++]=t[u++]}}return n}var By=class extends Au{constructor(t,e,r,i,n,a,s,o){super(t,r,i,s!=null?s:e.length),this.indexBuffer=e,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(t){var n,a,s;(s=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return bu(this.decodedDictionary,r,i)}decodeDictionary(){var t;return(t=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),v6(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(t){let e=new Uint32Array(t.length-1),r=t[0];for(let i=1;i1&&!f.nullable||d===1&&f.nullable)throw Error(`The number of streams for the child field ${f.name} does not match its nullability. nullibilty: ${f.nullable}, numStreams: ${d}`);let m;if(f.nullable){let x=ct(t,e);m=new fe(ci(t,x.numValues,x.byteLength,e),x.numValues)}let g=Vt(t,e,ct(t,e),void 0,m);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${y}"`);h[p++]=new By(y,g,n,a,s,o,m,c)}else h[p++]=new Qr(y,g,n,a,m)}return h}var Kc=class extends Sr{constructor(t,e,r){super(t,new Uint8Array,r!=null?r:e.length),this.values=e}getValueFromBuffer(t){return this.values[t]}},Be;(function(t){t[t.STRING=1]="STRING",t[t.INT32=2]="INT32",t[t.UINT32=4]="UINT32",t[t.INT64=8]="INT64",t[t.UINT64=16]="UINT64",t[t.FLOAT=32]="FLOAT",t[t.DOUBLE=64]="DOUBLE",t[t.PRESENCE=128]="PRESENCE"})(Be||(Be={}));var pr;(function(t){t[t.FALSE=0]="FALSE",t[t.TRUE=1]="TRUE",t[t.START_MAP=2]="START_MAP",t[t.START_LIST=3]="START_LIST",t[t.COUNT=4]="COUNT"})(pr||(pr={}));function A6(t,e,r,i){let n=S6(r);if(i===0)return n.map(h=>new Kc(h,[]));let a=E6(t,e,i),s=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,o=[],l=0,u=0;for(let h=0;h{var i;return t.name+((i=r.name)!=null?i:"")})}function E6(t,e,r){let i=t[e.get()];e.add(1);let n=Vt(t,e,ct(t,e)),a=r-1,s=[];i&Be.STRING&&(a-=F6(t,e,s)),a-=k6(t,e,i,s),a-=T6(t,e,i,s);let o,l=0;if(i&Be.PRESENCE){let h=I6(t,e);o=h.value,l=h.count,a--}let u=new Uint32Array;if(a>0&&(u=Vt(t,e,ct(t,e)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}function F6(t,e,r){let i=t[e.get()];e.add(1);let n=Py("",t,e,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=i,y=n;for(let x=0;xs.length)throw Error("Map value stream underflow while decoding feature payload");let b=M6(s,y,v,l);f[x]=b.value,y=b.nextIndex}let m=0;for(let x=i;x=r)throw Error("Unexpected end of map value stream");let n=t[e];if(n===pr.FALSE)return{value:!1,nextIndex:e+1};if(n===pr.TRUE)return{value:!0,nextIndex:e+1};if(n===pr.START_MAP){let a=Jc(t,e,r);return{value:zy(t,e+2,a,i).value,nextIndex:a}}if(n===pr.START_LIST){let a=Jc(t,e,r),s=[],o=e+2;for(;o=r)throw Error("Missing length for nested map/list payload");let i=t[e+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=e+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Ly(t,e){let r=t-pr.COUNT;if(r<0||r>=e.length)throw Error(`Scalar dictionary index out of range: ${t}`);return e[r]}function Xr(t,e){for(let r of e)t.push(r)}function B6(t,e,r,i,n,a){var s;return r.type==="scalarType"?a&&!a.has(r.name)?(my(i,t,e),null):P6(i,t,e,n,r.scalarType,r):((s=r.complexType)==null?void 0:s.physicalType)===Qe.MAP?A6(t,e,r,i):i===0?null:_6(t,e,r,a)}function P6(t,e,r,i,n,a){var l;let s;if(t===0)return null;if(a.nullable){let u=ct(e,r),h=u.numValues,c=r.get(),p=ci(e,h,u.byteLength,r);r.set(c+u.byteLength),s=new fe(p,u.numValues)}let o=s!=null?s:i;switch(n.physicalType){case it.UINT_32:case it.INT_32:return R6(e,r,a,n,o);case it.STRING:{let u=a.nullable?t-1:t;return(l=Py(a.name,e,r,u,s))!=null?l:null}case it.BOOLEAN:return z6(e,r,a,i,o);case it.UINT_64:case it.INT_64:return O6(e,r,a,o,n);case it.FLOAT:return L6(e,r,a,o);case it.DOUBLE:return V6(e,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function z6(t,e,r,i,n){let a=ct(t,e),s=a.numValues,o=e.get(),l=An(n)?n:void 0,u=ci(t,s,a.byteLength,e,l);e.set(o+a.byteLength);let h=new fe(u,s);return new m6(r.name,h,n)}function L6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=gy(t,e,n.numValues,a);return new g6(r.name,s,i)}function V6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=xy(t,e,n.numValues,a);return new fu(r.name,s,i)}function O6(t,e,r,i,n){let a=ct(t,e),s=es(a,i,t,e,"int64"),o=n.physicalType===it.INT_64;if(s===ht.FLAT){let u=An(i)?i:void 0,h=o?wy(t,e,a,u):Du(t,e,a,u);return new Sy(r.name,h,i)}if(s===ht.SEQUENCE){let u=by(t,e,a);return new Ey(r.name,u[0],u[1],a.numRleValues,o)}let l=o?K3(t,e,a):Dy(t,e,a);return new My(r.name,l,i,o)}function R6(t,e,r,i,n){let a=ct(t,e),s=es(a,n,t,e),o=i.physicalType===it.INT_32;if(s===ht.FLAT){let u=An(n)?n:void 0,h=o?Ta(t,e,a,void 0,u):Vt(t,e,a,void 0,u);return new pu(r.name,h,n)}if(s===ht.SEQUENCE){let u=vy(t,e,a);return new du(r.name,u[0],u[1],a.numRleValues,o)}let l=o?W3(t,e,a):wu(t,e,a);return new yu(r.name,l,n,o)}function An(t){return t instanceof fe}var It={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};function Vy(t){switch(t){case It.ID:case It.ID|It.ID_NULLABLE:case It.ID|It.ID_LONG:case It.ID|It.ID_LONG|It.ID_NULLABLE:return{nullable:(t&It.ID_NULLABLE)!==0,columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:(t&It.ID_LONG)!==0,type:"logicalType",logicalType:hy.ID}};case It.GEOMETRY:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.GEOMETRY,children:[]}};case It.STRUCT:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.STRUCT,children:[]}};case It.MAP:return{nullable:!0,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.MAP,children:[]}};default:return j6(t)}}function $6(t){return t>=It.SCALAR_BASE}function Oy(t){return t===It.STRUCT||t===It.MAP}function N6(t){if(t.type==="scalarType"){let e=t.scalarType;if(e.type==="physicalType")switch(e.physicalType){case it.BOOLEAN:case it.INT_8:case it.UINT_8:case it.INT_32:case it.UINT_32:case it.INT_64:case it.UINT_64:case it.FLOAT:case it.DOUBLE:return!1;case it.STRING:return!0;default:return!1}if(e.type==="logicalType")return!1}else if(t.type==="complexType"){let e=t.complexType;if(e.type==="physicalType")switch(e.physicalType){case Qe.GEOMETRY:case Qe.STRUCT:case Qe.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function U6(t){var e;return t.type==="scalarType"&&((e=t.scalarType)==null?void 0:e.type)==="logicalType"&&t.scalarType.logicalType===hy.ID}function q6(t){var e;return t.type==="complexType"&&((e=t.complexType)==null?void 0:e.type)==="physicalType"&&t.complexType.physicalType===Qe.GEOMETRY}function j6(t){let e;switch(t){case 10:case 11:e=it.BOOLEAN;break;case 12:case 13:e=it.INT_8;break;case 14:case 15:e=it.UINT_8;break;case 16:case 17:e=it.INT_32;break;case 18:case 19:e=it.UINT_32;break;case 20:case 21:e=it.INT_64;break;case 22:case 23:e=it.UINT_64;break;case 24:case 25:e=it.FLOAT;break;case 26:case 27:e=it.DOUBLE;break;case 28:case 29:e=it.STRING;break;default:return null}return{nullable:!!(t&1),columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:e}}}var G6=new TextDecoder,Qc="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function Eu(t,e){let r=$t(t,e,1)[0];if(r===0)return"";let i=e.get(),n=i+r,a=t.subarray(i,n);return e.add(r),G6.decode(a)}function X6(t){let e=t.name,r=t.nullable;return t.type==="scalarType"?{type:"scalarField",scalarField:t.scalarType,name:e,nullable:r}:{type:"complexField",complexField:t.complexType,name:e,nullable:r}}function Ry(t,e){let r=$t(t,e,1)[0]>>>0,i=r>=It.SCALAR_BASE?Vy(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=Si(je({},i),{name:Eu(t,e)});if(n.type==="complexType"&&Oy(r)){let a=n.complexType,s=$t(t,e,1)[0]>>>0;a.children=Array(s);for(let o=0;o>>0,i=Vy(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Qc}`);let n;if($6(r))n=Eu(t,e);else if(r>>0,o=a.complexType;o.children=Array(s);for(let l=0;l>>0,a=$t(t,e,1)[0]>>>0;i.columns=Array(a);for(let s=0;s>>0,s=i.get()+a;if(s>t.length)throw Error(`Block overruns tile: ${s} > ${t.length}`);let o=$t(t,i,1)[0]>>>0;if(o!==1&&o!==2){i.set(s);continue}let[l,u]=W6(t,i),h=l.featureTables[0],c=null,p=null,f=[],d=0;for(let m of h.columns){let g=m.name;if(U6(m)){let x=null;if(m.nullable){let b=ct(t,i),D=i.get(),A=ci(t,b.numValues,b.byteLength,i);i.set(D+b.byteLength),x=new fe(A,b.numValues)}let v=ct(t,i);d=x?x.size():v.decompressedCount,c=H6(t,m,i,g,v,x!=null?x:d,r)}else if(q6(m)){let x=$t(t,i,1)[0];if(d===0){let v=i.get();d=ct(t,i).decompressedCount,i.set(v)}e&&(e.scale=e.extent/u),p=f6(t,x,i,d,e)}else{let x=N6(m)?$t(t,i,1)[0]:1;if(x===0)continue;let v=B6(t,i,m,x,d,void 0);if(v)if(Array.isArray(v))for(let b of v)f.push(b);else f.push(v)}}let y=new xw(h.name,p,c,f,u);n.push(y),i.set(s)}return n}function H6(t,e,r,i,n,a,s=!1){var h;let o=(h=e.scalarType)!=null&&h.longID?it.UINT_64:it.UINT_32,l=typeof a=="number"?void 0:a,u=es(n,a,t,r,o===it.UINT_64?"int64":"int32");if(o===it.UINT_32)switch(u){case ht.FLAT:return new pu(i,Vt(t,r,n,void 0,l),a);case ht.SEQUENCE:{let c=vy(t,r,n);return new du(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new yu(i,wu(t,r,n),a,!1)}switch(u){case ht.FLAT:return s?new fu(i,Z3(t,r,n,l),a):new Sy(i,Du(t,r,n,l),a);case ht.SEQUENCE:{let c=by(t,r,n);return new Ey(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new My(i,Dy(t,r,n),a,!1)}throw Error("Vector type not supported for id column.")}var K6=class{constructor(t,e){var r;switch(this._featureData=t,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case Rt.POINT:case Rt.MULTIPOINT:this.type=1;break;case Rt.LINESTRING:case Rt.MULTILINESTRING:this.type=2;break;case Rt.POLYGON:case Rt.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){let t=[];for(let e of this._featureData.geometry.coordinates){let r=[];for(let i of e)r.push(new B(i.x,i.y));t.push(r)}return t}},J6=class{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new K6(this.features[t],this.extent)}},Fu=class{constructor(t){this.layers={};let e=Z6(new Uint8Array(t));this.layers=e.reduce((r,i)=>Si(je({},r),{[i.name]:new J6(i)}),{})}},ku=class{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new uo(mt,16,0),this.grid3D=new uo(mt,16,0),this.featureIndexArray=new Yf,this.promoteId=e}insert(t,e,r,i,n,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let o=a?this.grid3D:this.grid;for(let l of e){let u=[1/0,1/0,-1/0,-1/0];for(let h of l)u[0]=Math.min(u[0],h.x),u[1]=Math.min(u[1],h.y),u[2]=Math.max(u[2],h.x),u[3]=Math.max(u[3],h.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&o.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new Fu(this.rawTileData).layers:this.vtLayers=new Xl(new au(this.rawTileData)).layers,this.sourceLayerCoder=new cu(this.vtLayers?Object.keys(this.vtLayers).sort():[ll])),this.vtLayers}query(t,e,r,i){this.loadVTLayers();let n=t.params,a=mt/t.tileSize/t.scale,s=ai(n.filter,"queryRenderedFeatures filter",n.globalState),o=t.queryGeometry,l=t.queryPadding*a,u=Fa.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=Fa.fromPoints(t.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(y,m,g,x)=>vg(t.cameraQueryGeometry,y-l,m-l,g+l,x+l));for(let y of p)h.push(y);h.sort(t5);let f={},d;for(let y of h){if(y===d)continue;d=y;let m=this.featureIndexArray.get(y),g=null;this.loadMatchingFeature(f,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,n.layers,n.availableImages,e,r,i,(x,v,b)=>(g||(g=Ar(x)),v.queryIntersectsFeature({queryGeometry:o,feature:x,featureState:b,geometry:g,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return f}loadMatchingFeature(t,e,r,i,n,a,s,o,l,u,h){let c=this.bucketLayerIDs[e];if(a&&!c.some(y=>a.has(y)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(i);if(n.needGeometry){let y=hi(f,!0);if(!n.filter(new st(this.tileID.overscaledZ),y,this.tileID.canonical))return}else if(!n.filter(new st(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let y of c){if(a&&!a.has(y))continue;let m=o[y];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let x=Gt({},l[y]);x.paint=tp(x.paint,m.paint,f,g,s),x.layout=tp(x.layout,m.layout,f,g,s);let v=!h||h(f,m,g);if(!v)continue;let b=new gw(f,this.z,this.x,this.y,d);b.layer=x;let D=t[y];D===void 0&&(D=t[y]=[]),D.push({featureIndex:i,feature:b,intersectionZ:v})}}lookupSymbolFeatures(t,e,r,i,n,a,s,o){let l={};this.loadVTLayers();let u=ai(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let h of t)this.loadMatchingFeature(l,r,i,h,u,a,s,o,e);return l}hasLayer(t){for(let e of this.bucketLayerIDs)for(let r of e)if(t===r)return!0;return!1}getId(t,e){var i;let r=t.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[e];r=t.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=t.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))}return r}};C("FeatureIndex",ku,{omit:["rawTileData","sourceLayerCoder"]});function Q6(t){return typeof t=="object"&&!!t&&"evaluate"in t}function tp(t,e,r,i,n){return Ia(t,(a,s)=>{let o=e instanceof Ya?e.get(s):null;return Q6(o)?o.evaluate(r,i,void 0,n):o})}function t5(t,e){return e-t}var $y=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){let e=this.map.get(t);return e!==void 0&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){let r=this.map.keys().next().value;this.map.delete(r)}this.map.set(t,e)}clear(){this.map.clear()}};function Tu(t){let e=typeof t;if(e==="number"||e==="boolean"||e==="string"||t==null)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(let a of t)n+=`${Tu(a)},`;return`${n}]`}let r=Object.keys(t).sort(),i="{";for(let n=0;nthis._layers[c.id]),s=a[0];if(s.isHidden())continue;let o=s.source||"",l=this.familiesBySource[o];l||(l=this.familiesBySource[o]={});let u=s.sourceLayer||"_geojsonTileLayer",h=l[u];h||(h=l[u]=[]),h.push(a)}}},qy=class{constructor(t){let e={},r=[];for(let s in t){let o=t[s],l=e[s]={};for(let u in o){let h=o[u];if(!h||h.bitmap.width===0||h.bitmap.height===0)continue;let c={x:0,y:0,w:h.bitmap.width+2,h:h.bitmap.height+2};r.push(c),l[u]={rect:c,metrics:h.metrics}}}let{w:i,h:n}=su(r),a=new Ja({width:i||1,height:n||1});for(let s in t){let o=t[s];for(let l in o){let u=o[l];if(!u||u.bitmap.width===0||u.bitmap.height===0)continue;let h=e[s][l].rect;Ja.copy(u.bitmap,a,{x:0,y:0},{x:h.x+1,y:h.y+1},u.bitmap)}}this.image=a,this.positions=e}};C("GlyphAtlas",qy);var jy=class{constructor(t){this.tileID=new uu(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,e,r,i,n){return rt(this,null,function*(){this.data=t,this.collisionBoxArray=new Ll;let a=new cu(Object.keys(t.layers).sort()),s=new ku(this.tileID,this.promoteId);s.bucketLayerIDs=[];let o={},l={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:n},u=e.familiesBySource[this.source];for(let S in u){let k=t.layers[S];if(!k)continue;k.version===1&&Bt(`Vector tile source "${this.source}" layer "${S}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let z=a.encode(S),O=[];for(let P=0;PF.id)))}}let h=Ia(l.glyphDependencies,S=>Object.keys(S));for(let S of this.inFlightDependencies)S==null||S.abort();this.inFlightDependencies=[];let c=Promise.resolve({});if(Object.keys(h).length){let S=new AbortController;this.inFlightDependencies.push(S),c=i.sendAsync({type:"GG",data:{stacks:h,source:this.source,tileID:this.tileID,type:"glyphs"}},S)}let p=Object.keys(l.iconDependencies),f=Promise.resolve({});if(p.length){let S=new AbortController;this.inFlightDependencies.push(S),f=i.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},S)}let d=Object.keys(l.patternDependencies),y=Promise.resolve({});if(d.length){let S=new AbortController;this.inFlightDependencies.push(S),y=i.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"patterns"}},S)}let m=l.dashDependencies,g=Promise.resolve({});if(Object.keys(m).length){let S=new AbortController;this.inFlightDependencies.push(S),g=i.sendAsync({type:"GDA",data:{dashes:m}},S)}let[x,v,b,D]=yield Promise.all([c,f,y,g]),A=new qy(x),_=new ou(v,b);for(let S in o){let k=o[S];k.hasDependencies&&(Ny(k.layers,this.zoom,r),k.addFeatures({options:l,canonical:this.tileID.canonical,glyphMap:x,glyphPositions:A.positions,iconMap:v,iconPositions:_.iconPositions,patternMap:b,patternPositions:_.patternPositions,dashPositions:D,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(o).filter(S=>!S.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:A.image,imageAtlas:_,dashPositions:D,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?v:null,glyphPositions:this.returnDependencies?A.positions:null}})}};function Ny(t,e,r){let i=new st(e);for(let n of t)n.recalculate(i,r)}var Gy=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){let e=this.loading[t];e!=null&&e.abort&&(e.abort.abort(),delete this.loading[t])}getParsing(t){return this.parsing[t]}setParsing(t,e){this.parsing[t]=e}removeParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){let e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}},Xy=class{constructor(t){this.start=`${t}#start`,this.end=`${t}#end`,this.measure=t,performance.mark(this.start)}finish(){performance.mark(this.end);let t=performance.getEntriesByName(this.measure);return t.length===0&&(performance.measure(this.measure,this.start,this.end),t=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),t}},n5=class{constructor(t,e,r,i,n){this.type=t,this.properties=r||{},this.extent=n,this.pointsArray=e,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(e=>new B(e.x,e.y)))}},a5=class{constructor(t,e,r){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=r}feature(t){return this._myFeatures[t]}},s5=class{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}};function o5(t,e,r){let{extent:i}=t,n=2**(r.z-e.z),a=(r.x-e.x*n)*i,s=(r.y-e.y*n)*i,o=[];for(let l=0;l0&&l.addLayer(d)}let h={vectorTile:l,rawData:hu(l).buffer};return this.overzoomedTileResultCache.set(s,h),h}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}},u5=class{constructor(){this.loaded={}}loadTile(t){return rt(this,null,function*(){let{uid:e,encoding:r,rawImageData:i,redFactor:n,greenFactor:a,blueFactor:s,baseShift:o}=t,l=i.width+4,u=i.height+4,h=Ca(i)?new Zt({width:l,height:u},yield ap(i,-2,-2,l,u)):i,c=new jl(e,h,r,n,a,s,o);return this.loaded||(this.loaded={}),this.loaded[e]=c,c})}removeTile(t){let e=this.loaded,r=t.uid;e!=null&&e[r]&&delete e[r]}},h5=class{constructor(t,e,r,i=c5){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new Gy,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:e,x:r,y:i}=t.tileID.canonical,n=this._geoJSONIndex.getTile(e,r,i);if(!n)return null;let a=new ly(n.features,{version:2,extent:mt});return{vectorTile:a,rawData:hu(a,np).buffer}}loadTile(t){return rt(this,null,function*(){let{uid:e}=t,r=new jy(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let s={rawData:a};return this.tileState.setParsing(e,s),yield this._parseWorkerTile(r,t)}catch(i){throw this.tileState.markLoaded(e,r),i}})}_parseWorkerTile(t,e){return rt(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n}=r;i=Gt({rawTileData:n.slice(0),encoding:"mvt"},i),this.tileState.removeParsing(t.uid)}return i})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return rt(this,null,function*(){var r;(r=this._pendingRequest)==null||r.abort();let e=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let i={};return t.request&&(i.data=t.data),this._finishRequestTiming(e,t,i),i}catch(i){if(delete this._pendingRequest,!yl(i))throw i;return{abandoned:!0}}})}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new Xy(t.request.url)}_finishRequestTiming(t,e,r){let i=t==null?void 0:t.finish();i&&(r.resourceTiming={[e.source]:JSON.parse(JSON.stringify(i))})}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)return yield this.loadTile(t);if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}loadAndProcessGeoJSON(t,e){return rt(this,null,function*(){var r;if(t.request&&(t.data=(yield up(t.request,e)).data),t.data){t.data=this._filterGeoJSON(t.data,t.filter,t.source),this._geoJSONIndex=this._createGeoJSONIndex(t.data,t);return}if(t.dataDiff){(r=this._geoJSONIndex)!=null||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter,t.source));return}if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,Yy(t)),this._geoJSONIndex==null)throw Error(`Input data given to \'${t.source}\' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e,r){if(t.type!=="FeatureCollection")return t;let i=this._getFilterPredicate(e,r);return i?{type:"FeatureCollection",features:t.features.filter(n=>i(n))}:t}_getFilterPredicate(t,e){if(typeof t!="boolean"&&!(t!=null&&t.length))return;let r=er(t,`sources.${e}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(r.result==="error")throw Error(r.value.map(i=>`${i.key}: ${i.message}`).join(", "));return i=>r.value.evaluate({zoom:0},i)}removeSource(t){return rt(this,null,function*(){var e;(e=this._pendingRequest)==null||e.abort()})}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getClusterChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getClusterLeaves(t.clusterId,t.limit,t.offset)}};function c5(t,e){let r=Gt(e.geojsonVtOptions||{},{updateable:!0,clusterOptions:Yy(e)});return new Td(t,r)}function Yy({geojsonVtOptions:t,clusterProperties:e,source:r}){if(!e||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},s={properties:null},o=Object.keys(e);for(let l of o){let[u,h]=e[l],c=er(h,`sources.${r}.clusterProperties.${l}[1]`),p=er(typeof u=="string"?[u,["accumulated"],["get",l]]:u,`sources.${r}.clusterProperties.${l}[0]`);i[l]=c.value,n[l]=p.value}return t.clusterOptions.map=l=>{s.properties=l;let u={};for(let h of o)u[h]=i[h].evaluate(a,s);return u},t.clusterOptions.reduce=(l,u)=>{s.properties=u;for(let h of o)a.accumulated=l[h],l[h]=n[h].evaluate(a,s)},t.clusterOptions}function Uy(t){return rt(this,null,function*(){if(t.endsWith(".mjs")){yield import(t);return}let e=yield fetch(t,{credentials:"same-origin"});if(!e.ok)throw Error(`Failed to load ${t}: ${e.status}`);let r=yield e.text();if(/^[ \\t]*(import|export)\\s/m.test(r)){let i=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{yield import(i)}finally{URL.revokeObjectURL(i)}return}globalThis.eval(r)})}var p5=class{constructor(t){this.self=t,this.actor=new sy(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,r)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=r},this.self.addProtocol=sp,this.self.removeProtocol=op,this.self.registerRTLTextPlugin=e=>{wr.setMethods(e)},this.self.makeRequest=Ma,this.actor.registerMessageHandler("LDT",(e,r)=>this._getDEMWorkerSource(e,r.source).loadTile(r)),this.actor.registerMessageHandler("RDT",(e,r)=>rt(this,null,function*(){this._getDEMWorkerSource(e,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadData(r)),this.actor.registerMessageHandler("LT",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadTile(r)),this.actor.registerMessageHandler("RT",(e,r)=>this._getWorkerSource(e,r.type,r.source).reloadTile(r)),this.actor.registerMessageHandler("AT",(e,r)=>this._getWorkerSource(e,r.type,r.source).abortTile(r)),this.actor.registerMessageHandler("RMT",(e,r)=>this._getWorkerSource(e,r.type,r.source).removeTile(r)),this.actor.registerMessageHandler("RS",(e,r)=>rt(this,null,function*(){var n,a;if(!((a=(n=this.workerSources[e])==null?void 0:n[r.type])!=null&&a[r.source]))return;let i=this.workerSources[e][r.type][r.source];delete this.workerSources[e][r.type][r.source],i.removeSource!==void 0&&i.removeSource(r)})),this.actor.registerMessageHandler("RM",e=>rt(this,null,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,r)=>rt(this,null,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,r)=>this._syncRTLPluginState(e,r)),this.actor.registerMessageHandler("IS",(e,r)=>rt(this,null,function*(){yield Uy(r)})),this.actor.registerMessageHandler("SI",(e,r)=>this._setImages(e,r)),this.actor.registerMessageHandler("UL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).update(r.layers,r.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,r)=>rt(this,null,function*(){let i=this._getGlobalState(e);for(let n in r)i[n]=r[n]})),this.actor.registerMessageHandler("SL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).replace(r,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(t,e){return rt(this,null,function*(){this.availableImages[t]=e;for(let r in this.workerSources[t]){let i=this.workerSources[t][r];for(let n in i)i[n].availableImages=e}})}_syncRTLPluginState(t,e){return rt(this,null,function*(){return yield wr.syncState(e,Uy)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i5),e}_getWorkerSource(t,e,r){var i,n;if((i=this.workerSources)[t]||(i[t]={}),(n=this.workerSources[t])[e]||(n[e]={}),!this.workerSources[t][e][r]){let a={sendAsync:(s,o)=>(s.targetMapId=t,this.actor.sendAsync(s,o))};switch(e){case"vector":this.workerSources[t][e][r]=new l5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][r]=new h5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][r]=new this.externalWorkerSourceTypes[e](a,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][r]}_getDEMWorkerSource(t,e){var r,i;return(r=this.demWorkerSources)[t]||(r[t]={}),(i=this.demWorkerSources[t])[e]||(i[e]=new u5),this.demWorkerSources[t][e]}};mr(self)&&(self.worker=new p5(self));export{p5 as default};\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl-shared.mjs:\nmaplibre-gl/dist/maplibre-gl-worker.mjs:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt\n *)\n*/\n'});var Vst=W((lri,Ust)=>{"use strict";var h3=it(),h6r=uo().sanitizeHTML,d6r=Fte(),qst=V2();function Ost(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=qst.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var np=Ost.prototype;np.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=Lq(t)};np.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))};np.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};np.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};np.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};np.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)};np.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,!!Lq(e)){var r=p6r(e);t.addSource(this.idSource,r)}};np.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function Nst(e){var t={},r={};switch(e.type){case"circle":h3.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":h3.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":h3.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,n=d6r(i.textposition,i.iconsize);h3.extendFlat(t,{"icon-image":i.icon,"icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":n.anchor,"text-offset":n.offset,"symbol-placement":i.placement}),h3.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":h3.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function p6r(e){var t=e.sourcetype,r=e.source,i={type:t},n;return t==="geojson"?n="data":t==="vector"?n=typeof r=="string"?"url":"tiles":t==="raster"?(n="tiles",i.tileSize=256):t==="image"&&(n="url",i.coordinates=e.coordinates),i[n]=r,e.sourceattribution&&(i.attribution=h6r(e.sourceattribution)),i}Ust.exports=function(t,r,i){var n=new Ost(t,r);return n.update(i),n}});var Qst=W((uri,Jst)=>{"use strict";var Iq=(Rst(),Go(Pst)),v6r=Bst(),Gst=!1,g6r=()=>{Gst||(Gst=!0,Iq.setWorkerUrl(URL.createObjectURL(new Blob([v6r],{type:"text/javascript"}))))},Rq=it(),$st=cm(),Hst=yi(),m6r=ji(),y6r=bf(),Pq=Ds(),Wst=u1(),x6r=Wst.drawMode,_6r=Wst.selectMode,b6r=cu().prepSelect,w6r=cu().clearOutline,T6r=cu().clearSelectionsCache,A6r=cu().selectOnClick,ax=V2(),M6r=Vst();function Yst(e,t){this.id=t,this.gd=e;var r=e._fullLayout,i=e._context;this.container=r._glcontainer.node(),this.isStatic=i.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 tu=Yst.prototype;tu.plot=function(e,t,r){var i=this,n;i.map?n=new Promise(function(a,o){i.updateMap(e,t,a,o)}):n=new Promise(function(a,o){i.createMap(e,t,a,o)}),r.push(n)};tu.createMap=function(e,t,r,i){var n=this,a=t[n.id],o=n.styleObj=Kst(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:n.div,style:o.style,center:Nae(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!n.isStatic,canvasContextAttributes:{preserveDrawingBuffer:n.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=a._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:ax.fitBoundsPadding}),g6r();let f=n.map=new Iq.Map(u).addControl(new Iq.AttributionControl({compact:!0})),h={};f.setMissingStyleImageResolver(p=>(!h[p]&&/^[a-zA-Z0-9-]+$/.test(p)&&(h[p]=new Promise(v=>{let m=new Image(15,15);m.onload=()=>{f.addImage(p,m,{sdf:!0}),v()},m.onerror=()=>v(),m.crossOrigin="Anonymous",m.src=`https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/${p}.svg`})),h[p])),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",n.rejectOnError(i),n.isStatic||n.initFx(e,t);var d=[];d.push(new Promise(function(p){f.once("load",p)})),d=d.concat($st.fetchTraceGeoData(e)),Promise.all(d).then(function(){c&&Xst(n,a),Zst(n,a),n.fillBelowLookup(e,t),n.updateData(e),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};tu.updateMap=function(e,t,r,i){var n=this,a=n.map,o=t[this.id];n.rejectOnError(i);var s=[],l=Kst(o.style);JSON.stringify(n.styleObj)!==JSON.stringify(l)&&(n.styleObj=l,a.setStyle(l.style),n.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat($st.fetchTraceGeoData(e)),Promise.all(s).then(function(){n.fillBelowLookup(e,t),n.updateData(e);let u=o._fitBounds;u&&(a.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:ax.fitBoundsPadding,animate:!1}),Xst(n,o),Zst(n,o)),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};function Xst(e,t){let{center:r,zoom:i}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=i,t._input._fitView={center:fn({},r),zoom:i}}function Zst(e,t){let r=e.getView();e.viewInitial={center:Rq.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}tu.fillBelowLookup=function(e,t){var r=t[this.id],i=r.layers,n,a,o=this.belowLookup={},s=!1;for(n=0;n1)for(n=0;nt.project(i).x,_subplot:t},t.yaxis={_id:"y",c2p:i=>t.project(i).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m6r.setConvert(t.mockAxis,e)};tu.initFx=function(e,t){var r=this,i=r.gd,n=r.map;n.on("moveend",function(s){if(r.map){var l=i._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];Hst.call("_storeDirectGUIEdit",i.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,i.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()}}),n.on("wheel",function(){r.wheeling=!0}),n.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 n.unproject(u).lng},r.yaxis.p2c=function(){return n.unproject(u).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&Pq.hover(i,s,r.id)},Pq.hover(i,s,r.id),i._fullLayout._hoversubplot=r.id});function a(){Pq.loneUnhover(t._hoverlayer)}n.on("dragstart",function(){r.dragging=!0,a()}),n.on("zoomstart",a),n.on("mouseout",function(){i._fullLayout._hoversubplot=null});function o(){var s=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}n.on("drag",o),n.on("zoom",o),n.on("dblclick",function(){var s=i._fullLayout[r.id];Hst.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;n.setCenter(Nae(l.center)),n.setZoom(l.zoom),n.setBearing(l.bearing),n.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,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){T6r(r.dragOptions),w6r(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=i._fullLayout.clickmode;u.indexOf("select")>-1&&A6r(l.originalEvent,i,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&Pq.click(i,l.originalEvent)}}};tu.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(t.isStatic)return;function n(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[n([u.xmin,u.ymin]),n([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(n)}};var s=t.dragOptions;t.dragOptions=Rq.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:i,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),_6r(a)||x6r(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){b6r(l,u,c,t.dragOptions,a)},y6r.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))};tu.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])};tu.updateLayers=function(e){var t=e[this.id],r=t.layers,i=this.layerList,n;if(r.length!==i.length){for(n=0;nS6r});function S6r(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 h=0;h{"use strict";elt=nd(cm())});var alt=W((fri,nlt)=>{"use strict";var Uae=it(),E6r=q_(),k6r=Xc(),ilt=JE(),{getMapFitBounds:C6r}=(rlt(),Go(tlt));nlt.exports=function(t,r,i){E6r(t,r,i,{type:"map",attributes:ilt,handleDefaults:D6r,partition:"y",fullData:i})};function D6r(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let n=r("fitbounds");var a=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(a===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,k6r(e,t,{name:"layers",handleItemDefaults:F6r}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:h}=e,d=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&h===c;if(n&&d){let p=C6r(i.fullData,i.id);p&&(t._fitBounds=p)}t._input=e}function F6r(e,t){function r(l,u){return Uae.coerce(e,t,ilt.layers,l,u)}var i=r("visible");if(i){var n=r("sourcetype"),a=n==="raster"||n==="image";r("source"),r("sourceattribution"),n==="vector"&&r("sourcelayer"),n==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",Uae.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"),Uae.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var zq=W(N0=>{"use strict";var Vae=it(),olt=Vae.strTranslate,L6r=Vae.strScale,P6r=_c().getSubplotCalcData,I6r=sd(),R6r=vi(),slt=Ji(),z6r=uo(),B6r=Qst(),ox="map";N0.name=ox;N0.attr="subplot";N0.idRoot=ox;N0.idRegex=N0.attrRegex=Vae.counterRegex(ox);N0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};N0.layoutAttributes=JE();N0.supplyLayoutDefaults=alt();N0.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[ox],a=0;av/2){var m=f.split("|").join("
");d.text(m).attr("data-unformatted",m).call(z6r.convertToTspans,e),p=slt.bBox(d.node())}d.attr("transform",olt(-3,-p.height+8)),h.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 g=1;p.width+6>v&&(g=v/(p.width+6));var w=[i.l+i.w*o.x[1],i.t+i.h*(1-o.y[0])];h.attr("transform",olt(w[0],w[1])+L6r(g))}};N0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[ox],i=0;i{"use strict";llt.exports={attributes:sz(),supplyDefaults:PJe(),colorbar:Ac(),formatLabels:Dte(),calc:VJ(),plot:WJe(),hoverPoints:hz().hoverPoints,eventData:KJe(),selectPoints:QJe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:zq(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var flt=W((pri,clt)=>{"use strict";clt.exports=ult()});var Gae=W((vri,hlt)=>{"use strict";var Om=xE(),q6r=Eo(),{hovertemplateAttrs:O6r,templatefallbackAttrs:N6r}=Ga(),U6r=Wa(),sx=tn().extendFlat;hlt.exports=sx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:sx({},Om.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Om.text,hovertext:Om.hovertext,marker:{line:{color:sx({},Om.marker.line.color,{editType:"plot"}),width:sx({},Om.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:sx({},Om.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:sx({},Om.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:sx({},Om.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Om.hoverinfo,hovertemplate:O6r({},{keys:["properties"]}),hovertemplatefallback:N6r(),showlegend:sx({},U6r.showlegend,{dflt:!1})},q6r("",{cLetter:"z",editTypeOverride:"calc"}))});var plt=W((gri,dlt)=>{"use strict";var C8=it(),V6r=Fu(),G6r=Gae();dlt.exports=function(t,r,i,n){function a(c,f){return C8.coerce(t,r,G6r,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!C8.isArrayOrTypedArray(o)||!o.length||!C8.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||C8.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),V6r(t,r,n,a,{prefix:"",cLetter:"z"}),C8.coerceSelectionMarkerOpacity(r,a)}});var Hae=W((mri,mlt)=>{"use strict";var H6r=sn(),Nm=it(),j6r=Jo(),$6r=Ji(),W6r=dE().makeBlank,vlt=cm();function Y6r(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,i={layout:{visibility:"none"},paint:{}},n={layout:{visibility:"none"},paint:{}},a=t._opts={fill:i,line:n,geojson:W6r()};if(!r)return a;var o=vlt.extractTraceFeature(e);if(!o)return a;var s=j6r.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Nm.isArrayOrTypedArray(l.opacity)&&(c=function(w){var b=w.mo;return H6r(b)?+Nm.constrain(b,0,1):0});var f;Nm.isArrayOrTypedArray(u.color)&&(f=function(w){return w.mlc});var h;Nm.isArrayOrTypedArray(u.width)&&(h=function(w){return w.mlw});for(var d=0;d{"use strict";var xlt=Hae().convert,X6r=Hae().convertOnSelect,ylt=V2().traceLayerPrefix;function _lt(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",ylt+t+"-fill"],["line",ylt+t+"-line"]],this.below=null}var KT=_lt.prototype;KT.update=function(e){this._update(xlt(e)),e[0].trace._glTrace=this};KT.updateOnSelect=function(e){this._update(X6r(e))};KT._update=function(e){var t=this.subplot,r=this.layerList,i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(e,i),this.below=i);for(var n=0;n=0;r--)e.removeLayer(t[r][1])};KT.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};blt.exports=function(t,r){var i=r[0].trace,n=new _lt(t,i.uid),a=n.sourceId,o=xlt(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),r[0].trace._glTrace=n,n}});var Alt=W((xri,Tlt)=>{"use strict";Tlt.exports={attributes:Gae(),supplyDefaults:plt(),colorbar:x5(),calc:bQ(),plot:wlt(),hoverPoints:TQ(),eventData:AQ(),selectPoints:MQ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._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(typeof n=="string"&&n.indexOf("water")===0){for(var a=i+1;a{"use strict";Mlt.exports=Alt()});var $ae=W((bri,klt)=>{"use strict";var Z6r=Eo(),{hovertemplateAttrs:K6r,templatefallbackAttrs:J6r}=Ga(),Elt=Wa(),Bq=sz(),jae=tn().extendFlat;klt.exports=jae({lon:Bq.lon,lat:Bq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:Bq.text,hovertext:Bq.hovertext,hoverinfo:jae({},Elt.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:K6r(),hovertemplatefallback:J6r(),showlegend:jae({},Elt.showlegend,{dflt:!1})},Z6r("",{cLetter:"z",editTypeOverride:"calc"}))});var Dlt=W((wri,Clt)=>{"use strict";var Q6r=it(),eAr=Fu(),tAr=$ae();Clt.exports=function(t,r,i,n){function a(u,c){return Q6r.coerce(t,r,tAr,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),eAr(t,r,n,a,{prefix:"",cLetter:"z"})}});var Plt=W((Tri,Llt)=>{"use strict";var Wae=sn(),rAr=it().isArrayOrTypedArray,Yae=Kn().BADNUM,iAr=Zc(),Flt=it()._;Llt.exports=function(t,r){for(var i=r._length,n=new Array(i),a=r.z,o=rAr(a)&&a.length,s=0;s{"use strict";var nAr=sn(),Xae=it(),Ilt=ni(),Rlt=Jo(),zlt=Kn().BADNUM,aAr=dE().makeBlank;Blt.exports=function(t){var r=t[0].trace,i=r.visible===!0&&r._length!==0,n={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:n,geojson:aAr()};if(!i)return a;var o=[],s,l=r.z,u=r.radius,c=Xae.isArrayOrTypedArray(l)&&l.length,f=Xae.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var m=Rlt.extractOpts(r),g=m.reversescale?Rlt.flipScale(m.colorscale):m.colorscale,w=g[0][1],b=Ilt.opacity(w)<1?w:Ilt.addOpacity(w,0),_=["interpolate",["linear"],["heatmap-density"],0,b];for(s=1;s{"use strict";var Olt=qlt(),oAr=V2().traceLayerPrefix;function Nlt(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",oAr+t+"-heatmap"]],this.below=null}var qq=Nlt.prototype;qq.update=function(e){var t=this.subplot,r=this.layerList,i=Olt(e),n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(i,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};qq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Ult.exports=function(t,r){var i=r[0].trace,n=new Nlt(t,i.uid),a=n.sourceId,o=Olt(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),n}});var Hlt=W((Sri,Glt)=>{"use strict";var sAr=ji(),lAr=hz().hoverPoints,uAr=hz().getExtraText;Glt.exports=function(t,r,i){var n=lAr(t,r,i);if(n){var a=n[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=sAr.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=uAr(s,l,o[0].t.labels),[a]}}});var $lt=W((Eri,jlt)=>{"use strict";jlt.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var Ylt=W((kri,Wlt)=>{"use strict";Wlt.exports={attributes:$ae(),supplyDefaults:Dlt(),colorbar:x5(),formatLabels:Dte(),calc:Plt(),plot:Vlt(),hoverPoints:Hlt(),eventData:$lt(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;i{"use strict";Xlt.exports=Ylt()});var Kae=W((Fri,tut)=>{"use strict";var cAr=Ho(),fAr=Wa(),Klt=Vl(),Zae=N3(),hAr=us().attributes,{hovertemplateAttrs:Jlt,templatefallbackAttrs:Qlt}=Ga(),dAr=Eo(),pAr=Da().templatedArray,vAr=_s().descriptionOnlyNumbers,eut=tn().extendFlat,gAr=ls().overrideAll,Dri=tut.exports=gAr({hoverinfo:eut({},fAr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:Zae.hoverlabel,domain:hAr({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:vAr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:cAr({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:Klt.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:Zae.hoverlabel,hovertemplate:Jlt({},{keys:["value","label"]}),hovertemplatefallback:Qlt(),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:Klt.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:Zae.hoverlabel,hovertemplate:Jlt({},{keys:["value","label"]}),hovertemplatefallback:Qlt(),colorscales:pAr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:eut(dAr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var aut=W((Lri,nut)=>{"use strict";var JT=it(),Oq=Kae(),d3=ni(),mAr=us().defaults,rut=EA(),iut=Da(),yAr=Xc();nut.exports=function(t,r,i,n){function a(_,M){return JT.coerce(t,r,Oq,_,M)}var o=JT.extendDeep(n.hoverlabel,t.hoverlabel),s=t.node,l=iut.newContainer(r,"node");function u(_,M){return JT.coerce(s,l,Oq.node,_,M)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),rut(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=n.colorway;let f=_=>c[_%c.length];u("color",l.label.map((_,M)=>d3.addOpacity(f(M),.8))),u("customdata");var h=t.link||{},d=iut.newContainer(r,"link");function p(_,M){return JT.coerce(h,d,Oq.link,_,M)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),rut(h,d,p,o),p("hovertemplate"),p("sort");var v=d3.luminosity(n.paper_bgcolor)<.333,m=v?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=p("color",m);function w(_){if(!d3.isValid(_))return _;let M=d3.opacity(_);return M<=.8?d3.addOpacity(_,M+.2):v?d3.brighten(_,10):d3.adjustLightness(_,-10)}p("hovercolor",Array.isArray(g)?g.map(w):w(g)),p("customdata"),yAr(h,d,{name:"colorscales",handleItemDefaults:xAr}),mAr(r,n,a),a("orientation"),a("direction"),a("valueformat"),a("valuesuffix");let b=l.x.length&&l.y.length?"freeform":void 0;a("arrangement",b),JT.coerceFont(a,"textfont",n.font,{autoShadowDflt:!0}),r._length=null};function xAr(e,t){function r(i,n){return JT.coerce(e,t,Oq.link.colorscales,i,n)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var Jae=W((Pri,out)=>{"use strict";out.exports=_Ar;function _Ar(e){for(var t=e.length,r=new Array(t),i=new Array(t),n=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){m=w[w.length-1];var b=e[m];if(a[m]=0&&s[m].push(o[M])}a[m]=_}else{if(i[m]===r[m]){for(var x=[],T=[],A=0,_=g.length-1;_>=0;--_){var y=g[_];if(n[y]=!1,x.push(y),T.push(s[y]),A+=s[y].length,o[y]=c.length,y===m){g.length=_;break}}c.push(x);for(var E=new Array(A),_=0;_{"use strict";var bAr=Jae(),QT=it(),wAr=G1().wrap,D8=QT.isArrayOrTypedArray,sut=QT.isIndex,lut=Jo();function TAr(e){var t=e.node,r=e.link,i=[],n=D8(r.color),a=D8(r.hovercolor),o=D8(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 v=p+1;e.node._count=v;var m,g=e.node.groups,w={};for(c=0;c0&&sut(A,v)&&sut(y,v)&&!(w.hasOwnProperty(A)&&w.hasOwnProperty(y)&&w[A]===w[y])){w.hasOwnProperty(y)&&(y=w[y]),w.hasOwnProperty(A)&&(A=w[A]),A=+A,y=+y,s[A]=s[y]=!0;var E="";r.label&&r.label[c]&&(E=r.label[c]);var S=null;E&&l.hasOwnProperty(E)&&(S=l[E]),i.push({pointNumber:c,label:E,color:n?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:S,source:A,target:y,value:+T}),x.source.push(A),x.target.push(y)}}var C=v+g.length,k=D8(t.color),D=D8(t.customdata),F=[];for(c=0;cv-1,childrenNodes:[],pointNumber:c,label:P,color:k?t.color[c]:t.color,customdata:D?t.customdata[c]:t.customdata})}var R=!1;return AAr(C,x.source,x.target)&&(R=!0),{circular:R,links:i,nodes:F,groups:g,groupLookup:w}}function AAr(e,t,r){for(var i=QT.init2dArray(e,0),n=0;n1})}uut.exports=function(t,r){var i=TAr(r);return wAr({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}});var hut=W((Nq,fut)=>{(function(e,t){typeof Nq=="object"&&typeof fut!="undefined"?t(Nq):(e=e||self,t(e.d3=e.d3||{}))})(Nq,function(e){"use strict";function t(T){var A=+this._x.call(null,T),y=+this._y.call(null,T);return r(this.cover(A,y),A,y,T)}function r(T,A,y,E){if(isNaN(A)||isNaN(y))return T;var S,C=T._root,k={data:E},D=T._x0,F=T._y0,P=T._x1,R=T._y1,L,I,B,O,$,Y,K,j;if(!C)return T._root=k,T;for(;C.length;)if(($=A>=(L=(D+P)/2))?D=L:P=L,(Y=y>=(I=(F+R)/2))?F=I:R=I,S=C,!(C=C[K=Y<<1|$]))return S[K]=k,T;if(B=+T._x.call(null,C.data),O=+T._y.call(null,C.data),A===B&&y===O)return k.next=C,S?S[K]=k:T._root=k,T;do S=S?S[K]=new Array(4):T._root=new Array(4),($=A>=(L=(D+P)/2))?D=L:P=L,(Y=y>=(I=(F+R)/2))?F=I:R=I;while((K=Y<<1|$)===(j=(O>=I)<<1|B>=L));return S[j]=C,S[K]=k,T}function i(T){var A,y,E=T.length,S,C,k=new Array(E),D=new Array(E),F=1/0,P=1/0,R=-1/0,L=-1/0;for(y=0;yR&&(R=S),CL&&(L=C));if(F>R||P>L)return this;for(this.cover(F,P).cover(R,L),y=0;yT||T>=S||E>A||A>=C;)switch(P=(AR||(D=O.y0)>L||(F=O.x1)=K)<<1|T>=Y)&&(O=I[I.length-1],I[I.length-1]=I[I.length-1-$],I[I.length-1-$]=O)}else{var j=T-+this._x.call(null,B.data),q=A-+this._y.call(null,B.data),J=j*j+q*q;if(J=(I=(k+F)/2))?k=I:F=I,($=L>=(B=(D+P)/2))?D=B:P=B,A=y,!(y=y[Y=$<<1|O]))return this;if(!y.length)break;(A[Y+1&3]||A[Y+2&3]||A[Y+3&3])&&(E=A,K=Y)}for(;y.data!==T;)if(S=y,!(y=y.next))return this;return(C=y.next)&&delete y.next,S?(C?S.next=C:delete S.next,this):A?(C?A[Y]=C:delete A[Y],(y=A[0]||A[1]||A[2]||A[3])&&y===(A[3]||A[2]||A[1]||A[0])&&!y.length&&(E?E[K]=y:this._root=y),this):(this._root=C,this)}function c(T){for(var A=0,y=T.length;A{(function(e,t){t(typeof Uq=="object"&&typeof dut!="undefined"?Uq:e.d3=e.d3||{})})(Uq,(function(e){"use strict";var t="$";function r(){}r.prototype=i.prototype={constructor:r,has:function(v){return t+v in this},get:function(v){return this[t+v]},set:function(v,m){return this[t+v]=m,this},remove:function(v){var m=t+v;return m in this&&delete this[m]},clear:function(){for(var v in this)v[0]===t&&delete this[v]},keys:function(){var v=[];for(var m in this)m[0]===t&&v.push(m.slice(1));return v},values:function(){var v=[];for(var m in this)m[0]===t&&v.push(this[m]);return v},entries:function(){var v=[];for(var m in this)m[0]===t&&v.push({key:m.slice(1),value:this[m]});return v},size:function(){var v=0;for(var m in this)m[0]===t&&++v;return v},empty:function(){for(var v in this)if(v[0]===t)return!1;return!0},each:function(v){for(var m in this)m[0]===t&&v(this[m],m.slice(1),this)}};function i(v,m){var g=new r;if(v instanceof r)v.each(function(x,T){g.set(T,x)});else if(Array.isArray(v)){var w=-1,b=v.length,_;if(m==null)for(;++w=v.length)return g!=null&&x.sort(g),w!=null?w(x):x;for(var E=-1,S=x.length,C=v[T++],k,D,F=i(),P,R=A();++Ev.length)return x;var A,y=m[T-1];return w!=null&&T>=v.length?A=x.entries():(A=[],x.each(function(E,S){A.push({key:S,values:M(E,T)})})),y!=null?A.sort(function(E,S){return y(E.key,S.key)}):A}return b={object:function(x){return _(x,0,a,o)},map:function(x){return _(x,0,s,l)},entries:function(x){return M(_(x,0,s,l),0)},key:function(x){return v.push(x),b},sortKeys:function(x){return m[v.length-1]=x,b},sortValues:function(x){return g=x,b},rollup:function(x){return w=x,b}}}function a(){return{}}function o(v,m,g){v[m]=g}function s(){return i()}function l(v,m,g){v.set(m,g)}function u(){}var c=i.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(v){return v+="",this[t+v]=v,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(v,m){var g=new u;if(v instanceof u)v.each(function(_){g.add(_)});else if(v){var w=-1,b=v.length;if(m==null)for(;++w{(function(e,t){typeof Vq=="object"&&typeof put!="undefined"?t(Vq):(e=e||self,t(e.d3=e.d3||{}))})(Vq,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}})}i.prototype=r.prototype={constructor:i,on:function(s,l){var u=this._,c=n(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof Gq=="object"&&typeof gut!="undefined"?t(Gq):(e=e||self,t(e.d3=e.d3||{}))})(Gq,function(e){"use strict";var t=0,r=0,i=0,n=1e3,a,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 h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=v.prototype={constructor:p,restart:function(T,A,y){if(typeof T!="function")throw new TypeError("callback is not a function");y=(y==null?h():+y)+(A==null?0:+A),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=T,this._time=y,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}};function v(T,A,y){var E=new p;return E.restart(T,A,y),E}function m(){h(),++t;for(var T=a,A;T;)(A=l-T._time)>=0&&T._call.call(null,A),T=T._next;--t}function g(){l=(s=c.now())+u,t=r=0;try{m()}finally{t=0,b(),l=0}}function w(){var T=c.now(),A=T-s;A>n&&(u-=A,s=T)}function b(){for(var T,A=a,y,E=1/0;A;)A._call?(E>A._time&&(E=A._time),T=A,A=A._next):(y=A._next,A._next=null,A=T?T._next=y:a=y);o=T,_(E)}function _(T){if(!t){r&&(r=clearTimeout(r));var A=T-l;A>24?(T<1/0&&(r=setTimeout(g,T-c.now()-u)),i&&(i=clearInterval(i))):(i||(s=c.now(),i=setInterval(w,n)),t=1,f(g))}}function M(T,A,y){var E=new p;return A=A==null?0:+A,E.restart(function(S){E.stop(),T(S+A)},A,y),E}function x(T,A,y){var E=new p,S=A;return A==null?(E.restart(T,A,y),E):(A=+A,y=y==null?h():+y,E.restart(function C(k){k+=S,E.restart(C,S+=A,y),T(k)},A,y),E)}e.interval=x,e.now=h,e.timeout=M,e.timer=v,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})})});var xut=W((Hq,yut)=>{(function(e,t){typeof Hq=="object"&&typeof yut!="undefined"?t(Hq,hut(),Qae(),vut(),mut()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(Hq,(function(e,t,r,i,n){"use strict";function a(T,A){var y;T==null&&(T=0),A==null&&(A=0);function E(){var S,C=y.length,k,D=0,F=0;for(S=0;SL.index){var Q=I-X.x-X.vx,te=B-X.y-X.vy,ce=Q*Q+te*te;ceI+G||UB+G||VF.r&&(F.r=F[P].r)}function D(){if(A){var F,P=A.length,R;for(y=new Array(P),F=0;F1?($==null?D.remove(O):D.set(O,B($)),A):D.get(O)},find:function(O,$,Y){var K=0,j=T.length,q,J,U,V,X;for(Y==null?Y=1/0:Y*=Y,K=0;K1?(P.on(O,$),A):P.on(O)}}}function b(){var T,A,y,E=o(-30),S,C=1,k=1/0,D=.81;function F(I){var B,O=T.length,$=t.quadtree(T,p,v).visitAfter(R);for(y=I,B=0;B=k)return;(I.data!==A||I.next)&&(Y===0&&(Y=s(),q+=Y*Y),K===0&&(K=s(),q+=K*K),q{(function(e,t){typeof jq=="object"&&typeof _ut!="undefined"?t(jq):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(jq,(function(e){"use strict";function t($e,tt){return $ett?1:$e>=tt?0:NaN}function r($e){let tt=$e,st=$e;$e.length===1&&(tt=(ir,hr)=>$e(ir)-hr,st=i($e));function xt(ir,hr,Ur,si){for(Ur==null&&(Ur=0),si==null&&(si=ir.length);Ur>>1;st(ir[ei],hr)<0?Ur=ei+1:si=ei}return Ur}function Je(ir,hr,Ur,si){for(Ur==null&&(Ur=0),si==null&&(si=ir.length);Ur>>1;st(ir[ei],hr)>0?si=ei:Ur=ei+1}return Ur}function Ct(ir,hr,Ur,si){Ur==null&&(Ur=0),si==null&&(si=ir.length);let ei=xt(ir,hr,Ur,si-1);return ei>Ur&&tt(ir[ei-1],hr)>-tt(ir[ei],hr)?ei-1:ei}return{left:xt,center:Ct,right:Je}}function i($e){return(tt,st)=>t($e(tt),st)}function n($e){return $e===null?NaN:+$e}function*a($e,tt){if(tt===void 0)for(let st of $e)st!=null&&(st=+st)>=st&&(yield st);else{let st=-1;for(let xt of $e)(xt=tt(xt,++st,$e))!=null&&(xt=+xt)>=xt&&(yield xt)}}let o=r(t),s=o.right,l=o.left,u=r(n).center;function c($e,tt){let st=0;if(tt===void 0)for(let xt of $e)xt!=null&&(xt=+xt)>=xt&&++st;else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(Je=+Je)>=Je&&++st}return st}function f($e){return $e.length|0}function h($e){return!($e>0)}function d($e){return typeof $e!="object"||"length"in $e?$e:Array.from($e)}function p($e){return tt=>$e(...tt)}function v(...$e){let tt=typeof $e[$e.length-1]=="function"&&p($e.pop());$e=$e.map(d);let st=$e.map(f),xt=$e.length-1,Je=new Array(xt+1).fill(0),Ct=[];if(xt<0||st.some(h))return Ct;for(;;){Ct.push(Je.map((hr,Ur)=>$e[Ur][hr]));let ir=xt;for(;++Je[ir]===st[ir];){if(ir===0)return tt?Ct.map(tt):Ct;Je[ir--]=0}}}function m($e,tt){var st=0,xt=0;return Float64Array.from($e,tt===void 0?Je=>st+=+Je||0:Je=>st+=+tt(Je,xt++,$e)||0)}function g($e,tt){return tt<$e?-1:tt>$e?1:tt>=$e?0:NaN}function w($e,tt){let st=0,xt,Je=0,Ct=0;if(tt===void 0)for(let ir of $e)ir!=null&&(ir=+ir)>=ir&&(xt=ir-Je,Je+=xt/++st,Ct+=xt*(ir-Je));else{let ir=-1;for(let hr of $e)(hr=tt(hr,++ir,$e))!=null&&(hr=+hr)>=hr&&(xt=hr-Je,Je+=xt/++st,Ct+=xt*(hr-Je))}if(st>1)return Ct/(st-1)}function b($e,tt){let st=w($e,tt);return st&&Math.sqrt(st)}function _($e,tt){let st,xt;if(tt===void 0)for(let Je of $e)Je!=null&&(st===void 0?Je>=Je&&(st=xt=Je):(st>Je&&(st=Je),xt=Ct&&(st=xt=Ct):(st>Ct&&(st=Ct),xt0){for(ir=tt[--st];st>0&&(xt=ir,Je=tt[--st],ir=xt+Je,Ct=Je-(ir-xt),!Ct););st>0&&(Ct<0&&tt[st-1]<0||Ct>0&&tt[st-1]>0)&&(Je=Ct*2,xt=ir+Je,Je==xt-ir&&(ir=xt))}return ir}}function x($e,tt){let st=new M;if(tt===void 0)for(let xt of $e)(xt=+xt)&&st.add(xt);else{let xt=-1;for(let Je of $e)(Je=+tt(Je,++xt,$e))&&st.add(Je)}return+st}function T($e,tt){let st=new M,xt=-1;return Float64Array.from($e,tt===void 0?Je=>st.add(+Je||0):Je=>st.add(+tt(Je,++xt,$e)||0))}class A extends Map{constructor(tt,st=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:st}}),tt!=null)for(let[xt,Je]of tt)this.set(xt,Je)}get(tt){return super.get(E(this,tt))}has(tt){return super.has(E(this,tt))}set(tt,st){return super.set(S(this,tt),st)}delete(tt){return super.delete(C(this,tt))}}class y extends Set{constructor(tt,st=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:st}}),tt!=null)for(let xt of tt)this.add(xt)}has(tt){return super.has(E(this,tt))}add(tt){return super.add(S(this,tt))}delete(tt){return super.delete(C(this,tt))}}function E({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)?$e.get(xt):st}function S({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)?$e.get(xt):($e.set(xt,st),st)}function C({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)&&(st=$e.get(st),$e.delete(xt)),st}function k($e){return $e!==null&&typeof $e=="object"?$e.valueOf():$e}function D($e){return $e}function F($e,...tt){return $($e,D,D,tt)}function P($e,...tt){return $($e,Array.from,D,tt)}function R($e,tt,...st){return $($e,D,tt,st)}function L($e,tt,...st){return $($e,Array.from,tt,st)}function I($e,...tt){return $($e,D,O,tt)}function B($e,...tt){return $($e,Array.from,O,tt)}function O($e){if($e.length!==1)throw new Error("duplicate key");return $e[0]}function $($e,tt,st,xt){return(function Je(Ct,ir){if(ir>=xt.length)return st(Ct);let hr=new A,Ur=xt[ir++],si=-1;for(let ei of Ct){let Lr=Ur(ei,++si,Ct),$i=hr.get(Lr);$i?$i.push(ei):hr.set(Lr,[ei])}for(let[ei,Lr]of hr)hr.set(ei,Je(Lr,ir));return tt(hr)})($e,0)}function Y($e,tt){return Array.from(tt,st=>$e[st])}function K($e,...tt){if(typeof $e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");$e=Array.from($e);let[st=t]=tt;if(st.length===1||tt.length>1){let xt=Uint32Array.from($e,(Je,Ct)=>Ct);return tt.length>1?(tt=tt.map(Je=>$e.map(Je)),xt.sort((Je,Ct)=>{for(let ir of tt){let hr=t(ir[Je],ir[Ct]);if(hr)return hr}})):(st=$e.map(st),xt.sort((Je,Ct)=>t(st[Je],st[Ct]))),Y($e,xt)}return $e.sort(st)}function j($e,tt,st){return(tt.length===1?K(R($e,tt,st),(([xt,Je],[Ct,ir])=>t(Je,ir)||t(xt,Ct))):K(F($e,st),(([xt,Je],[Ct,ir])=>tt(Je,ir)||t(xt,Ct)))).map(([xt])=>xt)}var q=Array.prototype,J=q.slice;function U($e){return function(){return $e}}var V=Math.sqrt(50),X=Math.sqrt(10),H=Math.sqrt(2);function G($e,tt,st){var xt,Je=-1,Ct,ir,hr;if(tt=+tt,$e=+$e,st=+st,$e===tt&&st>0)return[$e];if((xt=tt<$e)&&(Ct=$e,$e=tt,tt=Ct),(hr=Q($e,tt,st))===0||!isFinite(hr))return[];if(hr>0){let Ur=Math.round($e/hr),si=Math.round(tt/hr);for(Ur*hr<$e&&++Ur,si*hr>tt&&--si,ir=new Array(Ct=si-Ur+1);++Jett&&--si,ir=new Array(Ct=si-Ur+1);++Je=0?(Ct>=V?10:Ct>=X?5:Ct>=H?2:1)*Math.pow(10,Je):-Math.pow(10,-Je)/(Ct>=V?10:Ct>=X?5:Ct>=H?2:1)}function te($e,tt,st){var xt=Math.abs(tt-$e)/Math.max(0,st),Je=Math.pow(10,Math.floor(Math.log(xt)/Math.LN10)),Ct=xt/Je;return Ct>=V?Je*=10:Ct>=X?Je*=5:Ct>=H&&(Je*=2),tt<$e?-Je:Je}function ce($e,tt,st){let xt;for(;;){let Je=Q($e,tt,st);if(Je===xt||Je===0||!isFinite(Je))return[$e,tt];Je>0?($e=Math.floor($e/Je)*Je,tt=Math.ceil(tt/Je)*Je):Je<0&&($e=Math.ceil($e*Je)/Je,tt=Math.floor(tt*Je)/Je),xt=Je}}function ge($e){return Math.ceil(Math.log(c($e))/Math.LN2)+1}function Ce(){var $e=D,tt=_,st=ge;function xt(Je){Array.isArray(Je)||(Je=Array.from(Je));var Ct,ir=Je.length,hr,Ur=new Array(ir);for(Ct=0;Ct=Lr)if(ca>=Lr&&tt===_){let Vn=Q(ei,Lr,dn);isFinite(Vn)&&(Vn>0?Lr=(Math.floor(Lr/Vn)+1)*Vn:Vn<0&&(Lr=(Math.ceil(Lr*-Vn)+1)/-Vn))}else $i.pop()}for(var Tn=$i.length;$i[0]<=ei;)$i.shift(),--Tn;for(;$i[Tn-1]>Lr;)$i.pop(),--Tn;var hn=new Array(Tn+1),ta;for(Ct=0;Ct<=Tn;++Ct)ta=hn[Ct]=[],ta.x0=Ct>0?$i[Ct-1]:ei,ta.x1=Ct=xt)&&(st=xt);else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(st=Je)&&(st=Je)}return st}function he($e,tt){let st;if(tt===void 0)for(let xt of $e)xt!=null&&(st>xt||st===void 0&&xt>=xt)&&(st=xt);else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(st>Je||st===void 0&&Je>=Je)&&(st=Je)}return st}function oe($e,tt,st=0,xt=$e.length-1,Je=t){for(;xt>st;){if(xt-st>600){let Ur=xt-st+1,si=tt-st+1,ei=Math.log(Ur),Lr=.5*Math.exp(2*ei/3),$i=.5*Math.sqrt(ei*Lr*(Ur-Lr)/Ur)*(si-Ur/2<0?-1:1),Tn=Math.max(st,Math.floor(tt-si*Lr/Ur+$i)),hn=Math.min(xt,Math.floor(tt+(Ur-si)*Lr/Ur+$i));oe($e,tt,Tn,hn,Je)}let Ct=$e[tt],ir=st,hr=xt;for(Ee($e,st,tt),Je($e[xt],Ct)>0&&Ee($e,st,xt);ir0;)--hr}Je($e[st],Ct)===0?Ee($e,st,hr):(++hr,Ee($e,hr,xt)),hr<=tt&&(st=hr+1),tt<=hr&&(xt=hr-1)}return $e}function Ee($e,tt,st){let xt=$e[tt];$e[tt]=$e[st],$e[st]=xt}function ye($e,tt,st){if($e=Float64Array.from(a($e,st)),!!(xt=$e.length)){if((tt=+tt)<=0||xt<2)return he($e);if(tt>=1)return be($e);var xt,Je=(xt-1)*tt,Ct=Math.floor(Je),ir=be(oe($e,Ct).subarray(0,Ct+1)),hr=he($e.subarray(Ct+1));return ir+(hr-ir)*(Je-Ct)}}function ue($e,tt,st=n){if(xt=$e.length){if((tt=+tt)<=0||xt<2)return+st($e[0],0,$e);if(tt>=1)return+st($e[xt-1],xt-1,$e);var xt,Je=(xt-1)*tt,Ct=Math.floor(Je),ir=+st($e[Ct],Ct,$e),hr=+st($e[Ct+1],Ct+1,$e);return ir+(hr-ir)*(Je-Ct)}}function ee($e,tt,st){return Math.ceil((st-tt)/(2*(ye($e,.75)-ye($e,.25))*Math.pow(c($e),-1/3)))}function ae($e,tt,st){return Math.ceil((st-tt)/(3.5*b($e)*Math.pow(c($e),-1/3)))}function xe($e,tt){let st,xt=-1,Je=-1;if(tt===void 0)for(let Ct of $e)++Je,Ct!=null&&(st=Ct)&&(st=Ct,xt=Je);else for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(st=Ct)&&(st=Ct,xt=Je);return xt}function re($e,tt){let st=0,xt=0;if(tt===void 0)for(let Je of $e)Je!=null&&(Je=+Je)>=Je&&(++st,xt+=Je);else{let Je=-1;for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(Ct=+Ct)>=Ct&&(++st,xt+=Ct)}if(st)return xt/st}function pe($e,tt){return ye($e,.5,tt)}function*we($e){for(let tt of $e)yield*jse(tt)}function Fe($e){return Array.from(we($e))}function Se($e,tt){let st,xt=-1,Je=-1;if(tt===void 0)for(let Ct of $e)++Je,Ct!=null&&(st>Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);else for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(st>Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);return xt}function ke($e,tt=_e){let st=[],xt,Je=!1;for(let Ct of $e)Je&&st.push(tt(xt,Ct)),xt=Ct,Je=!0;return st}function _e($e,tt){return[$e,tt]}function Ie($e,tt,st){$e=+$e,tt=+tt,st=(Je=arguments.length)<2?(tt=$e,$e=0,1):Je<3?1:+st;for(var xt=-1,Je=Math.max(0,Math.ceil((tt-$e)/st))|0,Ct=new Array(Je);++xt0:t(ir,ir)===0)&&(st=Ct,Je=ir,xt=!0)}}else for(let Je of $e)(xt?tt(Je,st)>0:tt(Je,Je)===0)&&(st=Je,xt=!0);return st}function _t($e,tt=t){if(tt.length===1)return xe($e,tt);let st,xt=-1,Je=-1;for(let Ct of $e)++Je,(xt<0?tt(Ct,Ct)===0:tt(Ct,st)>0)&&(st=Ct,xt=Je);return xt}function ut($e,tt){let st=Qe($e,tt);return st<0?void 0:st}var vt=Xe(Math.random);function Xe($e){return function(st,xt=0,Je=st.length){let Ct=Je-(xt=+xt);for(;Ct;){let ir=$e()*Ct--|0,hr=st[Ct+xt];st[Ct+xt]=st[ir+xt],st[ir+xt]=hr}return st}}function mt($e,tt){let st=0;if(tt===void 0)for(let xt of $e)(xt=+xt)&&(st+=xt);else{let xt=-1;for(let Je of $e)(Je=+tt(Je,++xt,$e))&&(st+=Je)}return st}function bt($e){if(!(Ct=$e.length))return[];for(var tt=-1,st=he($e,Ne),xt=new Array(st);++tttt(st,xt,$e))}function ct($e,tt,st){if(typeof tt!="function")throw new TypeError("reducer is not a function");let xt=$e[Symbol.iterator](),Je,Ct,ir=-1;if(arguments.length<3){if({done:Je,value:st}=xt.next(),Je)return;++ir}for(;{done:Je,value:Ct}=xt.next(),!Je;)st=tt(st,Ct,++ir,$e);return st}function Tt($e){if(typeof $e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from($e).reverse()}function Xt($e,...tt){$e=new Set($e);for(let st of tt)for(let xt of st)$e.delete(xt);return $e}function Vt($e,tt){let st=tt[Symbol.iterator](),xt=new Set;for(let Je of $e){if(xt.has(Je))return!1;let Ct,ir;for(;({value:Ct,done:ir}=st.next())&&!ir;){if(Object.is(Je,Ct))return!1;xt.add(Ct)}}return!0}function lr($e){return $e instanceof Set?$e:new Set($e)}function ur($e,...tt){$e=new Set($e),tt=tt.map(lr);e:for(let st of $e)for(let xt of tt)if(!xt.has(st)){$e.delete(st);continue e}return $e}function Bt($e,tt){let st=$e[Symbol.iterator](),xt=new Set;for(let Je of tt){if(xt.has(Je))continue;let Ct,ir;for(;{value:Ct,done:ir}=st.next();){if(ir)return!1;if(xt.add(Ct),Object.is(Je,Ct))break}}return!0}function Zt($e,tt){return Bt(tt,$e)}function kr(...$e){let tt=new Set;for(let st of $e)for(let xt of st)tt.add(xt);return tt}e.Adder=M,e.InternMap=A,e.InternSet=y,e.ascending=t,e.bin=Ce,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=v,e.cumsum=m,e.descending=g,e.deviation=b,e.difference=Xt,e.disjoint=Vt,e.every=Ge,e.extent=_,e.fcumsum=T,e.filter=Re,e.fsum=x,e.greatest=et,e.greatestIndex=_t,e.group=F,e.groupSort=j,e.groups=P,e.histogram=Ce,e.index=I,e.indexes=B,e.intersection=ur,e.least=Oe,e.leastIndex=Qe,e.map=Ve,e.max=be,e.maxIndex=xe,e.mean=re,e.median=pe,e.merge=Fe,e.min=he,e.minIndex=Se,e.nice=ce,e.pairs=ke,e.permute=Y,e.quantile=ye,e.quantileSorted=ue,e.quickselect=oe,e.range=Ie,e.reduce=ct,e.reverse=Tt,e.rollup=R,e.rollups=L,e.scan=ut,e.shuffle=vt,e.shuffler=Xe,e.some=je,e.sort=K,e.subset=Zt,e.sum=mt,e.superset=Bt,e.thresholdFreedmanDiaconis=ee,e.thresholdScott=ae,e.thresholdSturges=ge,e.tickIncrement=Q,e.tickStep=te,e.ticks=G,e.transpose=bt,e.union=kr,e.variance=w,e.zip=Ue,Object.defineProperty(e,"__esModule",{value:!0})}))});var Tut=W(($q,wut)=>{(function(e,t){typeof $q=="object"&&typeof wut!="undefined"?t($q):(e=e||self,t(e.d3=e.d3||{}))})($q,function(e){"use strict";var t=Math.PI,r=2*t,i=1e-6,n=r-i;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,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,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,p=u-s,v=c-l,m=h-s,g=d-l,w=m*m+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(w>i)if(!(Math.abs(g*p-v*m)>i)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var b=u-h,_=c-d,M=p*p+v*v,x=b*b+_*_,T=Math.sqrt(M),A=Math.sqrt(w),y=f*Math.tan((t-Math.acos((M+w-x)/(2*T*A)))/2),E=y/A,S=y/T;Math.abs(E-1)>i&&(this._+="L"+(s+E*m)+","+(l+E*g)),this._+="A"+f+","+f+",0,0,"+ +(g*b>m*_)+","+(this._x1=s+S*p)+","+(this._y1=l+S*v)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),p=u*Math.sin(c),v=s+d,m=l+p,g=1^h,w=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+v+","+m:(Math.abs(this._x1-v)>i||Math.abs(this._y1-m)>i)&&(this._+="L"+v+","+m),u&&(w<0&&(w=w%r+r),w>n?this._+="A"+u+","+u+",0,1,"+g+","+(s-d)+","+(l-p)+"A"+u+","+u+",0,1,"+g+","+(this._x1=v)+","+(this._y1=m):w>i&&(this._+="A"+u+","+u+",0,"+ +(w>=t)+","+g+","+(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 eoe=W((Wq,Aut)=>{(function(e,t){typeof Wq=="object"&&typeof Aut!="undefined"?t(Wq,Tut()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Wq,function(e,t){"use strict";function r(Le){return function(){return Le}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function p(Le){return Le>1?0:Le<-1?f:Math.acos(Le)}function v(Le){return Le>=1?h:Le<=-1?-h:Math.asin(Le)}function m(Le){return Le.innerRadius}function g(Le){return Le.outerRadius}function w(Le){return Le.startAngle}function b(Le){return Le.endAngle}function _(Le){return Le&&Le.padAngle}function M(Le,ot,lt,kt,Jt,Rt,Tr,Wt){var br=lt-Le,Xr=kt-ot,ti=Tr-Jt,Mi=Wt-Rt,an=Mi*br-ti*Xr;if(!(an*anvs*vs+Zs*Zs&&(is=Uo,Ro=so),{cx:is,cy:Ro,x01:-ti,y01:-Mi,x11:is*(Jt/ps-1),y11:Ro*(Jt/ps-1)}}function T(){var Le=m,ot=g,lt=r(0),kt=null,Jt=w,Rt=b,Tr=_,Wt=null;function br(){var Xr,ti,Mi=+Le.apply(this,arguments),an=+ot.apply(this,arguments),Gn=Jt.apply(this,arguments)-h,yn=Rt.apply(this,arguments)-h,fa=i(yn-Gn),Wn=yn>Gn;if(Wt||(Wt=Xr=t.path()),anc))Wt.moveTo(0,0);else if(fa>d-c)Wt.moveTo(an*a(Gn),an*l(Gn)),Wt.arc(0,0,an,Gn,yn,!Wn),Mi>c&&(Wt.moveTo(Mi*a(yn),Mi*l(yn)),Wt.arc(0,0,Mi,yn,Gn,Wn));else{var Ja=Gn,oo=yn,Ao=Gn,Io=yn,ps=fa,rs=fa,Mo=Tr.apply(this,arguments)/2,is=Mo>c&&(kt?+kt.apply(this,arguments):u(Mi*Mi+an*an)),Ro=s(i(an-Mi)/2,+lt.apply(this,arguments)),Uo=Ro,so=Ro,In,va;if(is>c){var vs=v(is/Mi*l(Mo)),Zs=v(is/an*l(Mo));(ps-=vs*2)>c?(vs*=Wn?1:-1,Ao+=vs,Io-=vs):(ps=0,Ao=Io=(Gn+yn)/2),(rs-=Zs*2)>c?(Zs*=Wn?1:-1,Ja+=Zs,oo-=Zs):(rs=0,Ja=oo=(Gn+yn)/2)}var Ks=an*a(Ja),Ol=an*l(Ja),Js=Mi*a(Io),ru=Mi*l(Io);if(Ro>c){var xu=an*a(oo),_u=an*l(oo),dc=Mi*a(Ao),Nl=Mi*l(Ao),ja;if(fac?so>c?(In=x(dc,Nl,Ks,Ol,an,so,Wn),va=x(xu,_u,Js,ru,an,so,Wn),Wt.moveTo(In.cx+In.x01,In.cy+In.y01),soc)||!(ps>c)?Wt.lineTo(Js,ru):Uo>c?(In=x(Js,ru,xu,_u,Mi,-Uo,Wn),va=x(Ks,Ol,dc,Nl,Mi,-Uo,Wn),Wt.lineTo(In.cx+In.x01,In.cy+In.y01),Uo=an;--Gn)Wt.point(oo[Gn],Ao[Gn]);Wt.lineEnd(),Wt.areaEnd()}Wn&&(oo[Mi]=+Le(fa,Mi,ti),Ao[Mi]=+lt(fa,Mi,ti),Wt.point(ot?+ot(fa,Mi,ti):oo[Mi],kt?+kt(fa,Mi,ti):Ao[Mi]))}if(Ja)return Wt=null,Ja+""||null}function Xr(){return C().defined(Jt).curve(Tr).context(Rt)}return br.x=function(ti){return arguments.length?(Le=typeof ti=="function"?ti:r(+ti),ot=null,br):Le},br.x0=function(ti){return arguments.length?(Le=typeof ti=="function"?ti:r(+ti),br):Le},br.x1=function(ti){return arguments.length?(ot=ti==null?null:typeof ti=="function"?ti:r(+ti),br):ot},br.y=function(ti){return arguments.length?(lt=typeof ti=="function"?ti:r(+ti),kt=null,br):lt},br.y0=function(ti){return arguments.length?(lt=typeof ti=="function"?ti:r(+ti),br):lt},br.y1=function(ti){return arguments.length?(kt=ti==null?null:typeof ti=="function"?ti:r(+ti),br):kt},br.lineX0=br.lineY0=function(){return Xr().x(Le).y(lt)},br.lineY1=function(){return Xr().x(Le).y(kt)},br.lineX1=function(){return Xr().x(ot).y(lt)},br.defined=function(ti){return arguments.length?(Jt=typeof ti=="function"?ti:r(!!ti),br):Jt},br.curve=function(ti){return arguments.length?(Tr=ti,Rt!=null&&(Wt=Tr(Rt)),br):Tr},br.context=function(ti){return arguments.length?(ti==null?Rt=Wt=null:Wt=Tr(Rt=ti),br):Rt},br}function D(Le,ot){return otLe?1:ot>=Le?0:NaN}function F(Le){return Le}function P(){var Le=F,ot=D,lt=null,kt=r(0),Jt=r(d),Rt=r(0);function Tr(Wt){var br,Xr=Wt.length,ti,Mi,an=0,Gn=new Array(Xr),yn=new Array(Xr),fa=+kt.apply(this,arguments),Wn=Math.min(d,Math.max(-d,Jt.apply(this,arguments)-fa)),Ja,oo=Math.min(Math.abs(Wn)/Xr,Rt.apply(this,arguments)),Ao=oo*(Wn<0?-1:1),Io;for(br=0;br0&&(an+=Io);for(ot!=null?Gn.sort(function(ps,rs){return ot(yn[ps],yn[rs])}):lt!=null&&Gn.sort(function(ps,rs){return lt(Wt[ps],Wt[rs])}),br=0,Mi=an?(Wn-Xr*Ao)/an:0;br0?Io*Mi:0)+Ao,yn[ti]={data:Wt[ti],index:br,value:Io,startAngle:fa,endAngle:Ja,padAngle:oo};return yn}return Tr.value=function(Wt){return arguments.length?(Le=typeof Wt=="function"?Wt:r(+Wt),Tr):Le},Tr.sortValues=function(Wt){return arguments.length?(ot=Wt,lt=null,Tr):ot},Tr.sort=function(Wt){return arguments.length?(lt=Wt,ot=null,Tr):lt},Tr.startAngle=function(Wt){return arguments.length?(kt=typeof Wt=="function"?Wt:r(+Wt),Tr):kt},Tr.endAngle=function(Wt){return arguments.length?(Jt=typeof Wt=="function"?Wt:r(+Wt),Tr):Jt},Tr.padAngle=function(Wt){return arguments.length?(Rt=typeof Wt=="function"?Wt:r(+Wt),Tr):Rt},Tr}var R=I(y);function L(Le){this._curve=Le}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Le,ot){this._curve.point(ot*Math.sin(Le),ot*-Math.cos(Le))}};function I(Le){function ot(lt){return new L(Le(lt))}return ot._curve=Le,ot}function B(Le){var ot=Le.curve;return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le.curve=function(lt){return arguments.length?ot(I(lt)):ot()._curve},Le}function O(){return B(C().curve(R))}function $(){var Le=k().curve(R),ot=Le.curve,lt=Le.lineX0,kt=Le.lineX1,Jt=Le.lineY0,Rt=Le.lineY1;return Le.angle=Le.x,delete Le.x,Le.startAngle=Le.x0,delete Le.x0,Le.endAngle=Le.x1,delete Le.x1,Le.radius=Le.y,delete Le.y,Le.innerRadius=Le.y0,delete Le.y0,Le.outerRadius=Le.y1,delete Le.y1,Le.lineStartAngle=function(){return B(lt())},delete Le.lineX0,Le.lineEndAngle=function(){return B(kt())},delete Le.lineX1,Le.lineInnerRadius=function(){return B(Jt())},delete Le.lineY0,Le.lineOuterRadius=function(){return B(Rt())},delete Le.lineY1,Le.curve=function(Tr){return arguments.length?ot(I(Tr)):ot()._curve},Le}function Y(Le,ot){return[(ot=+ot)*Math.cos(Le-=Math.PI/2),ot*Math.sin(Le)]}var K=Array.prototype.slice;function j(Le){return Le.source}function q(Le){return Le.target}function J(Le){var ot=j,lt=q,kt=E,Jt=S,Rt=null;function Tr(){var Wt,br=K.call(arguments),Xr=ot.apply(this,br),ti=lt.apply(this,br);if(Rt||(Rt=Wt=t.path()),Le(Rt,+kt.apply(this,(br[0]=Xr,br)),+Jt.apply(this,br),+kt.apply(this,(br[0]=ti,br)),+Jt.apply(this,br)),Wt)return Rt=null,Wt+""||null}return Tr.source=function(Wt){return arguments.length?(ot=Wt,Tr):ot},Tr.target=function(Wt){return arguments.length?(lt=Wt,Tr):lt},Tr.x=function(Wt){return arguments.length?(kt=typeof Wt=="function"?Wt:r(+Wt),Tr):kt},Tr.y=function(Wt){return arguments.length?(Jt=typeof Wt=="function"?Wt:r(+Wt),Tr):Jt},Tr.context=function(Wt){return arguments.length?(Rt=Wt==null?null:Wt,Tr):Rt},Tr}function U(Le,ot,lt,kt,Jt){Le.moveTo(ot,lt),Le.bezierCurveTo(ot=(ot+kt)/2,lt,ot,Jt,kt,Jt)}function V(Le,ot,lt,kt,Jt){Le.moveTo(ot,lt),Le.bezierCurveTo(ot,lt=(lt+Jt)/2,kt,lt,kt,Jt)}function X(Le,ot,lt,kt,Jt){var Rt=Y(ot,lt),Tr=Y(ot,lt=(lt+Jt)/2),Wt=Y(kt,lt),br=Y(kt,Jt);Le.moveTo(Rt[0],Rt[1]),Le.bezierCurveTo(Tr[0],Tr[1],Wt[0],Wt[1],br[0],br[1])}function H(){return J(U)}function G(){return J(V)}function Q(){var Le=J(X);return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le}var te={draw:function(Le,ot){var lt=Math.sqrt(ot/f);Le.moveTo(lt,0),Le.arc(0,0,lt,0,d)}},ce={draw:function(Le,ot){var lt=Math.sqrt(ot/5)/2;Le.moveTo(-3*lt,-lt),Le.lineTo(-lt,-lt),Le.lineTo(-lt,-3*lt),Le.lineTo(lt,-3*lt),Le.lineTo(lt,-lt),Le.lineTo(3*lt,-lt),Le.lineTo(3*lt,lt),Le.lineTo(lt,lt),Le.lineTo(lt,3*lt),Le.lineTo(-lt,3*lt),Le.lineTo(-lt,lt),Le.lineTo(-3*lt,lt),Le.closePath()}},ge=Math.sqrt(1/3),Ce=ge*2,be={draw:function(Le,ot){var lt=Math.sqrt(ot/Ce),kt=lt*ge;Le.moveTo(0,-lt),Le.lineTo(kt,0),Le.lineTo(0,lt),Le.lineTo(-kt,0),Le.closePath()}},he=.8908130915292852,oe=Math.sin(f/10)/Math.sin(7*f/10),Ee=Math.sin(d/10)*oe,ye=-Math.cos(d/10)*oe,ue={draw:function(Le,ot){var lt=Math.sqrt(ot*he),kt=Ee*lt,Jt=ye*lt;Le.moveTo(0,-lt),Le.lineTo(kt,Jt);for(var Rt=1;Rt<5;++Rt){var Tr=d*Rt/5,Wt=Math.cos(Tr),br=Math.sin(Tr);Le.lineTo(br*lt,-Wt*lt),Le.lineTo(Wt*kt-br*Jt,br*kt+Wt*Jt)}Le.closePath()}},ee={draw:function(Le,ot){var lt=Math.sqrt(ot),kt=-lt/2;Le.rect(kt,kt,lt,lt)}},ae=Math.sqrt(3),xe={draw:function(Le,ot){var lt=-Math.sqrt(ot/(ae*3));Le.moveTo(0,lt*2),Le.lineTo(-ae*lt,-lt),Le.lineTo(ae*lt,-lt),Le.closePath()}},re=-.5,pe=Math.sqrt(3)/2,we=1/Math.sqrt(12),Fe=(we/2+1)*3,Se={draw:function(Le,ot){var lt=Math.sqrt(ot/Fe),kt=lt/2,Jt=lt*we,Rt=kt,Tr=lt*we+lt,Wt=-Rt,br=Tr;Le.moveTo(kt,Jt),Le.lineTo(Rt,Tr),Le.lineTo(Wt,br),Le.lineTo(re*kt-pe*Jt,pe*kt+re*Jt),Le.lineTo(re*Rt-pe*Tr,pe*Rt+re*Tr),Le.lineTo(re*Wt-pe*br,pe*Wt+re*br),Le.lineTo(re*kt+pe*Jt,re*Jt-pe*kt),Le.lineTo(re*Rt+pe*Tr,re*Tr-pe*Rt),Le.lineTo(re*Wt+pe*br,re*br-pe*Wt),Le.closePath()}},ke=[te,ce,be,ee,ue,xe,Se];function _e(){var Le=r(te),ot=r(64),lt=null;function kt(){var Jt;if(lt||(lt=Jt=t.path()),Le.apply(this,arguments).draw(lt,+ot.apply(this,arguments)),Jt)return lt=null,Jt+""||null}return kt.type=function(Jt){return arguments.length?(Le=typeof Jt=="function"?Jt:r(Jt),kt):Le},kt.size=function(Jt){return arguments.length?(ot=typeof Jt=="function"?Jt:r(+Jt),kt):ot},kt.context=function(Jt){return arguments.length?(lt=Jt==null?null:Jt,kt):lt},kt}function Ie(){}function Oe(Le,ot,lt){Le._context.bezierCurveTo((2*Le._x0+Le._x1)/3,(2*Le._y0+Le._y1)/3,(Le._x0+2*Le._x1)/3,(Le._y0+2*Le._y1)/3,(Le._x0+4*Le._x1+ot)/6,(Le._y0+4*Le._y1+lt)/6)}function Qe(Le){this._context=Le}Qe.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:Oe(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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);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:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function et(Le){return new Qe(Le)}function _t(Le){this._context=Le}_t.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._x2=Le,this._y2=ot;break;case 1:this._point=2,this._x3=Le,this._y3=ot;break;case 2:this._point=3,this._x4=Le,this._y4=ot,this._context.moveTo((this._x0+4*this._x1+Le)/6,(this._y0+4*this._y1+ot)/6);break;default:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function ut(Le){return new _t(Le)}function vt(Le){this._context=Le}vt.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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var lt=(this._x0+4*this._x1+Le)/6,kt=(this._y0+4*this._y1+ot)/6;this._line?this._context.lineTo(lt,kt):this._context.moveTo(lt,kt);break;case 3:this._point=4;default:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function Xe(Le){return new vt(Le)}function mt(Le,ot){this._basis=new Qe(Le),this._beta=ot}mt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Le=this._x,ot=this._y,lt=Le.length-1;if(lt>0)for(var kt=Le[0],Jt=ot[0],Rt=Le[lt]-kt,Tr=ot[lt]-Jt,Wt=-1,br;++Wt<=lt;)br=Wt/lt,this._basis.point(this._beta*Le[Wt]+(1-this._beta)*(kt+br*Rt),this._beta*ot[Wt]+(1-this._beta)*(Jt+br*Tr));this._x=this._y=null,this._basis.lineEnd()},point:function(Le,ot){this._x.push(+Le),this._y.push(+ot)}};var bt=(function Le(ot){function lt(kt){return ot===1?new Qe(kt):new mt(kt,ot)}return lt.beta=function(kt){return Le(+kt)},lt})(.85);function Ne(Le,ot,lt){Le._context.bezierCurveTo(Le._x1+Le._k*(Le._x2-Le._x0),Le._y1+Le._k*(Le._y2-Le._y0),Le._x2+Le._k*(Le._x1-ot),Le._y2+Le._k*(Le._y1-lt),Le._x2,Le._y2)}function Ue(Le,ot){this._context=Le,this._k=(1-ot)/6}Ue.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:Ne(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2,this._x1=Le,this._y1=ot;break;case 2:this._point=3;default:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Ge=(function Le(ot){function lt(kt){return new Ue(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function je(Le,ot){this._context=Le,this._k=(1-ot)/6}je.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._x3=Le,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=ot);break;case 2:this._point=3,this._x5=Le,this._y5=ot;break;default:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Re=(function Le(ot){function lt(kt){return new je(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function Ve(Le,ot){this._context=Le,this._k=(1-ot)/6}Ve.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(Le,ot){switch(Le=+Le,ot=+ot,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:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var ct=(function Le(ot){function lt(kt){return new Ve(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function Tt(Le,ot,lt){var kt=Le._x1,Jt=Le._y1,Rt=Le._x2,Tr=Le._y2;if(Le._l01_a>c){var Wt=2*Le._l01_2a+3*Le._l01_a*Le._l12_a+Le._l12_2a,br=3*Le._l01_a*(Le._l01_a+Le._l12_a);kt=(kt*Wt-Le._x0*Le._l12_2a+Le._x2*Le._l01_2a)/br,Jt=(Jt*Wt-Le._y0*Le._l12_2a+Le._y2*Le._l01_2a)/br}if(Le._l23_a>c){var Xr=2*Le._l23_2a+3*Le._l23_a*Le._l12_a+Le._l12_2a,ti=3*Le._l23_a*(Le._l23_a+Le._l12_a);Rt=(Rt*Xr+Le._x1*Le._l23_2a-ot*Le._l12_2a)/ti,Tr=(Tr*Xr+Le._y1*Le._l23_2a-lt*Le._l12_2a)/ti}Le._context.bezierCurveTo(kt,Jt,Rt,Tr,Le._x2,Le._y2)}function Xt(Le,ot){this._context=Le,this._alpha=ot}Xt.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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;break;case 2:this._point=3;default:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Vt=(function Le(ot){function lt(kt){return ot?new Xt(kt,ot):new Ue(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function lr(Le,ot){this._context=Le,this._alpha=ot}lr.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Le,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=ot);break;case 2:this._point=3,this._x5=Le,this._y5=ot;break;default:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var ur=(function Le(ot){function lt(kt){return ot?new lr(kt,ot):new je(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function Bt(Le,ot){this._context=Le,this._alpha=ot}Bt.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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,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:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Zt=(function Le(ot){function lt(kt){return ot?new Bt(kt,ot):new Ve(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function kr(Le){this._context=Le}kr.prototype={areaStart:Ie,areaEnd:Ie,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Le,ot){Le=+Le,ot=+ot,this._point?this._context.lineTo(Le,ot):(this._point=1,this._context.moveTo(Le,ot))}};function $e(Le){return new kr(Le)}function tt(Le){return Le<0?-1:1}function st(Le,ot,lt){var kt=Le._x1-Le._x0,Jt=ot-Le._x1,Rt=(Le._y1-Le._y0)/(kt||Jt<0&&-0),Tr=(lt-Le._y1)/(Jt||kt<0&&-0),Wt=(Rt*Jt+Tr*kt)/(kt+Jt);return(tt(Rt)+tt(Tr))*Math.min(Math.abs(Rt),Math.abs(Tr),.5*Math.abs(Wt))||0}function xt(Le,ot){var lt=Le._x1-Le._x0;return lt?(3*(Le._y1-Le._y0)/lt-ot)/2:ot}function Je(Le,ot,lt){var kt=Le._x0,Jt=Le._y0,Rt=Le._x1,Tr=Le._y1,Wt=(Rt-kt)/3;Le._context.bezierCurveTo(kt+Wt,Jt+Wt*ot,Rt-Wt,Tr-Wt*lt,Rt,Tr)}function Ct(Le){this._context=Le}Ct.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:Je(this,this._t0,xt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,ot){var lt=NaN;if(Le=+Le,ot=+ot,!(Le===this._x1&&ot===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;break;case 2:this._point=3,Je(this,xt(this,lt=st(this,Le,ot)),lt);break;default:Je(this,this._t0,lt=st(this,Le,ot));break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot,this._t0=lt}}};function ir(Le){this._context=new hr(Le)}(ir.prototype=Object.create(Ct.prototype)).point=function(Le,ot){Ct.prototype.point.call(this,ot,Le)};function hr(Le){this._context=Le}hr.prototype={moveTo:function(Le,ot){this._context.moveTo(ot,Le)},closePath:function(){this._context.closePath()},lineTo:function(Le,ot){this._context.lineTo(ot,Le)},bezierCurveTo:function(Le,ot,lt,kt,Jt,Rt){this._context.bezierCurveTo(ot,Le,kt,lt,Rt,Jt)}};function Ur(Le){return new Ct(Le)}function si(Le){return new ir(Le)}function ei(Le){this._context=Le}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Le=this._x,ot=this._y,lt=Le.length;if(lt)if(this._line?this._context.lineTo(Le[0],ot[0]):this._context.moveTo(Le[0],ot[0]),lt===2)this._context.lineTo(Le[1],ot[1]);else for(var kt=Lr(Le),Jt=Lr(ot),Rt=0,Tr=1;Tr=0;--ot)Jt[ot]=(Tr[ot]-Jt[ot+1])/Rt[ot];for(Rt[lt-1]=(Le[lt]+Jt[lt-1])/2,ot=0;ot=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,ot),this._context.lineTo(Le,ot);else{var lt=this._x*(1-this._t)+Le*this._t;this._context.lineTo(lt,this._y),this._context.lineTo(lt,ot)}break}}this._x=Le,this._y=ot}};function hn(Le){return new Tn(Le,.5)}function ta(Le){return new Tn(Le,0)}function ca(Le){return new Tn(Le,1)}function dn(Le,ot){if((Tr=Le.length)>1)for(var lt=1,kt,Jt,Rt=Le[ot[0]],Tr,Wt=Rt.length;lt=0;)lt[ot]=ot;return lt}function ra(Le,ot){return Le[ot]}function ds(){var Le=r([]),ot=Vn,lt=dn,kt=ra;function Jt(Rt){var Tr=Le.apply(this,arguments),Wt,br=Rt.length,Xr=Tr.length,ti=new Array(Xr),Mi;for(Wt=0;Wt0){for(var lt,kt,Jt=0,Rt=Le[0].length,Tr;Jt0)for(var lt,kt=0,Jt,Rt,Tr,Wt,br,Xr=Le[ot[0]].length;kt0?(Jt[0]=Tr,Jt[1]=Tr+=Rt):Rt<0?(Jt[1]=Wt,Jt[0]=Wt+=Rt):(Jt[0]=0,Jt[1]=Rt)}function ho(Le,ot){if((Jt=Le.length)>0){for(var lt=0,kt=Le[ot[0]],Jt,Rt=kt.length;lt0)||!((Rt=(Jt=Le[ot[0]]).length)>0))){for(var lt=0,kt=1,Jt,Rt,Tr;ktRt&&(Rt=Jt,lt=ot);return lt}function _a(Le){var ot=Le.map(Xs);return Vn(Le).sort(function(lt,kt){return ot[lt]-ot[kt]})}function Xs(Le){for(var ot=0,lt=-1,kt=Le.length,Jt;++lt{(function(e,t){typeof Yq=="object"&&typeof Mut!="undefined"?t(Yq,but(),eoe()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(Yq,function(e,t,r){"use strict";function i(x){return x.target.depth}function n(x){return x.depth}function a(x,T){return T-1-x.height}function o(x,T){return x.sourceLinks.length?x.depth:T-1}function s(x){return x.targetLinks.length?x.depth:x.sourceLinks.length?t.min(x.sourceLinks,i)-1:0}function l(x){return function(){return x}}function u(x,T){return f(x.source,T.source)||x.index-T.index}function c(x,T){return f(x.target,T.target)||x.index-T.index}function f(x,T){return x.y0-T.y0}function h(x){return x.value}function d(x){return x.index}function p(x){return x.nodes}function v(x){return x.links}function m(x,T){let A=x.get(T);if(!A)throw new Error("missing: "+T);return A}function g({nodes:x}){for(let T of x){let A=T.y0,y=A;for(let E of T.sourceLinks)E.y0=A+E.width/2,A+=E.width;for(let E of T.targetLinks)E.y1=y+E.width/2,y+=E.width}}function w(){let x=0,T=0,A=1,y=1,E=24,S=8,C,k=d,D=o,F,P,R=p,L=v,I=6,B=2/3;function O(){let be={nodes:R.apply(null,arguments),links:L.apply(null,arguments)};return $(be),Y(be),K(be),j(be),U(be),g(be),be}O.update=function(be){return g(be),be},O.nodeId=function(be){return arguments.length?(k=typeof be=="function"?be:l(be),O):k},O.nodeAlign=function(be){return arguments.length?(D=typeof be=="function"?be:l(be),O):D},O.nodeSort=function(be){return arguments.length?(F=be,O):F},O.nodeWidth=function(be){return arguments.length?(E=+be,O):E},O.nodePadding=function(be){return arguments.length?(S=C=+be,O):S},O.nodes=function(be){return arguments.length?(R=typeof be=="function"?be:l(be),O):R},O.links=function(be){return arguments.length?(L=typeof be=="function"?be:l(be),O):L},O.linkSort=function(be){return arguments.length?(P=be,O):P},O.size=function(be){return arguments.length?(x=T=0,A=+be[0],y=+be[1],O):[A-x,y-T]},O.extent=function(be){return arguments.length?(x=+be[0][0],A=+be[1][0],T=+be[0][1],y=+be[1][1],O):[[x,T],[A,y]]},O.iterations=function(be){return arguments.length?(I=+be,O):I};function $({nodes:be,links:he}){for(let[Ee,ye]of be.entries())ye.index=Ee,ye.sourceLinks=[],ye.targetLinks=[];let oe=new Map(be.map((Ee,ye)=>[k(Ee,ye,be),Ee]));for(let[Ee,ye]of he.entries()){ye.index=Ee;let{source:ue,target:ee}=ye;typeof ue!="object"&&(ue=ye.source=m(oe,ue)),typeof ee!="object"&&(ee=ye.target=m(oe,ee)),ue.sourceLinks.push(ye),ee.targetLinks.push(ye)}if(P!=null)for(let{sourceLinks:Ee,targetLinks:ye}of be)Ee.sort(P),ye.sort(P)}function Y({nodes:be}){for(let he of be)he.value=he.fixedValue===void 0?Math.max(t.sum(he.sourceLinks,h),t.sum(he.targetLinks,h)):he.fixedValue}function K({nodes:be}){let he=be.length,oe=new Set(be),Ee=new Set,ye=0;for(;oe.size;){for(let ue of oe){ue.depth=ye;for(let{target:ee}of ue.sourceLinks)Ee.add(ee)}if(++ye>he)throw new Error("circular link");oe=Ee,Ee=new Set}}function j({nodes:be}){let he=be.length,oe=new Set(be),Ee=new Set,ye=0;for(;oe.size;){for(let ue of oe){ue.height=ye;for(let{source:ee}of ue.targetLinks)Ee.add(ee)}if(++ye>he)throw new Error("circular link");oe=Ee,Ee=new Set}}function q({nodes:be}){let he=t.max(be,ye=>ye.depth)+1,oe=(A-x-E)/(he-1),Ee=new Array(he);for(let ye of be){let ue=Math.max(0,Math.min(he-1,Math.floor(D.call(null,ye,he))));ye.layer=ue,ye.x0=x+ue*oe,ye.x1=ye.x0+E,Ee[ue]?Ee[ue].push(ye):Ee[ue]=[ye]}if(F)for(let ye of Ee)ye.sort(F);return Ee}function J(be){let he=t.min(be,oe=>(y-T-(oe.length-1)*C)/t.sum(oe,h));for(let oe of be){let Ee=T;for(let ye of oe){ye.y0=Ee,ye.y1=Ee+ye.value*he,Ee=ye.y1+C;for(let ue of ye.sourceLinks)ue.width=ue.value*he}Ee=(y-Ee+C)/(oe.length+1);for(let ye=0;yeoe.length)-1)),J(he);for(let oe=0;oe0))continue;let re=(ae/xe-ee.y0)*he;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&ue.sort(f),H(ue,oe)}}function X(be,he,oe){for(let Ee=be.length,ye=Ee-2;ye>=0;--ye){let ue=be[ye];for(let ee of ue){let ae=0,xe=0;for(let{target:pe,value:we}of ee.sourceLinks){let Fe=we*(pe.layer-ee.layer);ae+=Ce(ee,pe)*Fe,xe+=Fe}if(!(xe>0))continue;let re=(ae/xe-ee.y0)*he;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&ue.sort(f),H(ue,oe)}}function H(be,he){let oe=be.length>>1,Ee=be[oe];Q(be,Ee.y0-C,oe-1,he),G(be,Ee.y1+C,oe+1,he),Q(be,y,be.length-1,he),G(be,T,0,he)}function G(be,he,oe,Ee){for(;oe1e-6&&(ye.y0+=ue,ye.y1+=ue),he=ye.y1+C}}function Q(be,he,oe,Ee){for(;oe>=0;--oe){let ye=be[oe],ue=(ye.y1-he)*Ee;ue>1e-6&&(ye.y0-=ue,ye.y1-=ue),he=ye.y0-C}}function te({sourceLinks:be,targetLinks:he}){if(P===void 0){for(let{source:{sourceLinks:oe}}of he)oe.sort(c);for(let{target:{targetLinks:oe}}of be)oe.sort(u)}}function ce(be){if(P===void 0)for(let{sourceLinks:he,targetLinks:oe}of be)he.sort(c),oe.sort(u)}function ge(be,he){let oe=be.y0-(be.sourceLinks.length-1)*C/2;for(let{target:Ee,width:ye}of be.sourceLinks){if(Ee===he)break;oe+=ye+C}for(let{source:Ee,width:ye}of he.targetLinks){if(Ee===be)break;oe-=ye}return oe}function Ce(be,he){let oe=he.y0-(he.targetLinks.length-1)*C/2;for(let{source:Ee,width:ye}of he.targetLinks){if(Ee===be)break;oe+=ye+C}for(let{target:Ee,width:ye}of be.sourceLinks){if(Ee===he)break;oe-=ye}return oe}return O}function b(x){return[x.source.x1,x.y0]}function _(x){return[x.target.x0,x.y1]}function M(){return r.linkHorizontal().source(b).target(_)}e.sankey=w,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=n,e.sankeyLinkHorizontal=M,e.sankeyRight=a,Object.defineProperty(e,"__esModule",{value:!0})})});var kut=W((Xq,Eut)=>{(function(e,t){t(typeof Xq=="object"&&typeof Eut!="undefined"?Xq:e.d3=e.d3||{})})(Xq,(function(e){"use strict";function t(U,V){return UV?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);XU?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H=G)for(Q=te=G;++HG&&(Q=G),te=G)for(Q=te=G;++HG&&(Q=G),te0)return[U];if((H=V0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),Vhe;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HQ&&(Q=G)}else for(;++H=G)for(Q=G;++HQ&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H=G)for(Q=G;++HG&&(Q=G)}else for(;++H=G)for(Q=G;++HG&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H{var MAr=Jae();Cut.exports=function(t,r){var i=[],n=[],a=[],o={},s=[],l;function u(b){a[b]=!1,o.hasOwnProperty(b)&&Object.keys(o[b]).forEach(function(_){delete o[b][_],a[_]&&u(_)})}function c(b){var _=!1;n.push(b),a[b]=!0;var M,x;for(M=0;M=b})}function d(b){h(b);for(var _=t,M=MAr(_),x=M.components.filter(function(k){return k.length>1}),T=1/0,A,y=0;y{(function(e,t){typeof Zq=="object"&&typeof Fut!="undefined"?t(Zq,kut(),Qae(),eoe(),Dut()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(Zq,(function(e,t,r,i,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function a(he){return he.target.depth}function o(he){return he.depth}function s(he,oe){return oe-1-he.height}function l(he,oe){return he.sourceLinks.length?he.depth:oe-1}function u(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?t.min(he.sourceLinks,a)-1:0}function c(he){return function(){return he}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function h(he,oe){return p(he.source,oe.source)||he.index-oe.index}function d(he,oe){return p(he.target,oe.target)||he.index-oe.index}function p(he,oe){return he.partOfCycle===oe.partOfCycle?he.y0-oe.y0:he.circularLinkType==="top"||oe.circularLinkType==="bottom"?-1:1}function v(he){return he.value}function m(he){return(he.y0+he.y1)/2}function g(he){return m(he.source)}function w(he){return m(he.target)}function b(he){return he.index}function _(he){return he.nodes}function M(he){return he.links}function x(he,oe){var Ee=he.get(oe);if(!Ee)throw new Error("missing: "+oe);return Ee}function T(he,oe){return oe(he)}var A=25,y=10,E=.3;function S(){var he=0,oe=0,Ee=1,ye=1,ue=24,ee,ae=b,xe=l,re=_,pe=M,we=32,Fe=2,Se,ke=null;function _e(){var Xe={nodes:re.apply(null,arguments),links:pe.apply(null,arguments)};Ie(Xe),C(Xe,ae,ke),Oe(Xe),_t(Xe),k(Xe,ae),ut(Xe,we,ae),vt(Xe);for(var mt=4,bt=0;bt0?mt+A+y:mt,bt=bt>0?bt+A+y:bt,Ne=Ne>0?Ne+A+y:Ne,Ue=Ue>0?Ue+A+y:Ue,{top:mt,bottom:bt,left:Ue,right:Ne}}function et(Xe,mt){var bt=t.max(Xe.nodes,function(ct){return ct.column}),Ne=Ee-he,Ue=ye-oe,Ge=Ne+mt.right+mt.left,je=Ue+mt.top+mt.bottom,Re=Ne/Ge,Ve=Ue/je;return he=he*Re+mt.left,Ee=mt.right==0?Ee:Ee*Re,oe=oe*Ve+mt.top,ye=ye*Ve,Xe.nodes.forEach(function(ct){ct.x0=he+ct.column*((Ee-he-ue)/bt),ct.x1=ct.x0+ue}),Ve}function _t(Xe){var mt,bt,Ne;for(mt=Xe.nodes,bt=[],Ne=0;mt.length;++Ne,mt=bt,bt=[])mt.forEach(function(Ue){Ue.depth=Ne,Ue.sourceLinks.forEach(function(Ge){bt.indexOf(Ge.target)<0&&!Ge.circular&&bt.push(Ge.target)})});for(mt=Xe.nodes,bt=[],Ne=0;mt.length;++Ne,mt=bt,bt=[])mt.forEach(function(Ue){Ue.height=Ne,Ue.targetLinks.forEach(function(Ge){bt.indexOf(Ge.source)<0&&!Ge.circular&&bt.push(Ge.source)})});Xe.nodes.forEach(function(Ue){Ue.column=Math.floor(xe.call(null,Ue,Ne))})}function ut(Xe,mt,bt){var Ne=r.nest().key(function(ct){return ct.column}).sortKeys(t.ascending).entries(Xe.nodes).map(function(ct){return ct.values});je(bt),Ve();for(var Ue=1,Ge=mt;Ge>0;--Ge)Re(Ue*=.99,bt),Ve();function je(ct){if(Se){var Tt=1/0;Ne.forEach(function(ur){var Bt=ye*Se/(ur.length+1);Tt=Bt0))if(ur==0&&lr==1)Zt=Bt.y1-Bt.y0,Bt.y0=ye/2-Zt/2,Bt.y1=ye/2+Zt/2;else if(ur==Xt-1&&lr==1)Zt=Bt.y1-Bt.y0,Bt.y0=ye/2-Zt/2,Bt.y1=ye/2+Zt/2;else{var kr=0,$e=t.mean(Bt.sourceLinks,w),tt=t.mean(Bt.targetLinks,g);$e&&tt?kr=($e+tt)/2:kr=$e||tt;var st=(kr-m(Bt))*ct;Bt.y0+=st,Bt.y1+=st}})})}function Ve(){Ne.forEach(function(ct){var Tt,Xt,Vt=oe,lr=ct.length,ur;for(ct.sort(p),ur=0;ur0&&(Tt.y0+=Xt,Tt.y1+=Xt),Vt=Tt.y1+ee;if(Xt=Vt-ee-ye,Xt>0)for(Vt=Tt.y0-=Xt,Tt.y1-=Xt,ur=lr-2;ur>=0;--ur)Tt=ct[ur],Xt=Tt.y1+ee-Vt,Xt>0&&(Tt.y0-=Xt,Tt.y1-=Xt),Vt=Tt.y0})}}function vt(Xe){Xe.nodes.forEach(function(mt){mt.sourceLinks.sort(d),mt.targetLinks.sort(h)}),Xe.nodes.forEach(function(mt){var bt=mt.y0,Ne=bt,Ue=mt.y1,Ge=Ue;mt.sourceLinks.forEach(function(je){je.circular?(je.y0=Ue-je.width/2,Ue=Ue-je.width):(je.y0=bt+je.width/2,bt+=je.width)}),mt.targetLinks.forEach(function(je){je.circular?(je.y1=Ge-je.width/2,Ge=Ge-je.width):(je.y1=Ne+je.width/2,Ne+=je.width)})})}return _e}function C(he,oe,Ee){var ye=0;if(Ee===null){for(var ue=[],ee=0;eeoe.source.column)}function P(he,oe){var Ee=0;he.sourceLinks.forEach(function(ue){Ee=ue.circular&&!Ce(ue,oe)?Ee+1:Ee});var ye=0;return he.targetLinks.forEach(function(ue){ye=ue.circular&&!Ce(ue,oe)?ye+1:ye}),Ee+ye}function R(he){var oe=he.source.sourceLinks,Ee=0;oe.forEach(function(ee){Ee=ee.circular?Ee+1:Ee});var ye=he.target.targetLinks,ue=0;return ye.forEach(function(ee){ue=ee.circular?ue+1:ue}),!(Ee>1||ue>1)}function L(he,oe,Ee){return he.sort(O),he.forEach(function(ye,ue){var ee=0;if(Ce(ye,Ee)&&R(ye))ye.circularPathData.verticalBuffer=ee+ye.width/2;else{var ae=0;for(ae;aeee?xe:ee}ye.circularPathData.verticalBuffer=ee+ye.width/2}}),he}function I(he,oe,Ee,ye){var ue=5,ee=t.min(he.links,function(re){return re.source.y0});he.links.forEach(function(re){re.circular&&(re.circularPathData={})});var ae=he.links.filter(function(re){return re.circularLinkType=="top"});L(ae,oe,ye);var xe=he.links.filter(function(re){return re.circularLinkType=="bottom"});L(xe,oe,ye),he.links.forEach(function(re){if(re.circular){if(re.circularPathData.arcRadius=re.width+y,re.circularPathData.leftNodeBuffer=ue,re.circularPathData.rightNodeBuffer=ue,re.circularPathData.sourceWidth=re.source.x1-re.source.x0,re.circularPathData.sourceX=re.source.x0+re.circularPathData.sourceWidth,re.circularPathData.targetX=re.target.x0,re.circularPathData.sourceY=re.y0,re.circularPathData.targetY=re.y1,Ce(re,ye)&&R(re))re.circularPathData.leftSmallArcRadius=y+re.width/2,re.circularPathData.leftLargeArcRadius=y+re.width/2,re.circularPathData.rightSmallArcRadius=y+re.width/2,re.circularPathData.rightLargeArcRadius=y+re.width/2,re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=re.source.y1+A+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=re.source.y0-A-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius);else{var pe=re.source.column,we=re.circularLinkType,Fe=he.links.filter(function(_e){return _e.source.column==pe&&_e.circularLinkType==we});re.circularLinkType=="bottom"?Fe.sort(Y):Fe.sort($);var Se=0;Fe.forEach(function(_e,Ie){_e.circularLinkID==re.circularLinkID&&(re.circularPathData.leftSmallArcRadius=y+re.width/2+Se,re.circularPathData.leftLargeArcRadius=y+re.width/2+Ie*oe+Se),Se=Se+_e.width}),pe=re.target.column,Fe=he.links.filter(function(_e){return _e.target.column==pe&&_e.circularLinkType==we}),re.circularLinkType=="bottom"?Fe.sort(j):Fe.sort(K),Se=0,Fe.forEach(function(_e,Ie){_e.circularLinkID==re.circularLinkID&&(re.circularPathData.rightSmallArcRadius=y+re.width/2+Se,re.circularPathData.rightLargeArcRadius=y+re.width/2+Ie*oe+Se),Se=Se+_e.width}),re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=Math.max(Ee,re.source.y1,re.target.y1)+A+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=ee-A-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius)}re.circularPathData.leftInnerExtent=re.circularPathData.sourceX+re.circularPathData.leftNodeBuffer,re.circularPathData.rightInnerExtent=re.circularPathData.targetX-re.circularPathData.rightNodeBuffer,re.circularPathData.leftFullExtent=re.circularPathData.sourceX+re.circularPathData.leftLargeArcRadius+re.circularPathData.leftNodeBuffer,re.circularPathData.rightFullExtent=re.circularPathData.targetX-re.circularPathData.rightLargeArcRadius-re.circularPathData.rightNodeBuffer}if(re.circular)re.path=B(re);else{var ke=i.linkHorizontal().source(function(_e){var Ie=_e.source.x0+(_e.source.x1-_e.source.x0),Oe=_e.y0;return[Ie,Oe]}).target(function(_e){var Ie=_e.target.x0,Oe=_e.y1;return[Ie,Oe]});re.path=ke(re)}})}function B(he){var oe="";return he.circularLinkType=="top"?oe="M"+he.circularPathData.sourceX+" "+he.circularPathData.sourceY+" L"+he.circularPathData.leftInnerExtent+" "+he.circularPathData.sourceY+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftSmallArcRadius+" 0 0 0 "+he.circularPathData.leftFullExtent+" "+(he.circularPathData.sourceY-he.circularPathData.leftSmallArcRadius)+" L"+he.circularPathData.leftFullExtent+" "+he.circularPathData.verticalLeftInnerExtent+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftLargeArcRadius+" 0 0 0 "+he.circularPathData.leftInnerExtent+" "+he.circularPathData.verticalFullExtent+" L"+he.circularPathData.rightInnerExtent+" "+he.circularPathData.verticalFullExtent+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightLargeArcRadius+" 0 0 0 "+he.circularPathData.rightFullExtent+" "+he.circularPathData.verticalRightInnerExtent+" L"+he.circularPathData.rightFullExtent+" "+(he.circularPathData.targetY-he.circularPathData.rightSmallArcRadius)+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightSmallArcRadius+" 0 0 0 "+he.circularPathData.rightInnerExtent+" "+he.circularPathData.targetY+" L"+he.circularPathData.targetX+" "+he.circularPathData.targetY:oe="M"+he.circularPathData.sourceX+" "+he.circularPathData.sourceY+" L"+he.circularPathData.leftInnerExtent+" "+he.circularPathData.sourceY+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftSmallArcRadius+" 0 0 1 "+he.circularPathData.leftFullExtent+" "+(he.circularPathData.sourceY+he.circularPathData.leftSmallArcRadius)+" L"+he.circularPathData.leftFullExtent+" "+he.circularPathData.verticalLeftInnerExtent+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftLargeArcRadius+" 0 0 1 "+he.circularPathData.leftInnerExtent+" "+he.circularPathData.verticalFullExtent+" L"+he.circularPathData.rightInnerExtent+" "+he.circularPathData.verticalFullExtent+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightLargeArcRadius+" 0 0 1 "+he.circularPathData.rightFullExtent+" "+he.circularPathData.verticalRightInnerExtent+" L"+he.circularPathData.rightFullExtent+" "+(he.circularPathData.targetY+he.circularPathData.rightSmallArcRadius)+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightSmallArcRadius+" 0 0 1 "+he.circularPathData.rightInnerExtent+" "+he.circularPathData.targetY+" L"+he.circularPathData.targetX+" "+he.circularPathData.targetY,oe}function O(he,oe){return q(he)==q(oe)?he.circularLinkType=="bottom"?Y(he,oe):$(he,oe):q(oe)-q(he)}function $(he,oe){return he.y0-oe.y0}function Y(he,oe){return oe.y0-he.y0}function K(he,oe){return he.y1-oe.y1}function j(he,oe){return oe.y1-he.y1}function q(he){return he.target.column-he.source.column}function J(he){return he.target.x0-he.source.x1}function U(he,oe){var Ee=D(he),ye=J(oe)/Math.tan(Ee),ue=ge(he)=="up"?he.y1+ye:he.y1-ye;return ue}function V(he,oe){var Ee=D(he),ye=J(oe)/Math.tan(Ee),ue=ge(he)=="up"?he.y1-ye:he.y1+ye;return ue}function X(he,oe,Ee,ye){he.links.forEach(function(ue){if(!ue.circular&&ue.target.column-ue.source.column>1){var ee=ue.source.column+1,ae=ue.target.column-1,xe=1,re=ae-ee+1;for(xe=1;ee<=ae;ee++,xe++)he.nodes.forEach(function(pe){if(pe.column==ee){var we=xe/(re+1),Fe=Math.pow(1-we,3),Se=3*we*Math.pow(1-we,2),ke=3*Math.pow(we,2)*(1-we),_e=Math.pow(we,3),Ie=Fe*ue.y0+Se*ue.y0+ke*ue.y1+_e*ue.y1,Oe=Ie-ue.width/2,Qe=Ie+ue.width/2,et;Oe>pe.y0&&Oepe.y0&&Qepe.y1&&G(_t,et,oe,Ee)})):Oepe.y1&&(et=Qe-pe.y0+10,pe=G(pe,et,oe,Ee),he.nodes.forEach(function(_t){T(_t,ye)==T(pe,ye)||_t.column!=pe.column||_t.y0pe.y1&&G(_t,et,oe,Ee)}))}})}})}function H(he,oe){return he.y0>oe.y0&&he.y0oe.y0&&he.y1oe.y1}function G(he,oe,Ee,ye){return he.y0+oe>=Ee&&he.y1+oe<=ye&&(he.y0=he.y0+oe,he.y1=he.y1+oe,he.targetLinks.forEach(function(ue){ue.y1=ue.y1+oe}),he.sourceLinks.forEach(function(ue){ue.y0=ue.y0+oe})),he}function Q(he,oe,Ee,ye){he.nodes.forEach(function(ue){ye&&ue.y+(ue.y1-ue.y0)>oe&&(ue.y=ue.y-(ue.y+(ue.y1-ue.y0)-oe));var ee=he.links.filter(function(re){return T(re.source,Ee)==T(ue,Ee)}),ae=ee.length;ae>1&&ee.sort(function(re,pe){if(!re.circular&&!pe.circular){if(re.target.column==pe.target.column)return re.y1-pe.y1;if(ce(re,pe)){if(re.target.column>pe.target.column){var we=V(pe,re);return re.y1-we}if(pe.target.column>re.target.column){var Fe=V(re,pe);return Fe-pe.y1}}else return re.y1-pe.y1}if(re.circular&&!pe.circular)return re.circularLinkType=="top"?-1:1;if(pe.circular&&!re.circular)return pe.circularLinkType=="top"?1:-1;if(re.circular&&pe.circular)return re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="top"?re.target.column===pe.target.column?re.target.y1-pe.target.y1:pe.target.column-re.target.column:re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="bottom"?re.target.column===pe.target.column?pe.target.y1-re.target.y1:re.target.column-pe.target.column:re.circularLinkType=="top"?-1:1});var xe=ue.y0;ee.forEach(function(re){re.y0=xe+re.width/2,xe=xe+re.width}),ee.forEach(function(re,pe){if(re.circularLinkType=="bottom"){var we=pe+1,Fe=0;for(we;we1&&ue.sort(function(xe,re){if(!xe.circular&&!re.circular){if(xe.source.column==re.source.column)return xe.y0-re.y0;if(ce(xe,re)){if(re.source.column0?"up":"down"}function Ce(he,oe){return T(he.source,oe)==T(he.target,oe)}function be(he,oe,Ee){var ye=he.nodes,ue=he.links,ee=!1,ae=!1;if(ue.forEach(function(Se){Se.circularLinkType=="top"?ee=!0:Se.circularLinkType=="bottom"&&(ae=!0)}),ee==!1||ae==!1){var xe=t.min(ye,function(Se){return Se.y0}),re=t.max(ye,function(Se){return Se.y1}),pe=re-xe,we=Ee-oe,Fe=we/pe;ye.forEach(function(Se){var ke=(Se.y1-Se.y0)*Fe;Se.y0=(Se.y0-xe)*Fe,Se.y1=Se.y0+ke}),ue.forEach(function(Se){Se.y0=(Se.y0-xe)*Fe,Se.y1=(Se.y1-xe)*Fe,Se.width=Se.width*Fe})}}e.sankeyCircular=S,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var toe=W((Bri,Put)=>{"use strict";Put.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 Wut=W((qri,$ut)=>{"use strict";var Iut=xut(),SAr=(db(),Go(hb)).interpolateNumber,e6=vi(),F8=Sut(),EAr=Lut(),Lo=toe(),ig=ni(),kAr=Ji(),ng=it(),p3=ng.strTranslate,Rut=ng.strRotate,noe=G1(),L8=noe.keyFun,Kq=noe.repeat,Uut=noe.unwrap,zut=uo(),CAr=yi(),Vut=Hl(),DAr=Vut.CAP_SHIFT,FAr=Vut.LINE_SPACING,LAr=3;function PAr(e,t,r){var i=Uut(t),n=i.trace,a=n.domain,o=n.orientation==="h",s=n.direction==="reversed",l=n.node.pad,u=n.node.thickness,c={justify:F8.sankeyJustify,left:F8.sankeyLeft,right:F8.sankeyRight,center:F8.sankeyCenter}[n.node.align],f=e.width*(a.x[1]-a.x[0]),h=e.height*(a.y[1]-a.y[0]),d=i._nodes,p=i._links,v=i.circular,m;v?m=EAr.sankeyCircular().circularLinkGap(0):m=F8.sankey(),m.iterations(Lo.sankeyIterations).size(o?[f,h]:[h,f]).nodeWidth(u).nodePadding(l).nodeId(function(P){return P.pointNumber}).nodeAlign(c).nodes(d).links(p);function g(P){n[P].sort==="input"&&(v?ng.warn(`Circular Sankey diagrams do not support the "input" ${P}.sort mode; falling back to the default sort.`):m[`${P}Sort`](null))}g("link"),g("node");var w=m();m.nodePadding()=B||(I=B-L.y0,I>1e-6&&(L.y0+=I,L.y1+=I)),B=L.y1+l})}function C(P){var R=P.map(function(K,j){return{x0:K.x0,index:j}}).sort(function(K,j){return K.x0-j.x0}),L=[],I=-1,B,O=-1/0,$;for(b=0;bO+u&&(I+=1,B=Y.x0),O=Y.x0,L[I]||(L[I]=[]),L[I].push(Y),$=B-Y.x0,Y.x0+=$,Y.x1+=$}return L}if(n.node.x.length&&n.node.y.length){for(b=0;b0?" L "+n.targetX+" "+n.targetY:"")+"Z"):(r="M "+(n.targetX-t)+" "+(n.targetY-i)+" L "+(n.rightInnerExtent-t)+" "+(n.targetY-i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightSmallArcRadius+i)+" 0 0 0 "+(n.rightFullExtent-i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" L "+(n.rightFullExtent-i-t)+" "+n.verticalRightInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-i-t)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent+i-t-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:a?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent-t-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.leftFullExtent+i+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+i)+" L "+n.leftInnerExtent+" "+(n.verticalFullExtent+i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent,r+=" L "+(n.leftFullExtent+i)+" "+(n.sourceY+n.leftSmallArcRadius)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY+i)+" L "+n.leftInnerExtent+" "+(n.sourceY+i)+" A "+(n.leftLargeArcRadius-i)+" "+(n.leftSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i)+" "+(n.sourceY+n.leftSmallArcRadius)+" L "+(n.leftFullExtent-i)+" "+n.verticalLeftInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.rightFullExtent+i-t+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:a?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent-t-i)+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:r+=" A "+(n.leftLargeArcRadius-i)+" "+(n.leftLargeArcRadius-i)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-i)+" L "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightLargeArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent,r+=" L "+(n.rightFullExtent+i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+i)+" L "+(n.targetX-t)+" "+(n.targetY+i)+(t>0?" L "+n.targetX+" "+n.targetY:"")+"Z"),r}function aoe(){var e=.5;function t(r){var i=r.linkArrowLength;if(r.link.circular)return RAr(r.link,i);var n=Math.abs((r.link.target.x0-r.link.source.x1)/2);i>n&&(i=n);var a=r.link.source.x1,o=r.link.target.x0-i,s=SAr(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,p="M"+a+","+c,v="C"+l+","+c+" "+u+","+h+" "+o+","+h,m="C"+u+","+d+" "+l+","+f+" "+a+","+f,g=i>0?"L"+(o+i)+","+(h+r.link.width/2):"";return g+="L"+o+","+d,p+v+g+m+"Z"}return t}function zAr(e,t){var r=Lo.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=ng.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:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:ig.rgb(t.color),alpha:ig.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 ioe(e){e.attr("transform",function(t){return p3(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function BAr(e){e.call(ioe)}function Gut(e,t){e.call(BAr),t.attr("d",aoe())}function But(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function roe(e){return e.link.width>1||e.linkLineWidth>0}function qut(e){return e.horizontal?e.reversed?p3(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":p3(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?p3(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":p3(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function Out(e,t,r){e.on(".basic",null).on("mouseover.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.hover(this,i,t),i.interactionState.hovered=[this,i])}).on("mousemove.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.follow(this,i),i.interactionState.hovered=[this,i])}).on("mouseout.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.unhover(this,i,t),i.interactionState.hovered=!1)}).on("click.basic",function(i){i.interactionState.hovered&&(r.unhover(this,i,t),i.interactionState.hovered=!1),!i.interactionState.dragInProgress&&!i.partOfGroup&&r.select(this,i,t)})}function qAr(e,t,r,i){var n=e6.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(ng.ensureSingle(i._fullLayout._infolayer,"g","dragcover",function(s){i._fullLayout._dragCover=s}),ng.raiseToTop(this),a.interactionState.dragInProgress=a.node,Nut(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):OAr(e,o,a,i),NAr(e,t,a,o,i)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=e6.event.x,s=e6.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),Nut(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),Gut(e.filter(jut(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,Hut(r,n)}})}function UAr(e,t,r,i){return function(){for(var a=0,o=0;o0&&i.forceLayouts[t].alpha(0)}}function Hut(e,t){for(var r=[],i=[],n=0;nroe(m)?ig.rgb(m.linkLineColor):m.rgb).style("stroke-opacity",m=>roe(m)?ig.opacity(m.linkLineColor):m.alpha).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha).style("stroke-width",m=>roe(m)?m.linkLineWidth:1).attr("d",aoe()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Lo.ease).duration(Lo.duration).style("opacity",1),f.exit().transition().ease(Lo.ease).duration(Lo.duration).style("opacity",0).remove();var h=u.selectAll("."+Lo.cn.sankeyNodeSet).data(Kq,L8);h.enter().append("g").classed(Lo.cn.sankeyNodeSet,!0),h.style("cursor",function(m){switch(m.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var d=h.selectAll("."+Lo.cn.sankeyNode).data(function(m){var g=m.graph.nodes;return VAr(g),g.map(zAr.bind(null,m))},L8);d.enter().append("g").classed(Lo.cn.sankeyNode,!0).call(ioe).style("opacity",function(m){return(e._context.staticPlot||o)&&!m.partOfGroup?1:0}),d.call(Out,u,n.nodeEvents).call(qAr,f,n,e),d.transition().ease(Lo.ease).duration(Lo.duration).call(ioe).style("opacity",function(m){return m.partOfGroup?0:1}),d.exit().transition().ease(Lo.ease).duration(Lo.duration).style("opacity",0).remove();var p=d.selectAll("."+Lo.cn.nodeRect).data(Kq);p.enter().append("rect").classed(Lo.cn.nodeRect,!0).call(But),p.style("stroke-width",function(m){return m.nodeLineWidth}).style("stroke",function(m){return ig.rgb(m.nodeLineColor)}).style("stroke-opacity",function(m){return ig.opacity(m.nodeLineColor)}).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha),p.transition().ease(Lo.ease).duration(Lo.duration).call(But);var v=d.selectAll("."+Lo.cn.nodeLabel).data(Kq);v.enter().append("text").classed(Lo.cn.nodeLabel,!0).style("cursor","default"),v.attr("data-notex",1).text(function(m){return m.node.label}).each(function(m){var g=e6.select(this);kAr.font(g,m.textFont),zut.convertToTspans(g,e)}).attr("text-anchor",function(m){return m.horizontal&&m.left!==m.reversed?"end":"start"}).attr("transform",function(m){var g=e6.select(this),w=zut.lineCount(g),b=m.textFont.size*((w-1)*FAr-DAr),_=m.nodeLineWidth/2+LAr;if(!m.horizontal){var T=m.reversed?(m.visibleWidth+b)/2:(m.visibleWidth-b)/2,M=m.reversed?Rut(90):"scale(-1,1)"+Rut(90);return p3(T,_)+M}var x=_,T=(m.visibleHeight-b)/2;return m.left?x=-x:x+=m.visibleWidth,p3(x,T)+(m.reversed?"scale(-1,1)":"")}),v.transition().ease(Lo.ease).duration(Lo.duration)}});var loe=W((Ori,rct)=>{"use strict";var Bf=vi(),soe=it(),Jq=soe.numberFormat,jAr=Wut(),t6=Ds(),$Ar=ni(),lx=toe().cn,P8=soe._;function Yut(e){return e!==""}function r6(e,t){return e.filter(function(r){return r.key===t.traceId})}function Xut(e,t){Bf.select(e).select("path").style("fill-opacity",t),Bf.select(e).select("rect").style("fill-opacity",t)}function Zut(e){Bf.select(e).select("text.name").style("fill","black")}function Kut(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Jut(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Qut(e,t,r){t&&r&&r6(r,t).selectAll("."+lx.sankeyLink).filter(Kut(t)).call(ect.bind(0,t,r,!1))}function ooe(e,t,r){t&&r&&r6(r,t).selectAll("."+lx.sankeyLink).filter(Kut(t)).call(tct.bind(0,t,r,!1))}function ect(e,t,r,i){i.style("fill",function(n){if(!n.link.concentrationscale)return n.hoverRgb}).style("fill-opacity",function(n){if(!n.link.concentrationscale)return n.hoverAlpha}),i.each(function(n){var a=n.link.label;a!==""&&r6(t,e).selectAll("."+lx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&r6(t,e).selectAll("."+lx.sankeyNode).filter(Jut(e)).call(Qut)}function tct(e,t,r,i){i.style("fill",function(n){return n.rgb}).style("fill-opacity",function(n){return n.alpha}),i.each(function(n){var a=n.link.label;a!==""&&r6(t,e).selectAll("."+lx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&r6(t,e).selectAll(lx.sankeyNode).filter(Jut(e)).call(ooe)}function Ys(e,t){var r=e.hoverlabel||{},i=soe.nestedProperty(r,t).get();return Array.isArray(i)?!1:i}rct.exports=function(t,r){for(var i=t._fullLayout,n=i._paper,a=i._size,o=0;o"),color:Ys(T,"bgcolor")||$Ar.addOpacity(C.color,1),borderColor:Ys(T,"bordercolor"),fontFamily:Ys(T,"font.family"),fontSize:Ys(T,"font.size"),fontColor:Ys(T,"font.color"),fontWeight:Ys(T,"font.weight"),fontStyle:Ys(T,"font.style"),fontVariant:Ys(T,"font.variant"),fontTextcase:Ys(T,"font.textcase"),fontLineposition:Ys(T,"font.lineposition"),fontShadow:Ys(T,"font.shadow"),nameLength:Ys(T,"namelength"),textAlign:Ys(T,"align"),idealAlign:Bf.event.x"),color:Ys(T,"bgcolor")||x.rgb,borderColor:Ys(T,"bordercolor"),fontFamily:Ys(T,"font.family"),fontSize:Ys(T,"font.size"),fontColor:Ys(T,"font.color"),fontWeight:Ys(T,"font.weight"),fontStyle:Ys(T,"font.style"),fontVariant:Ys(T,"font.variant"),fontTextcase:Ys(T,"font.textcase"),fontLineposition:Ys(T,"font.lineposition"),fontShadow:Ys(T,"font.shadow"),nameLength:Ys(T,"namelength"),textAlign:Ys(T,"align"),idealAlign:"left",hovertemplate:T.hovertemplate,hovertemplateLabels:D,eventData:[x.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t});Xut(R,.85),Zut(R)}}},_=function(M,x,T){t._fullLayout.hovermode!==!1&&(Bf.select(M).call(ooe,x,T),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Bf.event,points:[x.node]})),t6.loneUnhover(i._hoverlayer.node()))};jAr(t,n,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:v,unhover:m,select:l},nodeEvents:{hover:w,follow:b,unhover:_,select:g}})}});var ict=W(v3=>{"use strict";var WAr=ls().overrideAll,YAr=_c().getModuleCalcData,XAr=loe(),ZAr=sy(),KAr=Np(),JAr=bf(),QAr=cu().prepSelect,uoe=it(),eMr=yi(),Qq="sankey";v3.name=Qq;v3.baseLayoutAttrOverrides=WAr({hoverlabel:ZAr.hoverlabel},"plot","nested");v3.plot=function(e){var t=YAr(e.calcdata,Qq)[0];XAr(e,t),v3.updateFx(e)};v3.clean=function(e,t,r,i){var n=i._has&&i._has(Qq),a=t._has&&t._has(Qq);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())};v3.updateFx=function(e){for(var t=0;t{"use strict";nct.exports=function(t,r){for(var i=t.cd,n=[],a=i[0].trace,o=a._sankey,s=o.graph.nodes,l=a.orientation==="v",u=a.direction==="reversed",c=0;c{"use strict";oct.exports={attributes:Kae(),supplyDefaults:aut(),calc:cut(),plot:loe(),moduleType:"trace",name:"sankey",basePlotModule:ict(),selectPoints:act(),categories:["noOpacity"],meta:{}}});var uct=W((Gri,lct)=>{"use strict";lct.exports=sct()});var fct=W(i6=>{"use strict";var cct=Ko();i6.name="indicator";i6.plot=function(e,t,r,i){cct.plotBasePlot(i6.name,e,t,r,i)};i6.clean=function(e,t,r,i){cct.cleanBasePlot(i6.name,e,t,r,i)}});var foe=W((jri,mct)=>{"use strict";var ux=tn().extendFlat,dct=tn().extendDeep,rMr=ls().overrideAll,pct=Ho(),vct=Vl(),iMr=us().attributes,sl=ec(),nMr=Da().templatedArray,eO=D5(),hct=_s().descriptionOnlyNumbers,coe=pct({editType:"plot",colorEditType:"plot"}),I8={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:vct.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"},gct={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},aMr=nMr("step",dct({},I8,{range:gct}));mct.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:iMr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:ux({},coe,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:hct("value")},font:ux({},coe,{}),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:hct("value")},increasing:{symbol:{valType:"string",dflt:eO.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:eO.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:eO.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:eO.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:ux({},coe,{}),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:dct({},I8,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:vct.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:rMr({range:gct,visible:ux({},sl.visible,{dflt:!0}),tickmode:sl.minor.tickmode,nticks:sl.nticks,tick0:sl.tick0,dtick:sl.dtick,tickvals:sl.tickvals,ticktext:sl.ticktext,ticks:ux({},sl.ticks,{dflt:"outside"}),ticklen:sl.ticklen,tickwidth:sl.tickwidth,tickcolor:sl.tickcolor,ticklabelstep:sl.ticklabelstep,showticklabels:sl.showticklabels,labelalias:sl.labelalias,tickfont:pct({}),tickangle:sl.tickangle,tickformat:sl.tickformat,tickformatstops:sl.tickformatstops,tickprefix:sl.tickprefix,showtickprefix:sl.showtickprefix,ticksuffix:sl.ticksuffix,showticksuffix:sl.showticksuffix,separatethousands:sl.separatethousands,exponentformat:sl.exponentformat,minexponent:sl.minexponent,showexponent:sl.showexponent,editType:"plot"},"plot"),steps:aMr,threshold:{line:{color:ux({},I8.line.color,{}),width:ux({},I8.line.width,{dflt:1}),editType:"plot"},thickness:ux({},I8.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var hoe=W(($ri,yct)=>{"use strict";yct.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var bct=W((Wri,_ct)=>{"use strict";var ag=it(),rO=foe(),oMr=us().defaults,xct=Da(),sMr=Xc(),tO=hoe(),lMr=Xx(),uMr=vw(),cMr=wy(),fMr=Ty();function hMr(e,t,r,i){function n(x,T){return ag.coerce(e,t,rO,x,T)}oMr(t,i,n),n("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=n("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){n("number.valueformat");var l=ag.extendFlat({},i.font);l.size=void 0,ag.coerceFont(n,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=tO.defaultNumberFontSize,o[0]=!0),n("number.prefix"),n("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ag.extendFlat({},i.font);c.size=void 0,ag.coerceFont(n,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||tO.defaultNumberFontSize),o[1]=!0),n("delta.reference",t.value),n("delta.relative"),n("delta.valueformat",t.delta.relative?"2%":""),n("delta.increasing.symbol"),n("delta.increasing.color"),n("delta.decreasing.symbol"),n("delta.decreasing.color"),n("delta.position"),n("delta.prefix"),n("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=ag.extendFlat({},i.font);f.size=.25*(s||u||tO.defaultNumberFontSize),ag.coerceFont(n,"title.font",f),n("title.text");var h,d,p,v;function m(x,T){return ag.coerce(h,d,rO.gauge,x,T)}function g(x,T){return ag.coerce(p,v,rO.gauge.axis,x,T)}if(t._hasGauge){h=e.gauge,h||(h={}),d=xct.newContainer(t,"gauge"),m("shape");var w=t._isBullet=t.gauge.shape==="bullet";w||n("title.align","center");var b=t._isAngular=t.gauge.shape==="angular";b||n("align","center"),m("bgcolor",i.paper_bgcolor),m("borderwidth"),m("bordercolor"),m("bar.color"),m("bar.line.color"),m("bar.line.width");var _=tO.valueThickness*(t.gauge.shape==="bullet"?.5:1);m("bar.thickness",_),sMr(h,d,{name:"steps",handleItemDefaults:dMr}),m("threshold.value"),m("threshold.thickness"),m("threshold.line.width"),m("threshold.line.color"),p={},h&&(p=h.axis||{}),v=xct.newContainer(d,"axis"),g("visible"),t._range=g("range",t._range);var M={font:i.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};lMr(p,v,g,"linear"),fMr(p,v,g,"linear",M),cMr(p,v,g,"linear",M),uMr(p,v,g,M)}else n("title.align","center"),n("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function dMr(e,t){function r(i,n){return ag.coerce(e,t,rO.gauge.steps,i,n)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}_ct.exports={supplyDefaults:hMr}});var Tct=W((Yri,wct)=>{"use strict";function pMr(e,t){var r=[],i=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var n=t._lastValue,a=n;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:i,lastY:n,delta:i-a,relativeDelta:(i-a)/a},r}wct.exports={calc:pMr}});var Cct=W((Xri,kct)=>{"use strict";var _3=vi(),vMr=(db(),Go(hb)).interpolate,Act=(db(),Go(hb)).interpolateNumber,cx=it(),gMr=cx.strScale,z8=cx.strTranslate,mMr=cx.rad2deg,yMr=Hl().MID_SHIFT,x3=Ji(),g3=hoe(),nO=uo(),Oc=ji(),xMr=mM(),_Mr=TF(),bMr=ec(),n6=ni(),doe={left:"start",center:"middle",right:"end"},m3={left:0,center:.5,right:1},Mct=/[yzafpnµmkMGTPEZY]/;function B8(e){return e&&e.duration>0}kct.exports=function(t,r,i,n){var a=t._fullLayout,o;B8(i)&&n&&(o=n()),cx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=_3.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,p=u.domain,v={w:a._size.w*(p.x[1]-p.x[0]),h:a._size.h*(p.y[1]-p.y[0]),l:a._size.l+a._size.w*p.x[0],r:a._size.r+a._size.w*(1-p.x[1]),t:a._size.t+a._size.h*(1-p.y[1]),b:a._size.b+a._size.h*p.y[0]},m=v.l+v.w/2,g=v.t+v.h/2,w=Math.min(v.w/2,v.h),b=g3.innerRadius*w,_,M,x,T=u.align||"center";if(M=g,!f)_=v.l+m3[T]*v.w,x=function(R){return Sct(R,v.w,v.h)};else if(h&&(_=m,M=g+w/2,x=function(R){return SMr(R,.9*b)}),d){var A=g3.bulletPadding,y=1-g3.bulletNumberDomainSize+A;_=v.l+(y+(1-y)*m3[T])*v.w,x=function(R){return Sct(R,(g3.bulletNumberDomainSize-A)*v.w,v.h)}}AMr(t,c,s,{numbersX:_,numbersY:M,numbersScaler:x,transitionOpts:i,onComplete:o});var E,S;f&&(E={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},S={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var C=c.selectAll("g.angular").data(h?s:[]);C.exit().remove();var k=c.selectAll("g.angularaxis").data(h?s:[]);k.exit().remove(),h&&TMr(t,c,s,{radius:w,innerRadius:b,gauge:C,layer:k,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var D=c.selectAll("g.bullet").data(d?s:[]);D.exit().remove();var F=c.selectAll("g.bulletaxis").data(d?s:[]);F.exit().remove(),d&&wMr(t,c,s,{gauge:D,layer:F,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var P=c.selectAll("text.title").data(s);P.exit().remove(),P.enter().append("text").classed("title",!0),P.attr("text-anchor",function(){return d?doe.right:doe[u.title.align]}).text(u.title.text).call(x3.font,u.title.font).call(nO.convertToTspans,t),P.attr("transform",function(){var R=v.l+v.w*m3[u.title.align],L,I=g3.titlePadding,B=x3.bBox(P.node());if(f){if(h)if(u.gauge.axis.visible){var O=x3.bBox(k.node());L=O.top-I-B.bottom}else L=v.t+v.h/2-w/2-B.bottom-I;d&&(L=M-(B.top+B.bottom)/2,R=v.l-g3.bulletPadding*v.w)}else L=u._numbersTop-I-B.bottom;return z8(R,L)})})};function wMr(e,t,r,i){var n=r[0].trace,a=i.gauge,o=i.layer,s=i.gaugeBg,l=i.gaugeOutline,u=i.size,c=n.domain,f=i.transitionOpts,h=i.onComplete,d,p,v,m,g;a.enter().append("g").classed("bullet",!0),a.attr("transform",z8(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var w=u.h,b=n.gauge.bar.thickness*w,_=c.x[0],M=c.x[0]+(c.x[1]-c.x[0])*(n._hasNumber||n._hasDelta?1-g3.bulletNumberDomainSize:1);d=R8(e,n.gauge.axis),d._id="xbulletaxis",d.domain=[_,M],d.setScale(),p=Oc.calcTicks(d),v=Oc.makeTransTickFn(d),m=Oc.getTickSigns(d)[2],g=u.t+u.h,d.visible&&(Oc.drawTicks(e,d,{vals:d.ticks==="inside"?Oc.clipEnds(d,p):p,layer:o,path:Oc.makeTickPath(d,g,m),transFn:v}),Oc.drawLabels(e,d,{vals:p,layer:o,transFn:v,labelFns:Oc.makeLabelFns(d,g)}));function x(k){k.attr("width",function(D){return Math.max(0,d.c2p(D.range[1])-d.c2p(D.range[0]))}).attr("x",function(D){return d.c2p(D.range[0])}).attr("y",function(D){return .5*(1-D.thickness)*w}).attr("height",function(D){return D.thickness*w})}var T=[s].concat(n.gauge.steps),A=a.selectAll("g.bg-bullet").data(T);A.enter().append("g").classed("bg-bullet",!0).append("rect"),A.select("rect").call(x).call(y3),A.exit().remove();var y=a.selectAll("g.value-bullet").data([n.gauge.bar]);y.enter().append("g").classed("value-bullet",!0).append("rect"),y.select("rect").attr("height",b).attr("y",(w-b)/2).call(y3),B8(f)?y.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],r[0].y)))):y.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],r[0].y))):0),y.exit().remove();var E=r.filter(function(){return n.gauge.threshold.value||n.gauge.threshold.value===0}),S=a.selectAll("g.threshold-bullet").data(E);S.enter().append("g").classed("threshold-bullet",!0).append("line"),S.select("line").attr("x1",d.c2p(n.gauge.threshold.value)).attr("x2",d.c2p(n.gauge.threshold.value)).attr("y1",(1-n.gauge.threshold.thickness)/2*w).attr("y2",(1-(1-n.gauge.threshold.thickness)/2)*w).call(n6.stroke,n.gauge.threshold.line.color).style("stroke-width",n.gauge.threshold.line.width),S.exit().remove();var C=a.selectAll("g.gauge-outline").data([l]);C.enter().append("g").classed("gauge-outline",!0).append("rect"),C.select("rect").call(x).call(y3),C.exit().remove()}function TMr(e,t,r,i){var n=r[0].trace,a=i.size,o=i.radius,s=i.innerRadius,l=i.gaugeBg,u=i.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=i.gauge,h=i.layer,d=i.transitionOpts,p=i.onComplete,v=Math.PI/2;function m($){var Y=n.gauge.axis.range[0],K=n.gauge.axis.range[1],j=($-Y)/(K-Y)*Math.PI-v;return j<-v?-v:j>v?v:j}function g($){return _3.svg.arc().innerRadius((s+o)/2-$/2*(o-s)).outerRadius((s+o)/2+$/2*(o-s)).startAngle(-v)}function w($){$.attr("d",function(Y){return g(Y.thickness).startAngle(m(Y.range[0])).endAngle(m(Y.range[1]))()})}var b,_,M,x;f.enter().append("g").classed("angular",!0),f.attr("transform",z8(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),b=R8(e,n.gauge.axis),b.type="linear",b.range=n.gauge.axis.range,b._id="xangularaxis",b.ticklabeloverflow="allow",b.setScale();var T=function($){return(b.range[0]-$.x)/(b.range[1]-b.range[0])*Math.PI+Math.PI},A={},y=Oc.makeLabelFns(b,0),E=y.labelStandoff;A.xFn=function($){var Y=T($);return Math.cos(Y)*E},A.yFn=function($){var Y=T($),K=Math.sin(Y)>0?.2:1;return-Math.sin(Y)*(E+$.fontSize*K)+Math.abs(Math.cos(Y))*($.fontSize*yMr)},A.anchorFn=function($){var Y=T($),K=Math.cos(Y);return Math.abs(K)<.1?"middle":K>0?"start":"end"},A.heightFn=function($,Y,K){var j=T($);return-.5*(1+Math.sin(j))*K};var S=function($){return z8(c[0]+o*Math.cos($),c[1]-o*Math.sin($))};M=function($){return S(T($))};var C=function($){var Y=T($);return S(Y)+"rotate("+-mMr(Y)+")"};if(_=Oc.calcTicks(b),x=Oc.getTickSigns(b)[2],b.visible){x=b.ticks==="inside"?-1:1;var k=(b.linewidth||1)/2;Oc.drawTicks(e,b,{vals:_,layer:h,path:"M"+x*k+",0h"+x*b.ticklen,transFn:C}),Oc.drawLabels(e,b,{vals:_,layer:h,transFn:M,labelFns:A})}var D=[l].concat(n.gauge.steps),F=f.selectAll("g.bg-arc").data(D);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(w).call(y3),F.exit().remove();var P=g(n.gauge.bar.thickness),R=f.selectAll("g.value-arc").data([n.gauge.bar]);R.enter().append("g").classed("value-arc",!0).append("path");var L=R.select("path");B8(d)?(L.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",MMr(P,m(r[0].lastY),m(r[0].y))),n._lastValue=r[0].y):L.attr("d",typeof r[0].y=="number"?P.endAngle(m(r[0].y)):"M0,0Z"),L.call(y3),R.exit().remove(),D=[];var I=n.gauge.threshold.value;(I||I===0)&&D.push({range:[I,I],color:n.gauge.threshold.color,line:{color:n.gauge.threshold.line.color,width:n.gauge.threshold.line.width},thickness:n.gauge.threshold.thickness});var B=f.selectAll("g.threshold-arc").data(D);B.enter().append("g").classed("threshold-arc",!0).append("path"),B.select("path").call(w).call(y3),B.exit().remove();var O=f.selectAll("g.gauge-outline").data([u]);O.enter().append("g").classed("gauge-outline",!0).append("path"),O.select("path").call(w).call(y3),O.exit().remove()}function AMr(e,t,r,i){var n=r[0].trace,a=i.numbersX,o=i.numbersY,s=n.align||"center",l=doe[s],u=i.transitionOpts,c=i.onComplete,f=cx.ensureSingle(t,"g","numbers"),h,d,p,v=[];n._hasNumber&&v.push("number"),n._hasDelta&&(v.push("delta"),n.delta.position==="left"&&v.reverse());var m=f.selectAll("text").data(v);m.enter().append("text"),m.attr("text-anchor",function(){return l}).attr("class",function(S){return S}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),m.exit().remove();function g(S,C,k,D){if(S.match("s")&&k>=0!=D>=0&&!C(k).slice(-1).match(Mct)&&!C(D).slice(-1).match(Mct)){var F=S.slice().replace("s","f").replace(/\d+/,function(R){return parseInt(R)-1}),P=R8(e,{tickformat:F});return function(R){return Math.abs(R)<1?Oc.tickText(P,R).text:C(R)}}else return C}function w(){var S=R8(e,{tickformat:n.number.valueformat},n._range);S.setScale(),Oc.prepTicks(S);var C=function(R){return Oc.tickText(S,R).text},k=n.number.suffix,D=n.number.prefix,F=f.select("text.number");function P(){var R=typeof r[0].y=="number"?D+C(r[0].y)+k:"-";F.text(R).call(x3.font,n.number.font).call(nO.convertToTspans,e)}return B8(u)?F.transition().duration(u.duration).ease(u.easing).each("end",function(){P(),c&&c()}).each("interrupt",function(){P(),c&&c()}).attrTween("text",function(){var R=_3.select(this),L=Act(r[0].lastY,r[0].y);n._lastValue=r[0].y;var I=g(n.number.valueformat,C,r[0].lastY,r[0].y);return function(B){R.text(D+I(L(B))+k)}}):P(),h=Ect(D+C(r[0].y)+k,n.number.font,l,e),F}function b(){var S=R8(e,{tickformat:n.delta.valueformat},n._range);S.setScale(),Oc.prepTicks(S);var C=function(B){return Oc.tickText(S,B).text},k=n.delta.suffix,D=n.delta.prefix,F=function(B){var O=n.delta.relative?B.relativeDelta:B.delta;return O},P=function(B,O){return B===0||typeof B!="number"||isNaN(B)?"-":(B>0?n.delta.increasing.symbol:n.delta.decreasing.symbol)+D+O(B)+k},R=function(B){return B.delta>=0?n.delta.increasing.color:n.delta.decreasing.color};n._deltaLastValue===void 0&&(n._deltaLastValue=F(r[0]));var L=f.select("text.delta");L.call(x3.font,n.delta.font).call(n6.fill,R({delta:n._deltaLastValue}));function I(){L.text(P(F(r[0]),C)).call(n6.fill,R(r[0])).call(nO.convertToTspans,e)}return B8(u)?L.transition().duration(u.duration).ease(u.easing).tween("text",function(){var B=_3.select(this),O=F(r[0]),$=n._deltaLastValue,Y=g(n.delta.valueformat,C,$,O),K=Act($,O);return n._deltaLastValue=O,function(j){B.text(P(K(j),Y)),B.call(n6.fill,R({delta:K(j)}))}}).each("end",function(){I(),c&&c()}).each("interrupt",function(){I(),c&&c()}):I(),d=Ect(P(F(r[0]),C),n.delta.font,l,e),L}var _=n.mode+n.align,M;if(n._hasDelta&&(M=b(),_+=n.delta.position+n.delta.font.size+n.delta.font.family+n.delta.valueformat,_+=n.delta.increasing.symbol+n.delta.decreasing.symbol,p=d),n._hasNumber&&(w(),_+=n.number.font.size+n.number.font.family+n.number.valueformat+n.number.suffix+n.number.prefix,p=h),n._hasDelta&&n._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],T=[(d.left+d.right)/2,(d.top+d.bottom)/2],A,y,E=.75*n.delta.font.size;n.delta.position==="left"&&(A=iO(n,"deltaPos",0,-1*(h.width*m3[n.align]+d.width*(1-m3[n.align])+E),_,Math.min),y=x[1]-T[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:d.left+A,right:h.right,top:Math.min(h.top,d.top+y),bottom:Math.max(h.bottom,d.bottom+y)}),n.delta.position==="right"&&(A=iO(n,"deltaPos",0,h.width*(1-m3[n.align])+d.width*m3[n.align]+E,_,Math.max),y=x[1]-T[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:h.left,right:d.right+A,top:Math.min(h.top,d.top+y),bottom:Math.max(h.bottom,d.bottom+y)}),n.delta.position==="bottom"&&(A=null,y=d.height,p={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),n.delta.position==="top"&&(A=null,y=h.top,p={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),M.attr({dx:A,dy:y})}(n._hasNumber||n._hasDelta)&&f.attr("transform",function(){var S=i.numbersScaler(p);_+=S[2];var C=iO(n,"numbersScale",1,S[0],_,Math.min),k;n._scaleNumbers||(C=1),n._isAngular?k=o-C*p.bottom:k=o-C*(p.top+p.bottom)/2,n._numbersTop=C*p.top+k;var D=p[s];s==="center"&&(D=(p.left+p.right)/2);var F=a-C*D;return F=iO(n,"numbersTranslate",0,F,_,Math.max),z8(F,k)+gMr(C)})}function y3(e){e.each(function(t){n6.stroke(_3.select(this),t.line.color)}).each(function(t){n6.fill(_3.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function MMr(e,t,r){return function(){var i=vMr(t,r);return function(n){return e.endAngle(i(n))()}}}function R8(e,t,r){var i=e._fullLayout,n=cx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return cx.coerce(n,a,bMr,l,u)}return xMr(n,a,s,o,i),_Mr(n,a,s,o),a}function Sct(e,t,r){var i=Math.min(t/e.width,r/e.height);return[i,e,t+"x"+r]}function SMr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),i=t/r;return[i,e,t]}function Ect(e,t,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","text"),a=_3.select(n);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(nO.convertToTspans,i).call(x3.font,t),x3.bBox(a.node())}function iO(e,t,r,i,n,a){var o="_cache"+t;e[o]&&e[o].key===n||(e[o]={key:n,value:r});var s=cx.aggNums(a,null,[e[o].value,i],2);return e[o].value=s,s}});var Fct=W((Zri,Dct)=>{"use strict";Dct.exports={moduleType:"trace",name:"indicator",basePlotModule:fct(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:foe(),supplyDefaults:bct().supplyDefaults,calc:Tct().calc,plot:Cct(),meta:{}}});var Pct=W((Kri,Lct)=>{"use strict";Lct.exports=Fct()});var poe=W((Qri,Bct)=>{"use strict";var Ict=qy(),aO=tn().extendFlat,EMr=ls().overrideAll,Rct=Ho(),kMr=us().attributes,zct=_s().descriptionOnlyNumbers,Jri=Bct.exports=EMr({domain:kMr({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:zct("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:aO({},Ict.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:aO({},Rct({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zct("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:aO({},Ict.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:aO({},Rct({arrayOk:!0}))}},"calc","from-root")});var Oct=W((eii,qct)=>{"use strict";var voe=it(),CMr=poe(),DMr=us().defaults;function FMr(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(l,u){return l-u}),o=n.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var LMr=G1().wrap;Nct.exports=function(){return LMr({})}});var goe=W((rii,Vct)=>{"use strict";Vct.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 Kct=W((iii,Zct)=>{"use strict";var Gct=goe(),yoe=tn().extendFlat,PMr=sn(),IMr=yc().isTypedArray,oO=yc().isArrayOrTypedArray;Zct.exports=function(t,r){var i=moe(r.cells.values),n=function(y){return y.slice(r.header.values.length,y.length)},a=moe(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=moe(a));var o=a.concat(n(i).map(function(){return Xct((a[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}):[Gct.emptyHeaderHeight],f=i.length?i[0].map(function(){return r.cells.height}):[],h=c.reduce(Hct,0),d=u-h,p=d+Gct.uplift,v=Wct(f,p),m=Wct(c,h),g=$ct(m,[]),w=$ct(v,g),b={},_=r.columnorder;oO(_)&&(_=Array.from(_)),_=_.concat(n(i.map(function(y,E){return E})));var M=o.map(function(y,E){var S=oO(r.columnwidth)?r.columnwidth[Math.min(E,r.columnwidth.length-1)]:r.columnwidth;return PMr(S)?Number(S):1}),x=M.reduce(Hct,0);M=M.map(function(y){return y/x*l});var T=Math.max(xoe(r.header.line.width),xoe(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:_,groupHeight:u,rowBlocks:w,headerRowBlocks:g,scrollY:0,cells:yoe({},r.cells,{values:i}),headerCells:yoe({},r.header,{values:o}),gdColumns:o.map(function(y){return y[0]}),gdColumnsOriginalOrder:o.map(function(y){return y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(y,E){var S=b[y];b[y]=(S||0)+1;var C=y+"__"+b[y];return{key:C,label:y,specIndex:E,xIndex:_[E],xScale:jct,x:void 0,calcdata:void 0,columnWidth:M[E]}})};return A.columns.forEach(function(y){y.calcdata=A,y.x=jct(y)}),A};function xoe(e){if(oO(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=Yct(),n+=a,s=u+1,a=0);return r}function Yct(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var Jct=W(_oe=>{"use strict";var sO=tn().extendFlat;_oe.splitToPanels=function(e){var t=[0,0],r=sO({},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:sO({},e.calcdata,{cells:e.calcdata.headerCells})}),i=sO({},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}),n=sO({},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[i,n,r]};_oe.splitToCells=function(e){var t=RMr(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,i){var n=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:i+n,key:t[0]+i,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function RMr(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,i=t?r+t.rows.length:0;return[r,i]}});var Doe=W((aii,uft)=>{"use strict";var Ti=goe(),Ms=vi(),boe=it(),zMr=boe.numberFormat,Po=G1(),woe=Ji(),BMr=uo(),qMr=it().raiseToTop,ap=it().strTranslate,OMr=it().cancelTransition,NMr=Kct(),aft=Jct(),Qct=ni();uft.exports=function(t,r){var i=!t._context.staticPlot,n=t._fullLayout._paper.selectAll("."+Ti.cn.table).data(r.map(function(w){var b=Po.unwrap(w),_=b.trace;return NMr(t,_)}),Po.keyFun);n.exit().remove(),n.enter().append("g").classed(Ti.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"),n.attr("width",function(w){return w.width+w.size.l+w.size.r}).attr("height",function(w){return w.height+w.size.t+w.size.b}).attr("transform",function(w){return ap(w.translateX,w.translateY)});var a=n.selectAll("."+Ti.cn.tableControlView).data(Po.repeat,Po.keyFun),o=a.enter().append("g").classed(Ti.cn.tableControlView,!0).style("box-sizing","content-box");if(i){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(w){a.filter(function(b){return w===b}).call(q8,t)}).on(s,function(w){if(!w.scrollbarState.wheeling){w.scrollbarState.wheeling=!0;var b=w.scrollY+Ms.event.deltaY,_=uO(t,a,null,b)(w);_||(Ms.event.stopPropagation(),Ms.event.preventDefault()),w.scrollbarState.wheeling=!1}}).call(q8,t,!0)}a.attr("transform",function(w){return ap(w.size.l,w.size.t)});var l=a.selectAll("."+Ti.cn.scrollBackground).data(Po.repeat,Po.keyFun);l.enter().append("rect").classed(Ti.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),a.each(function(w){woe.setClipUrl(Ms.select(this),eft(t,w),t)});var u=a.selectAll("."+Ti.cn.yColumn).data(function(w){return w.columns},Po.keyFun);u.enter().append("g").classed(Ti.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(w){return ap(w.x,0)}),i&&u.call(Ms.behavior.drag().origin(function(w){var b=Ms.select(this);return ift(b,w,-Ti.uplift),qMr(this),w.calcdata.columnDragInProgress=!0,q8(a.filter(function(_){return w.calcdata.key===_.key}),t),w}).on("drag",function(w){var b=Ms.select(this),_=function(T){return(w===T?Ms.event.x:T.x)+T.columnWidth/2};w.x=Math.max(-Ti.overdrag,Math.min(w.calcdata.width+Ti.overdrag-w.columnWidth,Ms.event.x));var M=oft(u).filter(function(T){return T.calcdata.key===w.calcdata.key}),x=M.sort(function(T,A){return _(T)-_(A)});x.forEach(function(T,A){T.xIndex=A,T.x=w===T?T.x:T.xScale(T)}),u.filter(function(T){return w!==T}).transition().ease(Ti.transitionEase).duration(Ti.transitionDuration).attr("transform",function(T){return ap(T.x,0)}),b.call(OMr).attr("transform",ap(w.x,-Ti.uplift))}).on("dragend",function(w){var b=Ms.select(this),_=w.calcdata;w.x=w.xScale(w),w.calcdata.columnDragInProgress=!1,ift(b,w,0),ZMr(t,_,_.columns.map(function(M){return M.xIndex}))})),u.each(function(w){woe.setClipUrl(Ms.select(this),tft(t,w),t)});var c=u.selectAll("."+Ti.cn.columnBlock).data(aft.splitToPanels,Po.keyFun);c.enter().append("g").classed(Ti.cn.columnBlock,!0).attr("id",function(w){return w.key}),c.style("cursor",function(w){return w.dragHandle?"ew-resize":w.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(KMr),h=c.filter(Eoe);i&&h.call(Ms.behavior.drag().origin(function(w){return Ms.event.stopPropagation(),w}).on("drag",uO(t,a,-1)).on("dragend",function(){})),Toe(t,a,f,c),Toe(t,a,h,c);var d=a.selectAll("."+Ti.cn.scrollAreaClip).data(Po.repeat,Po.keyFun);d.enter().append("clipPath").classed(Ti.cn.scrollAreaClip,!0).attr("id",function(w){return eft(t,w)});var p=d.selectAll("."+Ti.cn.scrollAreaClipRect).data(Po.repeat,Po.keyFun);p.enter().append("rect").classed(Ti.cn.scrollAreaClipRect,!0).attr("x",-Ti.overdrag).attr("y",-Ti.uplift).attr("fill","none"),p.attr("width",function(w){return w.width+2*Ti.overdrag}).attr("height",function(w){return w.height+Ti.uplift});var v=u.selectAll("."+Ti.cn.columnBoundary).data(Po.repeat,Po.keyFun);v.enter().append("g").classed(Ti.cn.columnBoundary,!0);var m=u.selectAll("."+Ti.cn.columnBoundaryClippath).data(Po.repeat,Po.keyFun);m.enter().append("clipPath").classed(Ti.cn.columnBoundaryClippath,!0),m.attr("id",function(w){return tft(t,w)});var g=m.selectAll("."+Ti.cn.columnBoundaryRect).data(Po.repeat,Po.keyFun);g.enter().append("rect").classed(Ti.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(w){return w.columnWidth+2*lO(w)}).attr("height",function(w){return w.calcdata.height+2*lO(w)+Ti.uplift}).attr("x",function(w){return-lO(w)}).attr("y",function(w){return-lO(w)}),koe(null,h,a)};function lO(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function eft(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function tft(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function oft(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function q8(e,t,r){function i(u){var c=u.rowBlocks;return Moe(c,c.length-1)+(c.length?cO(c[c.length-1],1/0):1)}var n=e.selectAll("."+Ti.cn.scrollbarKit).data(Po.repeat,Po.keyFun);n.enter().append("g").classed(Ti.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),n.each(function(u){var c=u.scrollbarState;c.totalHeight=i(u),c.scrollableAreaHeight=u.groupHeight-Aoe(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ti.goldenRatio*Ti.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+Ti.scrollbarWidth/2+Ti.scrollbarOffset;return ap(c,Aoe(u))});var a=n.selectAll("."+Ti.cn.scrollbar).data(Po.repeat,Po.keyFun);a.enter().append("g").classed(Ti.cn.scrollbar,!0);var o=a.selectAll("."+Ti.cn.scrollbarSlider).data(Po.repeat,Po.keyFun);o.enter().append("g").classed(Ti.cn.scrollbarSlider,!0),o.attr("transform",function(u){return ap(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ti.cn.scrollbarGlyph).data(Po.repeat,Po.keyFun);s.enter().append("line").classed(Ti.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ti.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ti.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ti.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(Ti.scrollbarHideDelay).duration(Ti.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ti.cn.scrollbarCaptureZone).data(Po.repeat,Po.keyFun);l.enter().append("line").classed(Ti.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ti.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=Ms.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,p=Ms.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||uO(t,e,null,p(d-h.barLength/2))(u)}).call(Ms.behavior.drag().origin(function(u){return Ms.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",uO(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function Toe(e,t,r,i){var n=UMr(r),a=VMr(n);$Mr(a);var o=GMr(a);YMr(o);var s=jMr(a),l=HMr(s);WMr(l),sft(l,t,i,e),Coe(a)}function UMr(e){var t=e.selectAll("."+Ti.cn.columnCells).data(Po.repeat,Po.keyFun);return t.enter().append("g").classed(Ti.cn.columnCells,!0),t.exit().remove(),t}function VMr(e){var t=e.selectAll("."+Ti.cn.columnCell).data(aft.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ti.cn.columnCell,!0),t.exit().remove(),t}function GMr(e){var t=e.selectAll("."+Ti.cn.cellRect).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ti.cn.cellRect,!0),t}function HMr(e){var t=e.selectAll("."+Ti.cn.cellText).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ti.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Ms.event.stopPropagation()}),t}function jMr(e){var t=e.selectAll("."+Ti.cn.cellTextHolder).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ti.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function $Mr(e){e.each(function(t,r){var i=t.calcdata.cells.font,n=t.column.specIndex,a={size:qf(i.size,n,r),color:qf(i.color,n,r),family:qf(i.family,n,r),weight:qf(i.weight,n,r),style:qf(i.style,n,r),variant:qf(i.variant,n,r),textcase:qf(i.textcase,n,r),lineposition:qf(i.lineposition,n,r),shadow:qf(i.shadow,n,r)};t.rowNumber=t.key,t.align=qf(t.calcdata.cells.align,n,r),t.cellBorderWidth=qf(t.calcdata.cells.line.width,n,r),t.font=a})}function WMr(e){e.each(function(t){woe.font(Ms.select(this),t.font)})}function YMr(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Ms.select(this);Qct.stroke(r,qf(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),Qct.fill(r,qf(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function sft(e,t,r,i){e.text(function(n){var a=n.column.specIndex,o=n.rowNumber,s=n.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;n.mayHaveMarkup=l&&s.match(/[<&>]/);var f=XMr(s);n.latex=f;var h=f?"":qf(n.calcdata.cells.prefix,a,o)||"",d=f?"":qf(n.calcdata.cells.suffix,a,o)||"",p=f?null:qf(n.calcdata.cells.format,a,o)||null,v=h+(p?zMr(p)(n.value):n.value)+d,m;n.wrappingNeeded=!n.wrapped&&!c&&!f&&(m=rft(v)),n.cellHeightMayIncrease=u||f||n.mayHaveMarkup||(m===void 0?rft(v):m),n.needsConvertToTspans=n.mayHaveMarkup||n.wrappingNeeded||n.latex;var g;if(n.wrappingNeeded){var w=Ti.wrapSplitCharacter===" "?v.replace(/n&&i.push(a),n+=l}return i}function koe(e,t,r){var i=oft(t)[0];if(i!==void 0){var n=i.rowBlocks,a=i.calcdata,o=Moe(n,n.length),s=i.calcdata.groupHeight-Aoe(i),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=JMr(n,l,s);u.length===1&&(u[0]===n.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=Moe(c.rowBlocks,c.page)-c.scrollY;return ap(0,f)}),e&&(nft(e,r,t,u,i.prevPages,i,0),nft(e,r,t,u,i.prevPages,i,1),q8(r,e))}}function uO(e,t,r,i){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=i===void 0?o.scrollY+l*Ms.event.dy:i;var c=s.selectAll("."+Ti.cn.yColumn).selectAll("."+Ti.cn.columnBlock).filter(Eoe);return koe(e,c,s),o.scrollY===u}}function nft(e,t,r,i,n,a,o){var s=i[o]!==n[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&i[c]!==n[c]});Toe(e,t,l,r),n[o]=i[o]}))}function QMr(e,t,r,i){return function(){var a=Ms.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(v,m){s[m].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,p=o.column.columnWidth-2*Ti.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>p&&(o.value+=c.join(Ti.wrapSpacer)+Ti.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ti.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),sft(a.select("."+Ti.cn.cellText),r,e,i),Ms.select(t.parentNode.parentNode).call(Coe)}}function eSr(e,t,r,i,n){return function(){if(!n.settledY){var o=Ms.select(t.parentNode),s=Soe(n),l=n.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=n.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ti.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ti.cn.columnCell).call(Coe),koe(null,e.filter(Eoe),0),q8(r,i,!0)),o.attr("transform",function(){var d=this,p=d.parentNode,v=p.getBoundingClientRect(),m=Ms.select(d.parentNode).select("."+Ti.cn.cellRect).node().getBoundingClientRect(),g=d.transform.baseVal.consolidate(),w=m.top-v.top+(g?g.matrix.f:Ti.cellPad);return ap(lft(n,Ms.select(d.parentNode).select("."+Ti.cn.cellTextHolder).node().getBoundingClientRect().width),w)}),n.settledY=!0}}}function lft(e,t){switch(e.align){case"left":return Ti.cellPad;case"right":return e.column.columnWidth-(t||0)-Ti.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ti.cellPad}}function Coe(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+cO(s,1/0)},0),i=Soe(t),n=cO(i,t.key),a=n+r;return ap(0,a)}).selectAll("."+Ti.cn.cellRect).attr("height",function(t){return rSr(Soe(t),t.key).rowHeight})}function Moe(e,t){for(var r=0,i=t-1;i>=0;i--)r+=tSr(e[i]);return r}function cO(e,t){for(var r=0,i=0;i{"use strict";var iSr=_c().getModuleCalcData,nSr=Doe(),fO="table";hO.name=fO;hO.plot=function(e){var t=iSr(e.calcdata,fO)[0];t.length&&nSr(e,t)};hO.clean=function(e,t,r,i){var n=i._has&&i._has(fO),a=t._has&&t._has(fO);n&&!a&&i._paperdiv.selectAll(".table").remove()}});var hft=W((sii,fft)=>{"use strict";fft.exports={attributes:poe(),supplyDefaults:Oct(),calc:Uct(),plot:Doe(),moduleType:"trace",name:"table",basePlotModule:cft(),categories:["noOpacity"],meta:{}}});var pft=W((lii,dft)=>{"use strict";dft.exports=hft()});var xft=W((uii,yft)=>{"use strict";var vft=Ho(),gft=Vl(),Foe=ec(),aSr=_s().descriptionWithDates,oSr=ls().overrideAll,mft=Du().dash,Loe=tn().extendFlat;yft.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:vft({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:Foe.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:Loe({},Foe.labelalias,{editType:"calc"}),tickfont:vft({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:aSr("tick label")},tickformatstops:oSr(Foe.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:gft.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:Loe({},mft,{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:Loe({},mft,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:gft.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 pO=W((cii,wft)=>{"use strict";var sSr=Ho(),_ft=xft(),bft=Vl(),dO=sSr({editType:"calc"}),lSr=Ns().zorder;dO.family.dflt='"Open Sans", verdana, arial, sans-serif';dO.size.dflt=12;dO.color.dflt=bft.defaultLine;wft.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:_ft,baxis:_ft,font:dO,color:{valType:"color",dflt:bft.defaultLine,editType:"plot"},zorder:lSr}});var Mft=W((fii,Aft)=>{"use strict";var Tft=it().isArray1D;Aft.exports=function(t,r,i){var n=i("x"),a=n&&n.length,o=i("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!n,(!a||Tft(n))&&(!s||Tft(o))){var l=a?n.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 kft=W((hii,Eft)=>{"use strict";var uSr=pO(),Sft=ni().addOpacity,cSr=yi(),O8=it(),fSr=Xx(),hSr=wy(),dSr=Ty(),pSr=_F(),vSr=i1(),gSr=bw();Eft.exports=function(t,r,i){var n=i.letter,a=i.font||{},o=uSr[n+"axis"];function s(y,E){return O8.coerce(t,r,o,y,E)}function l(y,E){return O8.coerce2(t,r,o,y,E)}i.name&&(r._name=i.name,r._id=i.name),s("autotypenumbers",i.autotypenumbersDflt);var u=s("type");if(u==="-"&&(i.data&&mSr(r,i.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",n+" = "),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=n,u==="date"){var c=cSr.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",i.calendar)}vSr(r,i.fullLayout),r.c2p=O8.identity;var f=s("color",i.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(O8.coerceFont(s,"title.font",a,{overrideDflt:{size:O8.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),fSr(t,r,s,u),dSr(t,r,s,u,i),hSr(t,r,s,u,i),pSr(t,r,s,{data:i.data,dataAttr:n});var v=s("gridcolor",Sft(f,.3)),m=l("gridwidth"),g=l("griddash"),w=s("showgrid");w||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var b=l("startlinecolor",f),_=l("startlinewidth",m),M=s("startline",r.showgrid||!!b||!!_);M||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),T=l("endlinewidth",m),A=s("endline",r.showgrid||!!x||!!T);return A||(delete r.endlinecolor,delete r.endlinewidth),w?(s("minorgridcount"),s("minorgridwidth",m),s("minorgriddash",g),s("minorgridcolor",Sft(v,.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 mSr(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n=i+"calendar",a=e[n];e.type=gSr(t,a,{autotypenumbers:e.autotypenumbers})}}});var Dft=W((dii,Cft)=>{"use strict";var ySr=kft(),xSr=Da();Cft.exports=function(t,r,i,n,a){var o=n("a");o||(n("da"),n("a0"));var s=n("b");s||(n("db"),n("b0")),_Sr(t,r,i,a)};function _Sr(e,t,r,i){var n=["aaxis","baxis"];n.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=xSr.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:i,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};ySr(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var Pft=W((pii,Lft)=>{"use strict";var Fft=it(),bSr=Mft(),wSr=Dft(),TSr=pO(),ASr=Vl();Lft.exports=function(t,r,i,n){function a(l,u){return Fft.coerce(t,r,TSr,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",ASr.defaultLine);if(Fft.coerceFont(a,"font",n.font),a("carpet"),wSr(t,r,n,a,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=bSr(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var Poe=W((vii,Ift)=>{"use strict";var MSr=it().isArrayOrTypedArray;Ift.exports=function(t,r,i){var n;for(MSr(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],n=0;n{"use strict";Rft.exports=function(t,r,i){if(t.length===0)return"";var n,a=[],o=i?3:1;for(n=0;n{"use strict";zft.exports=function(t,r,i,n,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(i),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}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(n,r,i),offsetMultplier:c}}});var jft=W((yii,Hft)=>{"use strict";var yO=vi(),vO=Ji(),gO=Poe(),Nft=Ioe(),N8=Bft(),Roe=uo(),t0=it(),Uft=t0.strRotate,mO=t0.strTranslate,Vft=Hl();Hft.exports=function(t,r,i,n){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;t0.makeTraceGroups(n,i,"trace").each(function(c){var f=yO.select(this),h=c[0],d=h.trace,p=d.aaxis,v=d.baxis,m=t0.ensureSingle(f,"g","minorlayer"),g=t0.ensureSingle(f,"g","majorlayer"),w=t0.ensureSingle(f,"g","boundarylayer"),b=t0.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),a6(o,s,g,p,"a",p._gridlines,!0,a),a6(o,s,g,v,"b",v._gridlines,!0,a),a6(o,s,m,p,"a",p._minorgridlines,!0,a),a6(o,s,m,v,"b",v._minorgridlines,!0,a),a6(o,s,w,p,"a-boundary",p._boundarylines,a),a6(o,s,w,v,"b-boundary",v._boundarylines,a);var _=qft(t,o,s,d,h,b,p._labels,"a-label"),M=qft(t,o,s,d,h,b,v._labels,"b-label");ESr(t,b,d,h,o,s,_,M),SSr(d,h,u,o,s)})};function SSr(e,t,r,i,n){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=t0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(vO.font,f.font).text(f.text).call(Roe.convertToTspans,e),g=vO.bBox(this);m.attr("transform",mO(d.p[0],d.p[1])+Uft(d.angle)+mO(f.axis.labelpadding*v,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function ESr(e,t,r,i,n,a,o,s){var l,u,c,f,h=t0.aggNums(Math.min,null,r.a),d=t0.aggNums(Math.max,null,r.a),p=t0.aggNums(Math.min,null,r.b),v=t0.aggNums(Math.max,null,r.b);l=.5*(h+d),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&t0.extendFlat(o,N8(r,n,a,c,r.dxydb_rough(l,u))),Oft(e,t,r,i,c,f,r.aaxis,n,a,o,"a-title"),l=h,u=.5*(p+v),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&t0.extendFlat(s,N8(r,n,a,c,r.dxyda_rough(l,u))),Oft(e,t,r,i,c,f,r.baxis,n,a,s,"b-title")}var Gft=Vft.LINE_SPACING,kSr=(1-Vft.MID_SHIFT)/Gft+1;function Oft(e,t,r,i,n,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var p=N8(r,s,l,n,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var v=o.title.font.size;d+=v+o.title.offset;var m=u.angle+(u.flip<0?180:0),g=(m-p.angle+450)%360,w=g>90&&g<270,b=yO.select(this);b.text(o.title.text).call(Roe.convertToTspans,e),w&&(d=(-Roe.lineCount(b)+kSr)*Gft*v-d),b.attr("transform",mO(p.p[0],p.p[1])+Uft(p.angle)+mO(0,d)).attr("text-anchor","middle").call(vO.font,o.title.font)}),h.exit().remove()}});var Wft=W((xii,$ft)=>{"use strict";var xO=it().isArrayOrTypedArray;$ft.exports=function(e,t,r){var i,n,a,o,s,l,u=[],c=xO(e)?e.length:e,f=xO(t)?t.length:t,h=xO(e)?e:null,d=xO(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var p,v=1/0,m=-1/0;for(n=0;n{"use strict";var Yft=it().isArrayOrTypedArray;Zft.exports=function(e){return Xft(e,0)};function Xft(e,t){if(!Yft(e)||t>=10)return null;for(var r=1/0,i=-1/0,n=e.length,a=0;a{"use strict";var CSr=ji(),fx=tn().extendFlat;Jft.exports=function(t,r,i){var n,a,o,s,l,u,c,f,h,d,p,v,m,g,w=t["_"+r],b=t[r+"axis"],_=b._gridlines=[],M=b._minorgridlines=[],x=b._boundarylines=[],T=t["_"+i],A=t[i+"axis"];b.tickmode==="array"&&(b.tickvals=w.slice());var y=t._xctrl,E=t._yctrl,S=y[0].length,C=y.length,k=t._a.length,D=t._b.length;CSr.prepTicks(b),b.tickmode==="array"&&delete b.tickvals;var F=b.smoothing?3:1;function P(L){var I,B,O,$,Y,K,j,q,J,U,V,X,H=[],G=[],Q={};if(r==="b")for(B=t.b2j(L),O=Math.floor(Math.max(0,Math.min(D-2,B))),$=B-O,Q.length=D,Q.crossLength=k,Q.xy=function(te){return t.evalxy([],te,B)},Q.dxy=function(te,ce){return t.dxydi([],te,O,ce,$)},I=0;I0&&(J=t.dxydi([],I-1,O,0,$),H.push(Y[0]+J[0]/3),G.push(Y[1]+J[1]/3),U=t.dxydi([],I-1,O,1,$),H.push(q[0]-U[0]/3),G.push(q[1]-U[1]/3)),H.push(q[0]),G.push(q[1]),Y=q;else for(I=t.a2i(L),K=Math.floor(Math.max(0,Math.min(k-2,I))),j=I-K,Q.length=k,Q.crossLength=D,Q.xy=function(te){return t.evalxy([],I,te)},Q.dxy=function(te,ce){return t.dxydj([],K,te,j,ce)},B=0;B0&&(V=t.dxydj([],K,B-1,j,0),H.push(Y[0]+V[0]/3),G.push(Y[1]+V[1]/3),X=t.dxydj([],K,B-1,j,1),H.push(q[0]-X[0]/3),G.push(q[1]-X[1]/3)),H.push(q[0]),G.push(q[1]),Y=q;return Q.axisLetter=r,Q.axis=b,Q.crossAxis=A,Q.value=L,Q.constvar=i,Q.index=f,Q.x=H,Q.y=G,Q.smoothing=A.smoothing,Q}function R(L){var I,B,O,$,Y,K=[],j=[],q={};if(q.length=w.length,q.crossLength=T.length,r==="b")for(O=Math.max(0,Math.min(D-2,L)),Y=Math.min(1,Math.max(0,L-O)),q.xy=function(J){return t.evalxy([],J,L)},q.dxy=function(J,U){return t.dxydi([],J,O,U,Y)},I=0;Iw.length-1)&&_.push(fx(R(a),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u;fw.length-1)&&!(p<0||p>w.length-1))for(v=w[o],m=w[p],n=0;nw[w.length-1])&&M.push(fx(P(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&x.push(fx(R(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&x.push(fx(R(w.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((w[w.length-1]-b.tick0)/b.dtick*(1+s)),Math.ceil((w[0]-b.tick0)/b.dtick/(1+s))].sort(function(L,I){return L-I}),u=l[0],c=l[1],f=u;f<=c;f++)h=b.tick0+b.dtick*f,_.push(fx(P(h),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u-1;fw[w.length-1])&&M.push(fx(P(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&x.push(fx(P(w[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&x.push(fx(P(w[w.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}});var iht=W((wii,rht)=>{"use strict";var eht=ji(),tht=tn().extendFlat;rht.exports=function(t,r){var i,n,a,o,s,l=r._labels=[],u=r._gridlines;for(i=0;i{"use strict";nht.exports=function(t,r,i,n){var a,o,s,l=[],u=!!i.smoothing,c=!!n.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var sht=W((Aii,oht)=>{"use strict";var DSr=it();oht.exports=function(t,r,i){var n,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(O,$){var Y=0,K,j=0;return O>0&&(K=t[$][O-1])!==void 0&&(j++,Y+=K),O0&&(K=t[$-1][O])!==void 0&&(j++,Y+=K),$0&&a0&&nA);return DSr.log("Smoother converged to",y,"after",S,"iterations"),t}});var uht=W((Mii,lht)=>{"use strict";lht.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var hht=W((Sii,fht)=>{"use strict";var cht=.5;fht.exports=function(t,r,i,n){var a=t[0]-r[0],o=t[1]-r[1],s=i[0]-r[0],l=i[1]-r[1],u=Math.pow(a*a+o*o,cht/2),c=Math.pow(s*s+l*l,cht/2),f=(c*c*a-u*u*s)*n,h=(c*c*o-u*u*l)*n,d=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(p&&f/p),r[1]-(p&&h/p)]]}});var pht=W((Eii,dht)=>{"use strict";var zoe=hht(),_O=it().ensureArray;function o6(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]}dht.exports=function(t,r,i,n,a,o){var s,l,u,c,f,h,d,p,v,m,g=i[0].length,w=i.length,b=a?3*g-2:g,_=o?3*w-2:w;for(t=_O(t,_),r=_O(r,_),u=0;u<_;u++)t[u]=_O(t[u],b),r[u]=_O(r[u],b);for(l=0,c=0;l{"use strict";vht.exports=function(e,t,r,i,n){var a=t-2,o=r-2;return i&&n?function(s,l,u){s||(s=[]);var c,f,h,d,p,v,m=Math.max(0,Math.min(Math.floor(l),a)),g=Math.max(0,Math.min(Math.floor(u),o)),w=Math.max(0,Math.min(1,l-m)),b=Math.max(0,Math.min(1,u-g));m*=3,g*=3;var _=w*w,M=_*w,x=1-w,T=x*x,A=T*x,y=b*b,E=y*b,S=1-b,C=S*S,k=C*S;for(v=0;v{"use strict";mht.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;n*=3,a*=3;var p=o*o,v=1-o,m=v*v,g=v*o*2,w=-3*m,b=3*(m-g),_=3*(g-p),M=3*p,x=s*s,T=x*s,A=1-s,y=A*A,E=y*A;for(d=0;d{"use strict";xht.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;n*=3,a*=3;var p=o*o,v=p*o,m=1-o,g=m*m,w=g*m,b=s*s,_=1-s,M=_*_,x=_*s*2,T=-3*M,A=3*(M-x),y=3*(x-b),E=3*b;for(d=0;d{"use strict";var bht=uht(),wht=ZC().findBin,FSr=pht(),LSr=ght(),PSr=yht(),ISr=_ht();Tht.exports=function(t){var r=t._a,i=t._b,n=r.length,a=i.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[n-1],c=i[0],f=i[a-1],h=r[r.length-1]-r[0],d=i[i.length-1]-i[0],p=h*bht.RELATIVE_CULL_TOLERANCE,v=d*bht.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=v,f+=v,t.isVisible=function(m,g){return m>l&&mc&&gu||gf},t.setScale=function(){var m=t._x,g=t._y,w=FSr(t._xctrl,t._yctrl,m,g,o.smoothing,s.smoothing);t._xctrl=w[0],t._yctrl=w[1],t.evalxy=LSr([t._xctrl,t._yctrl],n,a,o.smoothing,s.smoothing),t.dxydi=PSr([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=ISr([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(m){var g=Math.max(0,Math.floor(m[0]),n-2),w=m[0]-g;return(1-w)*r[g]+w*r[g+1]},t.j2b=function(m){var g=Math.max(0,Math.floor(m[1]),n-2),w=m[1]-g;return(1-w)*i[g]+w*i[g+1]},t.ij2ab=function(m){return[t.i2a(m[0]),t.j2b(m[1])]},t.a2i=function(m){var g=Math.max(0,Math.min(wht(m,r),n-2)),w=r[g],b=r[g+1];return Math.max(0,Math.min(n-1,g+(m-w)/(b-w)))},t.b2j=function(m){var g=Math.max(0,Math.min(wht(m,i),a-2)),w=i[g],b=i[g+1];return Math.max(0,Math.min(a-1,g+(m-w)/(b-w)))},t.ab2ij=function(m){return[t.a2i(m[0]),t.b2j(m[1])]},t.i2c=function(m,g){return t.evalxy([],m,g)},t.ab2xy=function(m,g,w){if(!w&&(mr[n-1]|gi[a-1]))return[!1,!1];var b=t.a2i(m),_=t.b2j(g),M=t.evalxy([],b,_);if(w){var x=0,T=0,A=[],y,E,S,C;mr[n-1]?(y=n-2,E=1,x=(m-r[n-1])/(r[n-1]-r[n-2])):(y=Math.max(0,Math.min(n-2,Math.floor(b))),E=b-y),gi[a-1]?(S=a-2,C=1,T=(g-i[a-1])/(i[a-1]-i[a-2])):(S=Math.max(0,Math.min(a-2,Math.floor(_))),C=_-S),x&&(t.dxydi(A,y,S,E,C),M[0]+=A[0]*x,M[1]+=A[1]*x),T&&(t.dxydj(A,y,S,E,C),M[0]+=A[0]*T,M[1]+=A[1]*T)}return M},t.c2p=function(m,g,w){return[g.c2p(m[0]),w.c2p(m[1])]},t.p2x=function(m,g,w){return[g.p2c(m[0]),w.p2c(m[1])]},t.dadi=function(m){var g=Math.max(0,Math.min(r.length-2,m));return r[g+1]-r[g]},t.dbdj=function(m){var g=Math.max(0,Math.min(i.length-2,m));return i[g+1]-i[g]},t.dxyda=function(m,g,w,b){var _=t.dxydi(null,m,g,w,b),M=t.dadi(m,w);return[_[0]/M,_[1]/M]},t.dxydb=function(m,g,w,b){var _=t.dxydj(null,m,g,w,b),M=t.dbdj(g,b);return[_[0]/M,_[1]/M]},t.dxyda_rough=function(m,g,w){var b=h*(w||.1),_=t.ab2xy(m+b,g,!0),M=t.ab2xy(m-b,g,!0);return[(_[0]-M[0])*.5/b,(_[1]-M[1])*.5/b]},t.dxydb_rough=function(m,g,w){var b=d*(w||.1),_=t.ab2xy(m,g+b,!0),M=t.ab2xy(m,g-b,!0);return[(_[0]-M[0])*.5/b,(_[1]-M[1])*.5/b]},t.dpdx=function(m){return m._m},t.dpdy=function(m){return m._m}}});var Lht=W((Lii,Fht)=>{"use strict";var bO=ji(),Mht=it().isArray1D,RSr=Wft(),Sht=Kft(),Eht=Qft(),kht=iht(),zSr=aht(),Cht=xL(),Dht=sht(),BSr=mL(),qSr=Aht();Fht.exports=function(t,r){var i=bO.getFromId(t,r.xaxis),n=bO.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&Mht(s)&&u.push("x"),l&&Mht(l)&&u.push("y"),u.length&&BSr(r,a,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 h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=RSr(d,p,r.cheaterslope)}r._x=s=Cht(s),r._y=l=Cht(l),Dht(s,c,f),Dht(l,c,f),qSr(r),r.setScale();var v=Sht(s),m=Sht(l),g=.5*(v[1]-v[0]),w=.5*(v[1]+v[0]),b=.5*(m[1]-m[0]),_=.5*(m[1]+m[0]),M=1.3;return v=[w-g*M,w+g*M],m=[_-b*M,_+b*M],r._extremes[i._id]=bO.findExtremes(i,v,{padded:!0}),r._extremes[n._id]=bO.findExtremes(n,m,{padded:!0}),Eht(r,"a","b"),Eht(r,"b","a"),kht(r,a),kht(r,o),h.clipsegments=zSr(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var Iht=W((Pii,Pht)=>{"use strict";Pht.exports={attributes:pO(),supplyDefaults:Pft(),plot:jft(),calc:Lht(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:dl(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var zht=W((Iii,Rht)=>{"use strict";Rht.exports=Iht()});var Boe=W((Rii,Nht)=>{"use strict";var OSr=g1(),U0=Ns(),NSr=Wa(),{hovertemplateAttrs:USr,texttemplateAttrs:VSr,templatefallbackAttrs:Bht}=Ga(),qht=Eo(),hx=tn().extendFlat,op=U0.marker,s6=U0.line,Oht=op.line;Nht.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:hx({},U0.mode,{dflt:"markers"}),text:hx({},U0.text,{}),texttemplate:VSr({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:Bht({editType:"plot"}),hovertext:hx({},U0.hovertext,{}),line:{color:s6.color,width:s6.width,dash:s6.dash,backoff:s6.backoff,shape:hx({},s6.shape,{values:["linear","spline"]}),smoothing:s6.smoothing,editType:"calc"},connectgaps:U0.connectgaps,fill:hx({},U0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:OSr(),marker:hx({symbol:op.symbol,opacity:op.opacity,maxdisplayed:op.maxdisplayed,angle:op.angle,angleref:op.angleref,standoff:op.standoff,size:op.size,sizeref:op.sizeref,sizemin:op.sizemin,sizemode:op.sizemode,line:hx({width:Oht.width,dash:Oht.dash,editType:"calc"},qht("marker.line")),gradient:op.gradient,editType:"calc"},qht("marker")),textfont:U0.textfont,textposition:U0.textposition,selected:U0.selected,unselected:U0.unselected,hoverinfo:hx({},NSr.hoverinfo,{flags:["a","b","text","name"]}),hoveron:U0.hoveron,hovertemplate:USr(),hovertemplatefallback:Bht(),zorder:U0.zorder}});var Hht=W((zii,Ght)=>{"use strict";var Uht=it(),GSr=v1(),l6=$o(),HSr=bd(),jSr=jp(),Vht=Nw(),$Sr=$p(),WSr=y1(),YSr=Boe();Ght.exports=function(t,r,i,n){function a(h,d){return Uht.coerce(t,r,YSr,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";jht.exports=function(t,r){var i={},n=r._carpet,a=n.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=n.evalxy([],o,l,s,u);return i.yLabel=c[1].toFixed(3),i}});var wO=W((qii,Wht)=>{"use strict";Wht.exports=function(e,t){for(var r=e._fullData.length,i,n=0;n{"use strict";var Yht=sn(),XSr=wd(),ZSr=x1(),KSr=w0(),JSr=Td().calcMarkerSize,QSr=wO();Xht.exports=function(t,r){var i=r._carpetTrace=QSr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){var n;r.xaxis=i.xaxis,r.yaxis=i.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(n=0;n{"use strict";var eEr=$w(),Kht=ji(),tEr=Ji();Jht.exports=function(t,r,i,n){var a,o,s,l=i[0][0].carpet,u=Kht.getFromId(t,l.xaxis||"x"),c=Kht.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var rEr=Zw(),iEr=it().fillText;e0t.exports=function(t,r,i,n){var a=rEr(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[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),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,p=h._module.formatLabels(f,h);o.yLabel=p.yLabel,delete o.text;var v=[];function m(b,_){var M;b.labelprefix&&b.labelprefix.length>0?M=b.labelprefix.replace(/ = $/,""):M=b._hovertitle,v.push(M+": "+_.toFixed(3)+b.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,w=g.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&m(d.aaxis,f.a),w.indexOf("b")!==-1&&m(d.baxis,f.b),v.push("y: "+o.yLabel),w.indexOf("text")!==-1&&iEr(f,h,v),o.extraText=v.join("
")}return a}});var i0t=W((Vii,r0t)=>{"use strict";r0t.exports=function(t,r,i,n,a){var o=n[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var a0t=W((Gii,n0t)=>{"use strict";n0t.exports={attributes:Boe(),supplyDefaults:Hht(),colorbar:Ac(),formatLabels:$ht(),calc:Zht(),plot:Qht(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:t0t(),selectPoints:w_(),eventData:i0t(),moduleType:"trace",name:"scattercarpet",basePlotModule:dl(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var s0t=W((Hii,o0t)=>{"use strict";o0t.exports=a0t()});var qoe=W((jii,l0t)=>{"use strict";var sp=p5(),Um=GM(),nEr=Eo(),aEr=tn().extendFlat,og=Um.contours;l0t.exports=aEr({carpet:{valType:"string",editType:"calc"},z:sp.z,a:sp.x,a0:sp.x0,da:sp.dx,b:sp.y,b0:sp.y0,db:sp.dy,text:sp.text,hovertext:sp.hovertext,transpose:sp.transpose,atype:sp.xtype,btype:sp.ytype,fillcolor:Um.fillcolor,autocontour:Um.autocontour,ncontours:Um.ncontours,contours:{type:og.type,start:og.start,end:og.end,size:og.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:og.showlines,showlabels:og.showlabels,labelfont:og.labelfont,labelformat:og.labelformat,operation:og.operation,value:og.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Um.line.color,width:Um.line.width,dash:Um.line.dash,smoothing:Um.line.smoothing,editType:"plot"},zorder:Um.zorder},nEr("",{cLetter:"z",autoColorDflt:!1}))});var Ooe=W(($ii,f0t)=>{"use strict";var u0t=it(),oEr=pL(),c0t=qoe(),sEr=JW(),lEr=qL(),uEr=OL();f0t.exports=function(t,r,i,n){function a(u,c){return u0t.coerce(t,r,c0t,u,c)}function o(u){return u0t.coerce2(t,r,c0t,u)}if(a("carpet"),t.a&&t.b){var s=oEr(t,r,a,n,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?sEr(t,r,a,n,i,{hasHover:!1}):(lEr(t,r,a,o),uEr(t,r,a,n,{hasHover:!1}))}else r._defaultColor=i,r._length=null;a("zorder")}});var v0t=W((Wii,p0t)=>{"use strict";var cEr=Zc(),h0t=it(),fEr=mL(),hEr=xL(),dEr=_L(),pEr=bL(),d0t=bW(),vEr=Ooe(),gEr=wO(),mEr=NW();p0t.exports=function(t,r){var i=r._carpetTrace=gEr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){if(!r.a||!r.b){var n=t.data[i.index],a=t.data[r.index];a.a||(a.a=n.a),a.b||(a.b=n.b),vEr(a,r,r._defaultColor,t._fullLayout)}var o=yEr(t,r);return mEr(r,r._z),o}};function yEr(e,t){var r=t._carpetTrace,i=r.aaxis,n=r.baxis,a,o,s,l,u,c,f;i._minDtick=0,n._minDtick=0,h0t.isArray1D(t.z)&&fEr(t,i,n,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?i.makeCalcdata(t,"_a"):[],l=l?n.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=hEr(t._z||t.z,t.transpose),t._emptypoints=pEr(f),dEr(f,t._emptypoints);var h=h0t.maxRowLength(f),d=t.xtype==="scaled"?"":a,p=d0t(t,d,o,s,h,i),v=t.ytype==="scaled"?"":l,m=d0t(t,v,u,c,f.length,n),g={a:p,b:m,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&cEr(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var m0t=W((Yii,g0t)=>{"use strict";var xEr=it().isArrayOrTypedArray;g0t.exports=function(e,t,r,i){var n,a,o,s,l,u,c,f,h,d,p,v,m,g=xEr(r)?"a":"b",w=g==="a"?e.aaxis:e.baxis,b=w.smoothing,_=g==="a"?e.a2i:e.b2j,M=g==="a"?r:i,x=g==="a"?i:r,T=g==="a"?t.a.length:t.b.length,A=g==="a"?t.b.length:t.a.length,y=Math.floor(g==="a"?e.b2j(x):e.a2i(x)),E=g==="a"?function($){return e.evalxy([],$,y)}:function($){return e.evalxy([],y,$)};b&&(o=Math.max(0,Math.min(A-2,y)),s=y-o,a=g==="a"?function($,Y){return e.dxydi([],$,o,Y,s)}:function($,Y){return e.dxydj([],o,$,s,Y)});var S=_(M[0]),C=_(M[1]),k=S0?Math.floor:Math.ceil,P=k>0?Math.ceil:Math.floor,R=k>0?Math.min:Math.max,L=k>0?Math.max:Math.min,I=F(S+D),B=P(C-D);c=E(S);var O=[[c]];for(n=I;n*k{"use strict";var AO=vi(),MO=Poe(),w0t=Ioe(),U8=Ji(),Vm=it(),_Er=VW(),bEr=GW(),b3=VL(),TO=jM(),wEr=WW(),TEr=$W(),AEr=YW(),MEr=wO(),y0t=m0t();T0t.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;Vm.makeTraceGroups(n,i,"contour").each(function(s){var l=AO.select(this),u=s[0],c=u.trace,f=c._carpetTrace=MEr(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,p=u.b,v=c.contours,m=TEr(v,r,u),g=v.type==="constraint",w=v._operation,b=g?w==="="?"lines":"fill":v.coloring;function _(F){var P=f.ab2xy(F[0],F[1],!0);return[a.c2p(P[0]),o.c2p(P[1])]}var M=[[d[0],p[p.length-1]],[d[d.length-1],p[p.length-1]],[d[d.length-1],p[0]],[d[0],p[0]]];_Er(m);var x=(d[d.length-1]-d[0])*1e-8,T=(p[p.length-1]-p[0])*1e-8;bEr(m,x,T);var A=m;v.type==="constraint"&&(A=wEr(m,w)),SEr(m,_);var y,E,S,C,k=[];for(C=h.clipsegments.length-1;C>=0;C--)y=h.clipsegments[C],E=MO([],y.x,a.c2p),S=MO([],y.y,o.c2p),E.reverse(),S.reverse(),k.push(w0t(E,S,y.bicubic));var D="M"+k.join("L")+"Z";CEr(l,h.clipsegments,a,o,g,b),DEr(c,l,a,o,A,M,_,f,h,b,D),EEr(l,m,t,u,v,r,f),U8.setClipUrl(l,f._clipPathId,t)})};function SEr(e,t){var r,i,n,a,o,s,l,u,c;for(r=0;rm&&(i.max=m),i.len=i.max-i.min}function x0t(e,t,r){var i=e.getPointAtLength(t),n=e.getPointAtLength(r),a=n.x-i.x,o=n.y-i.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function _0t(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function b0t(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),i=Math.sqrt(1-r*r);return i/r}function CEr(e,t,r,i,n,a){var o,s,l,u,c=Vm.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!n?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(d=E,v=m):Math.abs(h[1]-d[1])=0&&(d=E,v=m):Vm.log("endpt to newendpt is not vert. or horz.",h,d,E)}if(v>=0)break;u+=A(h,d),h=d}if(v===t.edgepaths.length){Vm.log("unclosed perimeter path");break}l=v,f=c.indexOf(l)===-1,f&&(l=c[0],u+=A(h,d)+"Z",h=null)}for(l=0;l{"use strict";M0t.exports={attributes:qoe(),supplyDefaults:Ooe(),colorbar:jL(),calc:v0t(),plot:A0t(),style:HL(),moduleType:"trace",name:"contourcarpet",basePlotModule:dl(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var k0t=W((Kii,E0t)=>{"use strict";E0t.exports=S0t()});var EO=W((Jii,P0t)=>{"use strict";var SO=it().extendFlat,V8=Ns(),C0t=_s().axisHoverFormat,{hovertemplateAttrs:LEr,templatefallbackAttrs:PEr}=Ga(),F0t=Du().dash,IEr=N3(),L0t=D5(),REr=L0t.INCREASING.COLOR,zEr=L0t.DECREASING.COLOR,Noe=V8.line;function D0t(e){return{line:{color:SO({},Noe.color,{dflt:e}),width:Noe.width,dash:F0t,editType:"style"},editType:"style"}}P0t.exports={xperiod:V8.xperiod,xperiod0:V8.xperiod0,xperiodalignment:V8.xperiodalignment,xhoverformat:C0t("x"),yhoverformat:C0t("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:SO({},Noe.width,{}),dash:SO({},F0t,{}),editType:"style"},increasing:D0t(REr),decreasing:D0t(zEr),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:LEr({},{keys:["open","high","low","close"]}),hovertemplatefallback:PEr(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:SO({},IEr.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:V8.zorder}});var Uoe=W((Qii,I0t)=>{"use strict";var BEr=yi(),qEr=it();I0t.exports=function(t,r,i,n){var a=i("x"),o=i("open"),s=i("high"),l=i("low"),u=i("close");i("hoverlabel.split");var c=BEr.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],n),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,qEr.minRowLength(a))),r._length=f,f}}});var B0t=W((eni,z0t)=>{"use strict";var OEr=it(),NEr=Uoe(),UEr=Hp(),VEr=EO();z0t.exports=function(t,r,i,n){function a(s,l){return OEr.coerce(t,r,VEr,s,l)}var o=NEr(t,r,a,n);if(!o){r.visible=!1;return}UEr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),R0t(t,r,a,"increasing"),R0t(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function R0t(e,t,r,i){r(i+".line.color"),r(i+".line.width",t.line.width),r(i+".line.dash",t.line.dash)}});var Voe=W((tni,O0t)=>{"use strict";var u6=it(),kO=u6._,CO=ji(),GEr=Wp(),G8=Kn().BADNUM;function HEr(e,t){var r=CO.getFromId(e,t.xaxis),i=CO.getFromId(e,t.yaxis),n=$Er(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=q0t(e,t,o,s,i,jEr);return t._extremes[r._id]=CO.findExtremes(r,s,{vpad:a/2}),l.length?(u6.extendFlat(l[0].t,{wHover:a/2,tickLen:n}),l):[{t:{empty:!0}}]}function jEr(e,t,r,i){return{o:e,h:t,l:r,c:i}}function q0t(e,t,r,i,n,a){for(var o=n.makeCalcdata(t,"open"),s=n.makeCalcdata(t,"high"),l=n.makeCalcdata(t,"low"),u=n.makeCalcdata(t,"close"),c=u6.isArrayOrTypedArray(t.text),f=u6.isArrayOrTypedArray(t.hovertext),h=!0,d=null,p=!!t.xperiodalignment,v=[],m=0;md):h=M>w,d=M;var x=a(w,b,_,M);x.pos=g,x.yc=(w+M)/2,x.i=m,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[_,b],p&&(x.orig_p=r[m]),c&&(x.tx=t.text[m]),f&&(x.htx=t.hovertext[m]),v.push(x)}else v.push({pos:g,empty:!0})}return t._extremes[n._id]=CO.findExtremes(n,u6.concat(l,s),{padded:!0}),v.length&&(v[0].t={labels:{open:kO(e,"open:")+" ",high:kO(e,"high:")+" ",low:kO(e,"low:")+" ",close:kO(e,"close:")+" "}}),v}function $Er(e,t,r){var i=r._minDiff;if(!i){var n=e._fullData,a=[];i=1/0;var o;for(o=0;o{"use strict";var WEr=vi(),N0t=it();U0t.exports=function(t,r,i,n){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;N0t.makeTraceGroups(n,i,"trace ohlc").each(function(l){var u=WEr.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,p=u.selectAll("path").data(N0t.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(v){if(v.empty)return"M0,0Z";var m=o.c2p(v.pos-d,!0),g=o.c2p(v.pos+d,!0),w=s?(m+g)/2:o.c2p(v.pos,!0),b=a.c2p(v.o,!0),_=a.c2p(v.h,!0),M=a.c2p(v.l,!0),x=a.c2p(v.c,!0);return"M"+m+","+b+"H"+w+"M"+w+","+_+"V"+M+"M"+g+","+x+"H"+w})})}});var H0t=W((ini,G0t)=>{"use strict";var Goe=vi(),YEr=Ji(),XEr=ni();G0t.exports=function(t,r,i){var n=i||Goe.select(t).selectAll("g.ohlclayer").selectAll("g.trace");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var o=a[0].trace;Goe.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;Goe.select(this).style("fill","none").call(XEr.stroke,l.color).call(YEr.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var joe=W((nni,X0t)=>{"use strict";var Hoe=ji(),ZEr=it(),DO=Ds(),KEr=ni(),JEr=it().fillText,j0t=D5(),QEr={increasing:j0t.INCREASING.SYMBOL,decreasing:j0t.DECREASING.SYMBOL};function ekr(e,t,r,i){var n=e.cd,a=n[0].trace;return a.hoverlabel.split?W0t(e,t,r,i):Y0t(e,t,r,i)}function $0t(e,t,r,i){var n=e.cd,a=e.xa,o=n[0].trace,s=n[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,p=function(E){return E.pos+d-t},v=s.bdPos||s.tickLen,m=s.wHover,g=Math.min(1,v/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function w(E){var S=p(E);return DO.inbox(S-m,S+m,f)}function b(E){var S=E[u],C=E[c];return S===C||DO.inbox(S-r,C-r,f)}function _(E){return(w(E)+b(E))/2}var M=DO.getDistanceFunction(i,w,b,_);if(DO.getClosest(n,M,e),e.index===!1)return null;var x=n[e.index];if(x.empty)return null;var T=x.dir,A=o[T],y=A.line.color;return KEr.opacity(y)&&A.line.width?e.color=y:e.color=A.fillcolor,e.x0=a.c2p(x.pos+d-v,!0),e.x1=a.c2p(x.pos+d+v,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=_(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function W0t(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=[],u=$0t(e,t,r,i);if(!u)return[];var c=n[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},p=0;p"+s.labels[v]+Hoe.hoverLabelText(a,m,o.yhoverformat)):(w=ZEr.extendFlat({},u),w.y0=w.y1=g,w.yLabelVal=m,w.yLabel=s.labels[v]+Hoe.hoverLabelText(a,m,o.yhoverformat),w.name="",l.push(w),d[m]=w)}return l}function Y0t(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=$0t(e,t,r,i);if(!l)return[];var u=l.index,c=n[u],f=l.index=c.i,h=c.dir;function d(_){return s.labels[_]+Hoe.hoverLabelText(a,o[_][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",v=p.split("+"),m=p==="all",g=m||v.indexOf("y")!==-1,w=m||v.indexOf("text")!==-1,b=g?[d("open"),d("high"),d("low"),d("close")+" "+QEr[h]]:[];return w&&JEr(c,o,b),l.extraText=b.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}X0t.exports={hoverPoints:ekr,hoverSplit:W0t,hoverOnPoints:Y0t}});var $oe=W((ani,Z0t)=>{"use strict";Z0t.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l=i[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";K0t.exports={moduleType:"trace",name:"ohlc",basePlotModule:dl(),categories:["cartesian","svg","showLegend"],meta:{},attributes:EO(),supplyDefaults:B0t(),calc:Voe().calc,plot:V0t(),style:H0t(),hoverPoints:joe().hoverPoints,selectPoints:$oe()}});var edt=W((sni,Q0t)=>{"use strict";Q0t.exports=J0t()});var Yoe=W((lni,idt)=>{"use strict";var Woe=it().extendFlat,tdt=_s().axisHoverFormat,hh=EO(),c6=IM();function rdt(e){return{line:{color:Woe({},c6.line.color,{dflt:e}),width:c6.line.width,editType:"style"},fillcolor:c6.fillcolor,editType:"style"}}idt.exports={xperiod:hh.xperiod,xperiod0:hh.xperiod0,xperiodalignment:hh.xperiodalignment,xhoverformat:tdt("x"),yhoverformat:tdt("y"),x:hh.x,open:hh.open,high:hh.high,low:hh.low,close:hh.close,line:{width:Woe({},c6.line.width,{}),editType:"style"},increasing:rdt(hh.increasing.line.color.dflt),decreasing:rdt(hh.decreasing.line.color.dflt),text:hh.text,hovertext:hh.hovertext,hovertemplate:hh.hovertemplate,hovertemplatefallback:hh.hovertemplatefallback,whiskerwidth:Woe({},c6.whiskerwidth,{dflt:0}),hoverlabel:hh.hoverlabel,zorder:c6.zorder}});var odt=W((uni,adt)=>{"use strict";var tkr=it(),rkr=ni(),ikr=Uoe(),nkr=Hp(),akr=Yoe();adt.exports=function(t,r,i,n){function a(s,l){return tkr.coerce(t,r,akr,s,l)}var o=ikr(t,r,a,n);if(!o){r.visible=!1;return}nkr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),ndt(t,r,a,"increasing"),ndt(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function ndt(e,t,r,i){var n=r(i+".line.color");r(i+".line.width",t.line.width),r(i+".fillcolor",rkr.addOpacity(n,.5))}});var cdt=W((cni,udt)=>{"use strict";var sdt=it(),ldt=ji(),okr=Wp(),skr=Voe().calcCommon;udt.exports=function(e,t){var r=e._fullLayout,i=ldt.getFromId(e,t.xaxis),n=ldt.getFromId(e,t.yaxis),a=i.makeCalcdata(t,"x"),o=okr(t,i,"x",a).vals,s=skr(e,t,a,o,n,lkr);return s.length?(sdt.extendFlat(s[0].t,{num:r._numBoxes,dPos:sdt.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function lkr(e,t,r,i){return{min:r,q1:Math.min(e,i),med:i,q3:Math.max(e,i),max:t}}});var hdt=W((fni,fdt)=>{"use strict";fdt.exports={moduleType:"trace",name:"candlestick",basePlotModule:dl(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:Yoe(),layoutAttributes:RM(),supplyLayoutDefaults:lL().supplyLayoutDefaults,crossTraceCalc:cL().crossTraceCalc,supplyDefaults:odt(),calc:cdt(),plot:fL().plot,layerName:"boxlayer",style:hL().style,hoverPoints:joe().hoverPoints,selectPoints:$oe()}});var pdt=W((hni,ddt)=>{"use strict";ddt.exports=hdt()});var Zoe=W((dni,vdt)=>{"use strict";var LO=it(),ukr=i1(),FO=LO.deg2rad,Xoe=LO.rad2deg;vdt.exports=function(t,r,i){switch(ukr(t,i),t._id){case"x":case"radialaxis":ckr(t,r);break;case"angularaxis":dkr(t,r);break}};function ckr(e,t){var r=t._subplot;e.setGeometry=function(){var i=e._rl[0],n=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(n-i),s=a/o,l=i>n?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-i;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+i-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function fkr(e,t){return t==="degrees"?FO(e):e}function hkr(e,t){return t==="degrees"?Xoe(e):e}function dkr(e,t){var r=e.type;if(r==="linear"){var i=e.d2c,n=e.c2d;e.d2c=function(a,o){return fkr(i(a),o)},e.c2d=function(a,o){return n(hkr(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(m){return e.d2c(m,a.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";gdt.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 RO=W((vni,bdt)=>{"use strict";var w3=it(),mdt=GA().tester,Koe=w3.findIndexOfMin,xdt=w3.isAngleInsideSector,pkr=w3.angleDelta,ydt=w3.angleDist;function vkr(e,t,r,i,n){if(!xdt(t,i))return!1;var a,o;r[0]0?o:1/0},i=Koe(t,r),n=w3.mod(i+1,t.length);return[t[i],t[n]]}function IO(e){return Math.abs(e)>1e-10?e:0}function Joe(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=new Array(i),a=0;a{"use strict";function wdt(e){return e<0?-1:e>0?1:0}function h6(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var i=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/i,2*r/i]}function d6(e,t){var r=t[0],i=t[1];return[r*e.radius+e.cx,-i*e.radius+e.cy]}function Tdt(e,t){return t*e.radius}function Tkr(e,t,r,i){var n=d6(e,h6([r,t])),a=n[0],o=n[1],s=d6(e,h6([i,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=Tdt(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function Akr(e,t,r,i){var n=Tdt(e,1/(t+1)),a=d6(e,h6([t,r])),o=a[0],s=a[1],l=d6(e,h6([t,i])),u=l[0],c=l[1];if(wdt(r)!==wdt(i)){var f=d6(e,h6([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+n+","+n+" 0 0,"+(0{"use strict";var T3=vi(),M3=yi(),hs=it(),sg=hs.strRotate,Gu=hs.strTranslate,OO=ni(),H8=Ji(),Mkr=Ko(),dh=ji(),Skr=i1(),Ekr=Zoe(),kkr=Op().doAutoRange,Gm=fj(),qO=bf(),Mdt=Ds(),Ckr=e_(),Dkr=cu().prepSelect,Fkr=cu().selectOnClick,ese=cu().clearOutline,Sdt=Np(),Edt=CA(),kdt=BA().redrawReglTraces,Lkr=Hl().MID_SHIFT,dx=PO(),Hm=RO(),NO=Qoe(),zO=NO.smith,Pkr=NO.reactanceArc,Ikr=NO.resistanceArc,BO=NO.smithTransform,Rkr=hs._,Cdt=hs.mod,px=hs.deg2rad,A3=hs.rad2deg;function Ddt(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 i=e._fullLayout,n="clip"+i._uid+t;this.clipIds.forTraces=n+"-for-traces",this.clipPaths.forTraces=i._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=i["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var fc=Ddt.prototype;Pdt.exports=function(t,r,i){return new Ddt(t,r,i)};fc.plot=function(e,t){for(var r=this,i=t[r.id],n=!1,a=0;am?(g=u,w=u*m,M=(c-w)/n.h/2,b=[s[0],s[1]],_=[l[0]+M,l[1]-M]):(g=c/m,w=c,M=(u-g)/n.w/2,b=[s[0]+M,s[1]-M],_=[l[0],l[1]]),r.xLength2=g,r.yLength2=w,r.xDomain2=b,r.yDomain2=_;var x=r.xOffset2=n.l+n.w*b[0],T=r.yOffset2=n.t+n.h*(1-_[1]),A=r.radius=g/d,y=r.innerRadius=r.getHole(t)*A,E=r.cx=x-A*h[0],S=r.cy=T+A*h[3],C=r.cxx=E-x,k=r.cyy=S-T,D=a.side,F;D==="counterclockwise"?(F=D,D="top"):D==="clockwise"&&(F=D,D="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:D,_trueSide:F,domain:[y/n.w,A/n.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:b}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:_});var P=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",P).attr("transform",Gu(C,k)),i.frontplot.attr("transform",Gu(x,T)).call(H8.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),i.bg.attr("d",P).attr("transform",Gu(E,S)).call(OO.fill,t.bgcolor)};fc.mockAxis=function(e,t,r,i){var n=hs.extendFlat({},r,i);return Ekr(n,t,e),n};fc.mockCartesianAxis=function(e,t,r){var i=this,n=i.isSmith,a=r._id,o=hs.extendFlat({type:"linear"},r);Skr(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=i.sectorBBox,u=s[a],c=i.radialAxis._rl,f=(c[1]-c[0])/(1-i.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!n?function(l){return i.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};fc.doAutoRange=function(e,t){var r=this,i=r.gd,n=r.radialAxis,a=r.getRadial(t);kkr(i,n);var o=n.range;if(a.range=o.slice(),a._input.range=o.slice(),n._rl=[n.r2l(o[0],null,"gregorian"),n.r2l(o[1],null,"gregorian")],n.minallowed!==void 0){var s=n.r2l(n.minallowed);n._rl[0]>n._rl[1]?n._rl[1]=Math.max(n._rl[1],s):n._rl[0]=Math.max(n._rl[0],s)}if(n.maxallowed!==void 0){var l=n.r2l(n.maxallowed);n._rl[0]90&&c<=270&&(f.tickangle=180);var p=d?function(A){var y=BO(r,zO([A.x,0]));return Gu(y[0]-s,y[1]-l)}:function(A){return Gu(f.l2p(A.x)+o,0)},v=d?function(A){return Ikr(r,A.x,-1/0,1/0)}:function(A){return r.pathArc(f.r2p(A.x)+o)},m=Fdt(u);if(r.radialTickLayout!==m&&(n["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),h){f.setScale();var g=0,w=d?(f.tickvals||[]).filter(function(A){return A>=0}).map(function(A){return dh.tickText(f,A,!0,!1)}):dh.calcTicks(f),b=d?w:dh.clipEnds(f,w),_=dh.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(_=-_),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),dh.drawTicks(i,f,{vals:w,layer:n["radial-axis"],path:dh.makeTickPath(f,0,_),transFn:p,crisp:!1}),dh.drawGrid(i,f,{vals:b,layer:n["radial-grid"],path:v,transFn:hs.noop,crisp:!1}),dh.drawLabels(i,f,{vals:w,layer:n["radial-axis"],transFn:p,labelFns:dh.makeLabelFns(f,g)})}var M=r.radialAxisAngle=r.vangles?A3(Ldt(px(u.angle),r.vangles)):u.angle,x=Gu(s,l),T=x+sg(-M);j8(n["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:T}),j8(n["radial-grid"],h&&u.showgrid,{transform:d?"":x}),j8(n["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:T}).attr("stroke-width",u.linewidth).call(OO.stroke,u.linecolor)};fc.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this,n=i.gd,a=i.radius,o=i.cx,s=i.cy,l=i.getRadial(t),u=i.id+"title",c=0;if(l.title){var f=H8.bBox(i.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var p=r!==void 0?r:i.radialAxisAngle,v=px(p),m=Math.cos(v),g=Math.sin(v),w=o+a/2*m+c*g,b=s-a/2*g+c*m;i.layers["radial-axis-title"]=Ckr.draw(n,u,{propContainer:l,propName:i.id+".radialaxis.title.text",placeholder:Rkr(n,"Click to enter radial axis title"),attributes:{x:w,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}};fc.updateAngularAxis=function(e,t){var r=this,i=r.gd,n=r.layers,a=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 h=f?function(y){var E=BO(r,zO([0,y.x]));return Math.atan2(E[0]-s,E[1]-l)-Math.PI/2}:function(y){return c.t2g(y.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=A3(c.tick0),c.dtick=A3(c.dtick));var d=function(y){return Gu(s+a*Math.cos(y),l-a*Math.sin(y))},p=f?function(y){var E=BO(r,zO([0,y.x]));return Gu(E[0],E[1])}:function(y){return d(h(y))},v=f?function(y){var E=BO(r,zO([0,y.x])),S=Math.atan2(E[0]-s,E[1]-l)-Math.PI/2;return Gu(E[0],E[1])+sg(-A3(S))}:function(y){var E=h(y);return d(E)+sg(-A3(E))},m=f?function(y){return Pkr(r,y.x,0,1/0)}:function(y){var E=h(y),S=Math.cos(E),C=Math.sin(E);return"M"+[s+o*S,l-o*C]+"L"+[s+a*S,l-a*C]},g=dh.makeLabelFns(c,0),w=g.labelStandoff,b={};b.xFn=function(y){var E=h(y);return Math.cos(E)*w},b.yFn=function(y){var E=h(y),S=Math.sin(E)>0?.2:1;return-Math.sin(E)*(w+y.fontSize*S)+Math.abs(Math.cos(E))*(y.fontSize*Lkr)},b.anchorFn=function(y){var E=h(y),S=Math.cos(E);return Math.abs(S)<.1?"middle":S>0?"start":"end"},b.heightFn=function(y,E,S){var C=h(y);return-.5*(1+Math.sin(C))*S};var _=Fdt(u);r.angularTickLayout!==_&&(n["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=_);var M=f?[1/0].concat(c.tickvals||[]).map(function(y){return dh.tickText(c,y,!0,!1)}):dh.calcTicks(c);f&&(M[0].text="\u221E",M[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=M.map(h),hs.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(M=M.filter(function(y){return hs.isAngleInsideSector(h(y),r.sectorInRad)})),c.visible){var T=c.ticks==="inside"?-1:1,A=(c.linewidth||1)/2;dh.drawTicks(i,c,{vals:M,layer:n["angular-axis"],path:"M"+T*A+",0h"+T*c.ticklen,transFn:v,crisp:!1}),dh.drawGrid(i,c,{vals:M,layer:n["angular-grid"],path:m,transFn:hs.noop,crisp:!1}),dh.drawLabels(i,c,{vals:M,layer:n["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:b})}j8(n["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:Gu(s,l)}).attr("stroke-width",u.linewidth).call(OO.stroke,u.linecolor)};fc.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)}};fc.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,i=t.gd,n=t.layers,a=e._zoomlayer,o=dx.MINZOOM,s=dx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,p=t.sectorInRad,v=t.vangles,m=t.radialAxis,g=Hm.clampTiny,w=Hm.findXYatLength,b=Hm.findEnclosingVertexAngles,_=dx.cornerHalfWidth,M=dx.cornerLen/2,x,T,A=Gm.makeDragger(n,"path","maindrag",e.dragmode===!1?"none":"crosshair");T3.select(A).attr("d",t.pathSubplot()).attr("transform",Gu(c,f)),A.onmousemove=function(te){Mdt.hover(i,te,t.id),i._fullLayout._lasthover=A,i._fullLayout._hoversubplot=t.id},A.onmouseout=function(te){i._dragging||qO.unhover(i,te)};var y={element:A,gd:i,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},E,S,C,k,D,F,P,R,L;function I(te,ce){return Math.sqrt(te*te+ce*ce)}function B(te,ce){return I(te-h,ce-d)}function O(te,ce){return Math.atan2(d-ce,te-h)}function $(te,ce){return[te*Math.cos(ce),te*Math.sin(-ce)]}function Y(te,ce){if(te===0)return t.pathSector(2*_);var ge=M/te,Ce=ce-ge,be=ce+ge,he=Math.max(0,Math.min(te,l)),oe=he-_,Ee=he+_;return"M"+$(oe,Ce)+"A"+[oe,oe]+" 0,0,0 "+$(oe,be)+"L"+$(Ee,be)+"A"+[Ee,Ee]+" 0,0,1 "+$(Ee,Ce)+"Z"}function K(te,ce,ge){if(te===0)return t.pathSector(2*_);var Ce=$(te,ce),be=$(te,ge),he=g((Ce[0]+be[0])/2),oe=g((Ce[1]+be[1])/2),Ee,ye;if(he&&oe){var ue=oe/he,ee=-1/ue,ae=w(_,ue,he,oe);Ee=w(M,ee,ae[0][0],ae[0][1]),ye=w(M,ee,ae[1][0],ae[1][1])}else{var xe,re;oe?(xe=M,re=_):(xe=_,re=M),Ee=[[he-xe,oe-re],[he+xe,oe-re]],ye=[[he-xe,oe+re],[he+xe,oe+re]]}return"M"+Ee.join("L")+"L"+ye.reverse().join("L")+"Z"}function j(){C=null,k=null,D=t.pathSubplot(),F=!1;var te=i._fullLayout[t.id];P=OO.luminosity(te.bgcolor),R=Gm.makeZoombox(a,P,c,f,D),R.attr("fill-rule","evenodd"),L=Gm.makeCorners(a,c,f),ese(i)}function q(te,ce){return ce=Math.max(Math.min(ce,l),u),teo?(te-1&&te===1&&Fkr(ce,i,[t.xaxis],[t.yaxis],t.id,y),ge.indexOf("event")>-1&&Mdt.click(i,ce,t.id)}y.prepFn=function(te,ce,ge){var Ce=i._fullLayout.dragmode,be=A.getBoundingClientRect();i._fullLayout._calcInverseTransform(i);var he=i._fullLayout._invTransform;x=i._fullLayout._invScaleX,T=i._fullLayout._invScaleY;var oe=hs.apply3DTransform(he)(ce-be.left,ge-be.top);if(E=oe[0],S=oe[1],v){var Ee=Hm.findPolygonOffset(l,p[0],p[1],v);E+=h+Ee[0],S+=d+Ee[1]}switch(Ce){case"zoom":y.clickFn=Q,r||(v?y.moveFn=X:y.moveFn=U,y.doneFn=H,j(te,ce,ge));break;case"select":case"lasso":Dkr(te,ce,ge,y,Ce);break}},qO.init(y)};fc.updateRadialDrag=function(e,t,r){var i=this,n=i.gd,a=i.layers,o=i.radius,s=i.innerRadius,l=i.cx,u=i.cy,c=i.radialAxis,f=dx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=px(i.radialAxisAngle),p=c._rl,v=p[0],m=p[1],g=p[r],w=.75*(p[1]-p[0])/(1-i.getHole(t))/o,b,_,M;r?(b=l+(o+h)*Math.cos(d),_=u-(o+h)*Math.sin(d),M="radialdrag"):(b=l+(s-h)*Math.cos(d),_=u-(s-h)*Math.sin(d),M="radialdrag-inner");var x=Gm.makeRectDragger(a,M,"crosshair",-h,-h,f,f),T={element:x,gd:n};e.dragmode===!1&&(T.dragmode=!1),j8(T3.select(x),c.visible&&s0!=(r?E>v:E=90||n>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),n<=180&&a>=180||n>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),n<=270&&a>=270||n>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function Ldt(e,t){var r=function(n){return hs.angleDist(e,n)},i=hs.findIndexOfMin(t,r);return t[i]}function j8(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var rse=W((yni,Odt)=>{"use strict";var Bkr=Vl(),Pn=ec(),qkr=us().attributes,V0=it().extendFlat,Idt=ls().overrideAll,Rdt=Idt({color:Pn.color,showline:V0({},Pn.showline,{dflt:!0}),linecolor:Pn.linecolor,linewidth:Pn.linewidth,showgrid:V0({},Pn.showgrid,{dflt:!0}),gridcolor:Pn.gridcolor,gridwidth:Pn.gridwidth,griddash:Pn.griddash},"plot","from-root"),zdt=Idt({tickmode:Pn.minor.tickmode,nticks:Pn.nticks,tick0:Pn.tick0,dtick:Pn.dtick,tickvals:Pn.tickvals,ticktext:Pn.ticktext,ticks:Pn.ticks,ticklen:Pn.ticklen,tickwidth:Pn.tickwidth,tickcolor:Pn.tickcolor,ticklabelstep:Pn.ticklabelstep,showticklabels:Pn.showticklabels,labelalias:Pn.labelalias,minorloglabels:Pn.minorloglabels,showtickprefix:Pn.showtickprefix,tickprefix:Pn.tickprefix,showticksuffix:Pn.showticksuffix,ticksuffix:Pn.ticksuffix,showexponent:Pn.showexponent,exponentformat:Pn.exponentformat,minexponent:Pn.minexponent,separatethousands:Pn.separatethousands,tickfont:Pn.tickfont,tickangle:Pn.tickangle,tickformat:Pn.tickformat,tickformatstops:Pn.tickformatstops,layer:Pn.layer},"plot","from-root"),Bdt={visible:V0({},Pn.visible,{dflt:!0}),type:V0({},Pn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Pn.autotypenumbers,autorangeoptions:{minallowed:Pn.autorangeoptions.minallowed,maxallowed:Pn.autorangeoptions.maxallowed,clipmin:Pn.autorangeoptions.clipmin,clipmax:Pn.autorangeoptions.clipmax,include:Pn.autorangeoptions.include,editType:"plot"},autorange:V0({},Pn.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:V0({},Pn.minallowed,{editType:"plot"}),maxallowed:V0({},Pn.maxallowed,{editType:"plot"}),range:V0({},Pn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Pn.categoryorder,categoryarray:Pn.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Pn.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:V0({},Pn.title.text,{editType:"plot",dflt:""}),font:V0({},Pn.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Pn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};V0(Bdt,Rdt,zdt);var qdt={visible:V0({},Pn.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Pn.autotypenumbers,categoryorder:Pn.categoryorder,categoryarray:Pn.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:Pn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};V0(qdt,Rdt,zdt);Odt.exports={domain:qkr({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:Bkr.background},radialaxis:Bdt,angularaxis:qdt,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var Gdt=W((xni,Vdt)=>{"use strict";var UO=it(),Okr=ni(),Nkr=Da(),Ukr=q_(),Vkr=_c().getSubplotData,Gkr=Xx(),Hkr=vw(),jkr=wy(),$kr=Ty(),Wkr=_F(),Ykr=vM(),Xkr=NG(),Zkr=bw(),Udt=rse(),Kkr=Zoe(),VO=PO(),Ndt=VO.axisNames;function Jkr(e,t,r,i){var n=r("bgcolor");i.bgColor=Okr.combine(n,i.paper_bgcolor);var a=r("sector");r("hole");var o=Vkr(i.fullData,VO.name,i.id),s=i.layoutOut,l;function u(R,L){return r(l+"."+R,L)}for(var c=0;c{"use strict";var e8r=_c().getSubplotCalcData,t8r=it().counterRegex,r8r=tse(),jdt=PO(),$dt=jdt.attr,S3=jdt.name,Hdt=t8r(S3),Wdt={};Wdt[$dt]={valType:"subplotid",dflt:S3,editType:"calc"};function i8r(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[S3],n=0;n{"use strict";var{hovertemplateAttrs:a8r,texttemplateAttrs:o8r,templatefallbackAttrs:Xdt}=Ga(),HO=tn().extendFlat,s8r=g1(),G0=Ns(),l8r=Wa(),p6=G0.line;Zdt.exports={mode:G0.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:G0.text,texttemplate:o8r({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:Xdt({editType:"plot"}),hovertext:G0.hovertext,line:{color:p6.color,width:p6.width,dash:p6.dash,backoff:p6.backoff,shape:HO({},p6.shape,{values:["linear","spline"]}),smoothing:p6.smoothing,editType:"calc"},connectgaps:G0.connectgaps,marker:G0.marker,cliponaxis:HO({},G0.cliponaxis,{dflt:!1}),textposition:G0.textposition,textfont:G0.textfont,fill:HO({},G0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:s8r(),hoverinfo:HO({},l8r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:G0.hoveron,hovertemplate:a8r(),hovertemplatefallback:Xdt(),selected:G0.selected,unselected:G0.unselected}});var $O=W((wni,Qdt)=>{"use strict";var jO=it(),v6=$o(),u8r=bd(),c8r=jp(),Kdt=Nw(),f8r=$p(),h8r=y1(),d8r=v1().PTS_LINESONLY,p8r=$8();function v8r(e,t,r,i){function n(s,l){return jO.coerce(e,t,p8r,s,l)}var a=Jdt(e,t,i,n);if(!a){t.visible=!1;return}n("thetaunit"),n("mode",a{"use strict";var g8r=it(),ept=ji();tpt.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=i[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);n.rLabel=ept.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?g8r.rad2deg(t.theta):t.theta;return n.thetaLabel=ept.tickText(s,u,!0).text,n}});var npt=W((Ani,ipt)=>{"use strict";var rpt=sn(),m8r=Kn().BADNUM,y8r=ji(),x8r=wd(),_8r=x1(),b8r=w0(),w8r=Td().calcMarkerSize;ipt.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var T8r=$w(),apt=Kn().BADNUM;opt.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var A8r=Zw();function M8r(e,t,r,i){var n=A8r(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,lpt(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function lpt(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.rLabel=s.rLabel,i.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(n,i.rLabel),f.indexOf("theta")!==-1&&c(a,i.thetaLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("
")}}upt.exports={hoverPoints:M8r,makeHoverPointText:lpt}});var fpt=W((Eni,cpt)=>{"use strict";cpt.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:GO(),categories:["polar","symbols","showLegend","scatter-like"],attributes:$8(),supplyDefaults:$O().supplyDefaults,colorbar:Ac(),formatLabels:WO(),calc:npt(),plot:spt(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:YO().hoverPoints,selectPoints:w_(),meta:{}}});var dpt=W((kni,hpt)=>{"use strict";hpt.exports=fpt()});var ise=W((Fni,vpt)=>{"use strict";var ppt=$8(),{cliponaxis:Cni,hoveron:Dni}=ppt,S8r=Gse(ppt,["cliponaxis","hoveron"]),{connectgaps:E8r,line:{color:k8r,dash:C8r,width:D8r},fill:F8r,fillcolor:L8r,marker:P8r,textfont:I8r,textposition:R8r}=_E();vpt.exports=ma(fn({},S8r),{connectgaps:E8r,fill:F8r,fillcolor:L8r,line:{color:k8r,dash:C8r,editType:"calc",width:D8r},marker:P8r,textfont:I8r,textposition:R8r})});var ypt=W((Pni,mpt)=>{"use strict";var gpt=it(),nse=$o(),z8r=$O().handleRThetaDefaults,B8r=bd(),q8r=jp(),O8r=$p(),N8r=y1(),U8r=v1().PTS_LINESONLY,V8r=ise();mpt.exports=function(t,r,i,n){function a(s,l){return gpt.coerce(t,r,V8r,s,l)}var o=z8r(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var G8r=WO();xpt.exports=function(t,r,i){var n=t.i;return"r"in t||(t.r=r._r[n]),"theta"in t||(t.theta=r._theta[n]),G8r(t,r,i)}});var wpt=W((Rni,bpt)=>{"use strict";var H8r=wd(),j8r=Td().calcMarkerSize,$8r=kb(),W8r=ji(),Y8r=C2().TOO_MANY_POINTS;bpt.exports=function(t,r){var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var X8r=nR(),Z8r=YO().makeHoverPointText;function K8r(e,t,r,i){var n=e.cd,a=n[0].t,o=a.r,s=a.theta,l=X8r.hoverPoints(e,t,r,i);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],h=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,Z8r(f,h,c,u),l}}Tpt.exports={hoverPoints:K8r}});var Spt=W((Bni,Mpt)=>{"use strict";Mpt.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:GO(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:ise(),supplyDefaults:ypt(),colorbar:Ac(),formatLabels:_pt(),calc:wpt(),hoverPoints:Apt().hoverPoints,selectPoints:VQ(),meta:{}}});var Ept=W((qni,ase)=>{"use strict";var J8r=lR(),Q8r=sn(),eCr=Hee(),tCr=OQ(),XO=kb(),ZO=it(),rCr=C2().TOO_MANY_POINTS,iCr={};ase.exports=function(t,r,i){if(i.length){var n=r.radialAxis,a=r.angularAxis,o=tCr(t,r);return i.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,p=c.opts,v,m=h.slice(),g=d.slice();for(v=0;v=rCr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=w),p.line&&w.length>1&&ZO.extendFlat(p.line,XO.linePositions(t,u,w)),p.text&&(ZO.extendFlat(p.text,{positions:w},XO.textPosition(t,u,p.text,p.marker)),ZO.extendFlat(p.textSel,{positions:w},XO.textPosition(t,u,p.text,p.markerSel)),ZO.extendFlat(p.textUnsel,{positions:w},XO.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=b,c.y=_,c.rawx=b,c.rawy=_,c.r=h,c.theta=d,c.positions=w,c._scene=o,c.index=o.count,o.count++}}),eCr(t,r,i)}};ase.exports.reglPrecompiled=iCr});var Dpt=W((Oni,Cpt)=>{"use strict";var kpt=Spt();kpt.plot=Ept();Cpt.exports=kpt});var Lpt=W((Nni,Fpt)=>{"use strict";Fpt.exports=Dpt()});var ose=W((Uni,Ppt)=>{"use strict";var{hovertemplateAttrs:nCr,templatefallbackAttrs:aCr}=Ga(),g6=tn().extendFlat,vx=$8(),gx=w1();Ppt.exports={r:vx.r,theta:vx.theta,r0:vx.r0,dr:vx.dr,theta0:vx.theta0,dtheta:vx.dtheta,thetaunit:vx.thetaunit,base:g6({},gx.base,{}),offset:g6({},gx.offset,{}),width:g6({},gx.width,{}),text:g6({},gx.text,{}),hovertext:g6({},gx.hovertext,{}),marker:oCr(),hoverinfo:vx.hoverinfo,hovertemplate:nCr(),hovertemplatefallback:aCr(),selected:gx.selected,unselected:gx.unselected};function oCr(){var e=g6({},gx.marker);return delete e.cornerradius,e}});var sse=W((Vni,Ipt)=>{"use strict";Ipt.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Bpt=W((Gni,zpt)=>{"use strict";var Rpt=it(),sCr=$O().handleRThetaDefaults,lCr=rL(),uCr=ose();zpt.exports=function(t,r,i,n){function a(s,l){return Rpt.coerce(t,r,uCr,s,l)}var o=sCr(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),lCr(t,r,a,i,n),Rpt.coerceSelectionMarkerOpacity(r,a)}});var Opt=W((Hni,qpt)=>{"use strict";var cCr=it(),fCr=sse();qpt.exports=function(e,t,r){var i={},n;function a(l,u){return cCr.coerce(e[n]||{},t[n],fCr,l,u)}for(var o=0;o{"use strict";var Npt=bc().hasColorscale,Upt=Zc(),hCr=it().isArrayOrTypedArray,dCr=DM(),pCr=b_().setGroupPositions,vCr=w0(),gCr=yi().traceIs,mCr=it().extendFlat;function yCr(e,t){for(var r=e._fullLayout,i=t.subplot,n=r[i].radialaxis,a=r[i].angularaxis,o=n.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var Gpt=vi(),KO=sn(),m6=it(),_Cr=Ji(),use=RO();Hpt.exports=function(t,r,i){var n=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=bCr(r),c=r.layers.frontplot.select("g.barlayer");m6.makeTraceGroups(c,i,"trace bars").each(function(){var f=Gpt.select(this),h=m6.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(m6.identity);d.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(p){var v=Gpt.select(this),m=p.rp0=s.c2p(p.s0),g=p.rp1=s.c2p(p.s1),w=p.thetag0=l.c2g(p.p0),b=p.thetag1=l.c2g(p.p1),_;if(!KO(m)||!KO(g)||!KO(w)||!KO(b)||m===g||w===b)_="M0,0Z";else{var M=s.c2g(p.s1),x=(w+b)/2;p.ct=[a.c2p(M*Math.cos(x)),o.c2p(M*Math.sin(x))],_=u(m,g,w,b)}m6.ensureSingle(v,"path").attr("d",_)}),_Cr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function bCr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(i,n,a,o){var s,l;m6.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=use.findEnclosingVertexAngles(s,e.vangles)[0],c=use.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return use.pathPolygonAnnulus(i,n,s,l,f,t,r)}:function(i,n,a,o){return m6.pathAnnulus(i,n,a,o,t,r)}}});var Wpt=W((Wni,$pt)=>{"use strict";var wCr=Ds(),cse=it(),TCr=c5().getTraceColor,ACr=cse.fillText,MCr=YO().makeHoverPointText,SCr=RO().isPtInsidePolygon;$pt.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?SCr:cse.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+i*i))),p=Math.atan2(i,r);s.range[0]>s.range[1]&&(p+=Math.PI);var v=function(b){return c(d,p,[b.rp0,b.rp1],[b.thetag0,b.thetag1],u)?f+Math.min(1,Math.abs(b.thetag1-b.thetag0)/h)-1+(b.rp1-d)/(b.rp1-b.rp0)-1:1/0};if(wCr.getClosest(n,v,t),t.index!==!1){var m=t.index,g=n[m];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var w=cse.extendFlat({},g,{r:g.s,theta:g.p});return ACr(g,a,t),MCr(w,a,o,t),t.hovertemplate=a.hovertemplate,t.color=TCr(a,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var Xpt=W((Yni,Ypt)=>{"use strict";Ypt.exports={moduleType:"trace",name:"barpolar",basePlotModule:GO(),categories:["polar","bar","showLegend"],attributes:ose(),layoutAttributes:sse(),supplyDefaults:Bpt(),supplyLayoutDefaults:Opt(),calc:lse().calc,crossTraceCalc:lse().crossTraceCalc,plot:jpt(),colorbar:Ac(),formatLabels:WO(),style:Ed().style,styleOnSelect:Ed().styleOnSelect,hoverPoints:Wpt(),selectPoints:f5(),meta:{}}});var Kpt=W((Xni,Zpt)=>{"use strict";Zpt.exports=Xpt()});var fse=W((Zni,Jpt)=>{"use strict";Jpt.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var hse=W((Kni,rvt)=>{"use strict";var ECr=Vl(),ll=ec(),kCr=us().attributes,mx=it().extendFlat,Qpt=ls().overrideAll,evt=Qpt({color:ll.color,showline:mx({},ll.showline,{dflt:!0}),linecolor:ll.linecolor,linewidth:ll.linewidth,showgrid:mx({},ll.showgrid,{dflt:!0}),gridcolor:ll.gridcolor,gridwidth:ll.gridwidth,griddash:ll.griddash},"plot","from-root"),tvt=Qpt({ticklen:ll.ticklen,tickwidth:mx({},ll.tickwidth,{dflt:2}),tickcolor:ll.tickcolor,showticklabels:ll.showticklabels,labelalias:ll.labelalias,showtickprefix:ll.showtickprefix,tickprefix:ll.tickprefix,showticksuffix:ll.showticksuffix,ticksuffix:ll.ticksuffix,tickfont:ll.tickfont,tickformat:ll.tickformat,hoverformat:ll.hoverformat,layer:ll.layer},"plot","from-root"),CCr=mx({visible:mx({},ll.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:mx({},ll.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},evt,tvt),DCr=mx({visible:mx({},ll.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ll.ticks,editType:"calc"},evt,tvt);rvt.exports={domain:kCr({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:ECr.background},realaxis:CCr,imaginaryaxis:DCr,editType:"calc"}});var avt=W((Jni,nvt)=>{"use strict";var y6=it(),FCr=ni(),LCr=Da(),PCr=q_(),ICr=_c().getSubplotData,RCr=Ty(),zCr=wy(),BCr=vM(),qCr=i1(),x6=hse(),dse=fse(),ivt=dse.axisNames,OCr=UCr(function(e){return y6.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function NCr(e,t,r,i){var n=r("bgcolor");i.bgColor=FCr.combine(n,i.paper_bgcolor);var a=ICr(i.fullData,dse.name,i.id),o=i.layoutOut,s;function l(M,x){return r(s+"."+M,x)}for(var u=0;u{"use strict";var VCr=_c().getSubplotCalcData,GCr=it().counterRegex,HCr=tse(),svt=fse(),lvt=svt.attr,E3=svt.name,ovt=GCr(E3),uvt={};uvt[lvt]={valType:"subplotid",dflt:E3,editType:"calc"};function jCr(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[E3],n=0;n{"use strict";var{hovertemplateAttrs:WCr,texttemplateAttrs:YCr,templatefallbackAttrs:hvt}=Ga(),JO=tn().extendFlat,XCr=g1(),H0=Ns(),ZCr=Wa(),_6=H0.line;dvt.exports={mode:H0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:H0.text,texttemplate:YCr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:hvt({editType:"plot"}),hovertext:H0.hovertext,line:{color:_6.color,width:_6.width,dash:_6.dash,backoff:_6.backoff,shape:JO({},_6.shape,{values:["linear","spline"]}),smoothing:_6.smoothing,editType:"calc"},connectgaps:H0.connectgaps,marker:H0.marker,cliponaxis:JO({},H0.cliponaxis,{dflt:!1}),textposition:H0.textposition,textfont:H0.textfont,fill:JO({},H0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:XCr(),hoverinfo:JO({},ZCr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:H0.hoveron,hovertemplate:WCr(),hovertemplatefallback:hvt(),selected:H0.selected,unselected:H0.unselected}});var gvt=W((tai,vvt)=>{"use strict";var QO=it(),b6=$o(),KCr=bd(),JCr=jp(),pvt=Nw(),QCr=$p(),eDr=y1(),tDr=v1().PTS_LINESONLY,rDr=pse();vvt.exports=function(t,r,i,n){function a(l,u){return QO.coerce(t,r,rDr,l,u)}var o=iDr(t,r,n,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var mvt=ji();yvt.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.realLabel=mvt.tickText(a.radialAxis,t.real,!0).text,n.imagLabel=mvt.tickText(a.angularAxis,t.imag,!0).text,n}});var wvt=W((iai,bvt)=>{"use strict";var _vt=sn(),nDr=Kn().BADNUM,aDr=wd(),oDr=x1(),sDr=w0(),lDr=Td().calcMarkerSize;bvt.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].realaxis,o=i[n].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var uDr=$w(),Tvt=Kn().BADNUM,cDr=Qoe(),fDr=cDr.smith;Avt.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var hDr=Zw();function dDr(e,t,r,i){var n=hDr(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,Svt(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function Svt(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.realLabel=s.realLabel,i.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(n,i.realLabel),f.indexOf("imag")!==-1&&c(a,i.imagLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("
")}}Evt.exports={hoverPoints:dDr,makeHoverPointText:Svt}});var Dvt=W((oai,Cvt)=>{"use strict";Cvt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:fvt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:pse(),supplyDefaults:gvt(),colorbar:Ac(),formatLabels:xvt(),calc:wvt(),plot:Mvt(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:kvt().hoverPoints,selectPoints:w_(),meta:{}}});var Lvt=W((sai,Fvt)=>{"use strict";Fvt.exports=Dvt()});var gse=W((lai,Pvt)=>{"use strict";var pDr=Wa(),vDr=Ga().hovertemplateAttrs,eN=_s().axisHoverFormat,vse=tn().extendFlat,gDr=Eo(),mDr=Du().dash,yDr=qy(),k3=Ns(),xDr={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:k3.x0,dx:k3.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:k3.y0,dy:k3.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:eN("x"),yhoverformat:eN("y"),uhoverformat:eN("u","noDate"),vhoverformat:eN("v","noDate"),hoverinfo:vse({},pDr.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:vDr({},{keys:["x","y","u","v","text","name"]}),text:k3.text,textposition:k3.textposition,textfont:k3.textfont,marker:vse({arrowsize:vse({},yDr.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:mDr,editType:"style"},editType:"calc"},gDr("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"}};Pvt.exports=xDr});var Rvt=W((uai,Ivt)=>{"use strict";var W8=it(),_Dr=gse(),bDr=x_(),wDr=bc().hasColorscale,TDr=Fu();Ivt.exports=function(t,r,i,n){function a(p,v){return W8.coerce(t,r,_Dr,p,v)}var o=bDr(t,r,n,a);if(!o){r.visible=!1;return}var s=a("u"),l=a("v");if(!W8.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var jm=it(),w6=ji(),Y8=sn(),zvt=Kn().BADNUM,ADr=Zc(),MDr=w0(),SDr=.97;Bvt.exports=function(t,r){let i=r._xA=w6.getFromId(t,r.xaxis||"x","x"),n=r._yA=w6.getFromId(t,r.yaxis||"y","y"),a=i.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),s=Math.min(a.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,h=-1/0;let d=r.marker.color,p=jm.isArrayOrTypedArray(d),v=r.u||[],m=r.v||[],{anchor:g,lengthmode:w,arrowref:b}=r,_=g==="tip",M=g==="center";for(var x=1/0,T=-1/0,A=1/0,y=-1/0,E=1/0,S=-1/0,C=1/0,k=-1/0,D=0,F=0;FT&&(T=a[F]),o[F]y&&(y=o[F]),IS&&(S=I),Bk&&(k=B);var O=Math.sqrt(I*I+B*B);if(O>c&&(c=O),Oh&&(h=$))}}else P.x=zvt,P.y=zvt}if(r._maxNorm=c,w==="scaled"||b==="paper"){let H=T-x,G=y-A;var Y;H===0&&G===0?Y=1:Y=(H+G+Math.sqrt((H-G)*(H-G)+4*D*H*G))/(2*(D-1)),Y*=SDr,r._scaleFactor=Y/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let K=new Array(s),j=new Array(s),q=new Array(s),J=new Array(s);for(var U,V,F=0;F{"use strict";Ovt.exports=function(t,r){}});var tN=W((hai,Gvt)=>{"use strict";var mse=vi(),Uvt=it(),X8=Ji(),EDr=Jo(),kDr=kg().DESELECTDIM;function yse(e,t){var r=t.marker||{},i=EDr.makeColorScaleFuncFromTrace(r);e.style("stroke",function(n){var a=r.color,o;if(Uvt.isArrayOrTypedArray(a)&&a.length>n.i&&isFinite(a[n.i]))o=a[n.i];else{var s=t.u&&t.u[n.i]||0,l=t.v&&t.v[n.i]||0;o=Math.sqrt(s*s+l*l)}return n.mcc=i(o),n.mcc})}function CDr(e){var t=mse.select(e).selectAll("g.trace.quiver");t.each(function(r){Vvt(e,r,mse.select(this))})}function DDr(e,t,r){Vvt(e,t,r)}function Vvt(e,t,r){var i=t[0].trace,n=i.marker||{},a=n.line||{},o=Uvt.isArrayOrTypedArray(n.color)?void 0:n.color,s=i._hasColorscale;if(r)if(i.selectedpoints){var l=(i.selected||{}).marker||{},u=(i.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(d){var p=mse.select(this),v=!d.selected,m=v?u.color:l.color,g=v?f.width!==void 0?f.width:a.width:c.width!==void 0?c.width:a.width;m?(X8.lineGroupStyle(p,g,m,a.dash),p.style("stroke-opacity",1)):(X8.lineGroupStyle(p,g,o,a.dash),s&&yse(p,i),p.style("stroke-opacity",v?kDr:1))}),X8.selectedTextStyle(r.selectAll("text"),i)}else{var h=r.selectAll("path.js-line");h.call(X8.lineGroupStyle,a.width,o,a.dash),s&&yse(h,i),h.style("stroke-opacity",1),X8.textPointStyle(r.selectAll("text"),i,e)}}Gvt.exports={style:CDr,styleOnSelect:DDr,colorscaleStroke:yse}});var $vt=W((dai,jvt)=>{"use strict";var kv=vi(),FDr=it(),Z8=Ji(),LDr=tN().colorscaleStroke,rN=Math.PI/12,PDr=5.8,IDr=1.5,RDr=.7;jvt.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0;if(s=n.selectAll("g.trace").data(i,function(h){return h[0].trace.uid}),s.enter().append("g").attr("class",function(h){return"trace quiver trace"+h[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=kv.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){n.selectAll("g.trace").each(function(h,d){Hvt(t,d,r,h,i,this,a)})})}else s.each(function(h,d){Hvt(t,d,r,h,i,this,a)});u&&s.exit().remove()};function Hvt(e,t,r,i,n,a,o){var s=i[0].trace,l=r.xaxis,u=r.yaxis;i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=kv.select(a);var c=kv.select(a).selectAll("g.lines").data([i]);c.enter().append("g").classed("lines",!0),Z8.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(i);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:h,maxNorm:d=0,arrowref:p}=s,v=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,m=s.marker.arrowsize;f.each(function(T){let A=kv.select(this);if(T.x===void 0||T.y===void 0){A.attr("d",null);return}let y=(p==="paper"?T._u*Math.sign(l._m):kv.round(l._m*T._u))*v,E=(p==="paper"?T._v*Math.sign(u._m):kv.round(u._m*T._v))*v,S=(s._input.marker||{}).arrowsize!==void 0;var C,k,D,F;h==="tip"?(C=l.c2p(T.x)-y,D=u.c2p(T.y)-E,k=l.c2p(T.x),F=u.c2p(T.y)):h==="center"?(C=l.c2p(T.x)-y/2,D=u.c2p(T.y)-E/2,k=l.c2p(T.x)+y/2,F=u.c2p(T.y)+E/2):(C=l.c2p(T.x),D=u.c2p(T.y),k=l.c2p(T.x)+y,F=u.c2p(T.y)+E),T._px0=C,T._py0=D,T._px1=k,T._py1=F;var P=s.marker.line.width;S||(P=Math.max(P,IDr));let R=Math.sqrt((k-C)*(k-C)+(F-D)*(F-D)),L=RDr*R,I=Math.min(PDr*m*P,L),B=Math.atan2(F-D,k-C),O=k-I*Math.cos(B-rN),$=F-I*Math.sin(B-rN),Y=k-I*Math.cos(B+rN),K=F-I*Math.sin(B+rN),j="M"+C+","+D+"L"+k+","+F+"L"+O+","+$+"L"+k+","+F+"L"+Y+","+K;A.attr("d",j)});var g=s.marker||{},w=g.line||{},b=FDr.isArrayOrTypedArray(g.color)?void 0:g.color;Z8.lineGroupStyle(f,w.width,b,w.dash),s._hasColorscale&&LDr(f,s);var _=kv.select(a).selectAll("g.text").data([i]);_.enter().append("g").classed("text",!0),Z8.setClipUrl(_,r.layerClipId,e);var M=_.selectAll("g.textpoint").data(i);if(M.enter().append("g").classed("textpoint",!0).append("text"),M.exit().remove(),M.each(function(T){var A=kv.select(this),y=Z8.translatePoint(T,A.select("text"),l,u);y||A.remove()}),M.selectAll("text").call(Z8.textPointStyle,s,e).each(function(T){var A=l.c2p(T.x),y=u.c2p(T.y);kv.select(this).selectAll("tspan.line").each(function(){kv.select(this).attr({x:A,y})})}),o&&o.duration>0){var x=kv.transition().duration(o.duration).ease(o.easing);f.transition(x).style("opacity",1)}}});var Xvt=W((pai,Yvt)=>{"use strict";var Wvt=it(),zDr=Ds(),BDr=Xw();function qDr(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 u=((e-r)*o+(t-i)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=i+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}Yvt.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=function(b){return b._px0===void 0?1/0:qDr(u,c,b._px0,b._py0,b._px1,b._py1)};if(zDr.getClosest(a,f,t),t.index!==!1){var h=a[t.index],d=s.c2p(h.x,!0),p=l.c2p(h.y,!0),v=Math.sqrt((u-d)*(u-d)+(c-p)*(c-p));t.index=h.i;var m=o.u?o.u[h.i]:0,g=o.v?o.v[h.i]:0,w="u: "+m+", v: "+g;return Wvt.extendFlat(t,{color:BDr(o,h),x0:d-3,x1:d+3,xLabelVal:h.x,y0:p-3,y1:p+3,yLabelVal:h.y,uLabelVal:m,vLabelVal:g,extraText:w,spikeDistance:v,hovertemplate:o.hovertemplate}),Wvt.fillText(h,o,t),[t]}}});var Jvt=W((vai,Kvt)=>{"use strict";var iN=ji(),Zvt=it();Kvt.exports=function(t,r,i){var n={},a={_fullLayout:i},o=iN.getFromTrace(a,r,"x"),s=iN.getFromTrace(a,r,"y"),l=t.x,u=t.y;n.xLabel=iN.tickText(o,o.c2l(l),!0).text,n.yLabel=iN.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,h=r.uhoverformat,d=r.vhoverformat;return n.uLabel=h?Zvt.numberFormat(h)(c):String(c),n.vLabel=d?Zvt.numberFormat(d)(f):String(f),n}});var e1t=W((gai,Qvt)=>{"use strict";Qvt.exports=function(t,r,i,n,a){return t.x=r.x,t.y=r.y,t.u=i.u?i.u[a]:void 0,t.v=i.v?i.v[a]:void 0,t}});var r1t=W((mai,t1t)=>{"use strict";t1t.exports={moduleType:"trace",name:"quiver",basePlotModule:dl(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:gse(),supplyDefaults:Rvt(),calc:qvt(),crossTraceCalc:Nvt(),plot:$vt(),style:tN().style,styleOnSelect:tN().styleOnSelect,hoverPoints:Xvt(),formatLabels:Jvt(),eventData:e1t(),selectPoints:w_(),colorbar:Ac(),animatable:!0,meta:{}}});var n1t=W((yai,i1t)=>{"use strict";i1t.exports=r1t()});var ff=W((xai,o1t)=>{var aN=qu();function a1t(){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={}}aN(a1t.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=(e!=null&&e.year?e.calendar():typeof i=="string"?this.instance(i,n):i)||this.instance(),i.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 i="",n=0;r>0;){var a=r%10;i=(a===0?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return i.indexOf(e[1]+t[1])===0&&(i=i.substr(1)),i||e[0]}}});function xse(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(ua.local.invalidDate||ua.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function nN(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}aN(xse.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(ua.local.invalidDate||ua.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(ua.local.differentCalendars||ua.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?"-":"")+nN(Math.abs(this.year()),4)+"-"+nN(this.month(),2)+"-"+nN(this.day(),2)}});function _se(){this.shortYearCutoff="+10"}aN(_se.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new xse(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.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,ua.local.invalidYear||ua.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+nN(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,ua.local.invalidMonth||ua.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,ua.local.invalidMonth||ua.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.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,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,ua.local.invalidDate||ua.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 i=e.toJD()+t*(r==="w"?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),n=e.day(),s=function(c){for(;of-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(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)))):r==="m"&&(s(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(t[0]===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],a=r<0?-1:1;t=this._add(e,r*n[0]+a*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,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);var i=r==="y"?t:e.year(),n=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||e!==0;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=n-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.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 ua=o1t.exports=new a1t;ua.cdate=xse;ua.baseCalendar=_se;ua.calendars.gregorian=bse});var s1t=W(()=>{var wse=qu(),hc=ff();wse(hc.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"});hc.local=hc.regionalOptions[""];wse(hc.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});wse(hc.baseCalendar.prototype,{UNIX_EPOCH:hc.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:hc.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 hc.local.invalidFormat||hc.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var i=r.dayNamesShort||this.local.dayNamesShort,n=r.dayNames||this.local.dayNames,a=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(_,M){for(var x=1;b+x1},c=function(_,M,x,T){var A=""+M;if(u(_,T))for(;A.length1},w=function(C,k){var D=g(C,k),F=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(C)+1],P=new RegExp("^-?\\d{1,"+F+"}"),R=t.substring(A).match(P);if(!R)throw(hc.local.missingNumberAt||hc.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=R[0].length,parseInt(R[0],10)},b=this,_=function(){if(typeof s=="function"){g("m");var C=s.call(b,t.substring(A));return A+=C.length,C}return w("m")},M=function(C,k,D,F){for(var P=g(C,F)?D:k,R=0;R-1){h=1,d=p;for(var S=this.daysInMonth(f,h);d>S;S=this.daysInMonth(f,h))h++,d-=S}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,i,n){r&&typeof r!="object"&&(n=i,i=r,r=null),typeof i!="string"&&(n=i,i="");var a=this,o=function(s){try{return a.parseDate(i,s,n)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.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:a.today().add(e,"d"):a.newDate(e),e}})});var l1t=W(()=>{var yx=ff(),ODr=qu(),Tse=yx.instance();function oN(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oN.prototype=new yx.baseCalendar;ODr(oN.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(UDr);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),a=""+this.toChineseMonth(i,n);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(i,n)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(VDr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\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"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(GDr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),i;if(isNaN(r))t[0]==="\u95F0"&&(i=!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 n=t[t.length-1];i=n==="i"||n==="I"}var a=this.toMonthIndex(e,r,i);return a},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 i=this.intercalaryMonth(e),n=r&&t!==i;if(n||t<1||t>12)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return i?!r&&t<=i?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),i=r?12:11;if(t<0||t>i)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;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 i=this._validateYear(e,yx.local.invalidyear),n=_x[i-_x[0]],a=n>>9&4095,o=n>>5&15,s=n&31,l;l=Tse.newDate(a,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=xx[e-xx[0]],i=r>>13,n=i?12:11;if(t>n)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,a,r,yx.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var n=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=jDr(e,a,r,n);return Tse.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=Tse.fromJD(e),r=HDr(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(NDr),r=this._validateYear(+t[1]),i=+t[2],n=!!t[3],a=this.toMonthIndex(r,i,n),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var i=e.year(),n=e.month(),a=this.isIntercalaryMonth(i,n),o=this.toChineseMonth(i,n),s=Object.getPrototypeOf(oN.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var NDr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,UDr=/^\d?\d[iI]?/m,VDr=/^闰?十?[一二三四五六七八九]?月/m,GDr=/^闰?十?[一二三四五六七八九]?/m;yx.calendars.chinese=oN;var xx=[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],_x=[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 HDr(e,t,r,i){var n,a;if(typeof e=="object")n=e,a=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");n={year:e,month:t,day:r},a=i||{}}var u=_x[n.year-_x[0]],c=n.year<<9|n.month<<5|n.day;a.year=c>=u?n.year:n.year-1,u=_x[a.year-_x[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,p,v=new Date(f,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-v)/(24*3600*1e3));var g=xx[a.year-xx[0]],w;for(w=0;w<13;w++){var b=g&1<<12-w?30:29;if(p>13;return!_||w<_?(a.isIntercalary=!1,a.month=1+w):w===_?(a.isIntercalary=!0,a.month=w):(a.isIntercalary=!1,a.month=w),a.day=1+p,a}function jDr(e,t,r,i,n){var a,o;if(typeof e=="object")o=e,a=t||{};else{var s=typeof e=="number"&&e>=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 i=="object"?(c=!1,a=i):(c=!!i,a=n||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=xx[o.year-xx[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var v=0;v>9&4095,b=g>>5&15,_=g&31,M=new Date(w,b-1,_+f);return a.year=M.getFullYear(),a.month=1+M.getMonth(),a.day=M.getDate(),a}});var u1t=W(()=>{var C3=ff(),$Dr=qu();function Ase(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ase.prototype=new C3.baseCalendar;$Dr(Ase.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,C3.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,C3.local.invalidYear||C3.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(e,t){var r=this._validate(e,t,this.minDay,C3.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 i=this._validate(e,t,r,C3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.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 i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});C3.calendars.coptic=Ase});var c1t=W(()=>{var $m=ff(),WDr=qu();function Mse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Mse.prototype=new $m.baseCalendar;WDr(Mse.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,$m.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$m.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$m.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(e,t){var r=this._validate(e,t,this.minDay,$m.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return(i.day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return{century:YDr[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),r=i.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,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var YDr={20:"Fruitbat",21:"Anchovy"};$m.calendars.discworld=Mse});var f1t=W(()=>{var D3=ff(),XDr=qu();function Sse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Sse.prototype=new D3.baseCalendar;XDr(Sse.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,D3.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,D3.local.invalidYear||D3.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(e,t){var r=this._validate(e,t,this.minDay,D3.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 i=this._validate(e,t,r,D3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.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 i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});D3.calendars.ethiopian=Sse});var h1t=W(()=>{var bx=ff(),ZDr=qu();function Ese(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ese.prototype=new bx.baseCalendar;ZDr(Ese.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,bx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,sN(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,bx.local.invalidYear),this._leapYear(e.year?e.year():e)?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(e){var t=this._validate(e,this.minMonth,this.minDay,bx.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,bx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&sN(this.daysInYear(e),10)===5?30:t===9&&sN(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 i=this._validate(e,t,r,bx.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,bx.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=e<=0?e+1:e,a=this.jdEpoch+this._delay1(n)+this._delay2(n)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=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 i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});function sN(e,t){return e-t*Math.floor(e/t)}bx.calendars.hebrew=Ese});var d1t=W(()=>{var K8=ff(),KDr=qu();function kse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kse.prototype=new K8.baseCalendar;KDr(kse.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,K8.local.invalidYear);return(t.year()*11+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(e,t){var r=this._validate(e,t,this.minDay,K8.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 i=this._validate(e,t,r,K8.local.invalidDate);return e=i.year(),t=i.month(),r=i.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),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});K8.calendars.islamic=kse});var p1t=W(()=>{var J8=ff(),JDr=qu();function Cse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Cse.prototype=new J8.baseCalendar;JDr(Cse.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,J8.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%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(e,t){var r=this._validate(e,t,this.minDay,J8.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 i=this._validate(e,t,r,J8.local.invalidDate);return e=i.year(),t=i.month(),r=i.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,i=Math.floor((r-122.1)/365.25),n=Math.floor(365.25*i),a=Math.floor((r-n)/30.6001),o=a-Math.floor(a<14?1:13),s=i-Math.floor(o>2?4716:4715),l=r-n-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});J8.calendars.julian=Cse});var g1t=W(()=>{var lp=ff(),QDr=qu();function Fse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Fse.prototype=new lp.baseCalendar;QDr(Fse.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,lp.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var i=Math.floor(e/20);return r+"."+i+"."+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&&i<0)throw"Invalid Mayan year";t=t*20+i}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,lp.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,lp.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate);return i.day()},weekDay:function(e,t,r){return this._validate(e,t,r,lp.local.invalidDate),!0},extraInfo:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate),n=i.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){e-=this.jdEpoch;var t=Dse(e+8+340,365);return[Math.floor(t/20)+1,Dse(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[v1t(e+20,20),v1t(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate);return i.day()+i.month()*20+i.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),i=e%20;return this.newDate(t,r,i)}});function Dse(e,t){return e-t*Math.floor(e/t)}function v1t(e,t){return Dse(e-1,t)+1}lp.calendars.mayan=Fse});var y1t=W(()=>{var F3=ff(),e7r=qu();function Lse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Lse.prototype=new F3.baseCalendar;var m1t=F3.instance("gregorian");e7r(Lse.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,F3.local.invalidYear||F3.regionalOptions[""].invalidYear);return m1t.leapYear(t.year()+(t.year()<1?1:0)+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(e,t){var r=this._validate(e,t,this.minDay,F3.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(n,t,r){var i=this._validate(n,t,r,F3.local.invalidMonth),n=i.year();n<0&&n++;for(var a=i.day(),o=1;o=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)}});F3.calendars.nanakshahi=Lse});var x1t=W(()=>{var L3=ff(),t7r=qu();function Pse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Pse.prototype=new L3.baseCalendar;t7r(Pse.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 i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,L3.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[e][i];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,L3.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 i=this._validate(e,t,r,L3.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=L3.instance(),a=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&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=n.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],n.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=L3.instance(),r=t.fromJD(e),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++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var T6=ff(),r7r=qu();function uN(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function lN(e){var t=e-475;e<0&&t++;var r=.242197,i=r*t,n=r*(t+1),a=i-Math.floor(i),o=n-Math.floor(n);return a>o}uN.prototype=new T6.baseCalendar;r7r(uN.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,T6.local.invalidYear);return lN(t.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(e,t){var r=this._validate(e,t,this.minDay,T6.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 i=this._validate(e,t,r,T6.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=0;if(e>0)for(var a=1;a0?e-1:e)*365+n+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,lN(r)?30:29)&&(r++,r===0&&r++);var i=e-this.toJD(r,1,1)+1,n=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),a=e-this.toJD(r,n,1)+1;return this.newDate(r,n,a)}});T6.calendars.persian=uN;T6.calendars.jalali=uN});var b1t=W(()=>{var P3=ff(),i7r=qu(),cN=P3.instance();function Ise(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ise.prototype=new P3.baseCalendar;i7r(Ise.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,P3.local.invalidYear),r=this._t2gYear(t.year());return cN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,P3.local.invalidYear),n=this._t2gYear(i.year());return cN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,P3.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(n,t,r){var i=this._validate(n,t,r,P3.local.invalidDate),n=this._t2gYear(i.year());return cN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=cN.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)}});P3.calendars.taiwan=Ise});var w1t=W(()=>{var I3=ff(),n7r=qu(),fN=I3.instance();function Rse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Rse.prototype=new I3.baseCalendar;n7r(Rse.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,I3.local.invalidYear),r=this._t2gYear(t.year());return fN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,I3.local.invalidYear),n=this._t2gYear(i.year());return fN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I3.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(n,t,r){var i=this._validate(n,t,r,I3.local.invalidDate),n=this._t2gYear(i.year());return fN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=fN.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)}});I3.calendars.thai=Rse});var T1t=W(()=>{var R3=ff(),a7r=qu();function zse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}zse.prototype=new R3.baseCalendar;a7r(zse.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,R3.local.invalidYear);return this.daysInYear(t.year())===355},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(e,t){for(var r=this._validate(e,t,this.minDay,R3.local.invalidMonth),i=r.toJD()-24e5+.5,n=0,a=0;ai)return wx[n]-wx[n-1];n++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,R3.local.invalidDate),n=12*(i.year()-1)+i.month()-15292,a=i.day()+wx[n-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var n=r+15292,a=Math.floor((n-1)/12),o=a+1,s=n-12*a,l=t-wx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var i=R3.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(e=e.year!=null?e.year:e,i=e>=1276&&e<=1500),i},_validate:function(e,t,r,i){var n=R3.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw i.replace(/\{0\}/,this.local.name);return n}});R3.calendars.ummalqura=zse;var wx=[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 M1t=W((Zai,A1t)=>{"use strict";A1t.exports=ff();s1t();l1t();u1t();c1t();f1t();h1t();d1t();p1t();g1t();y1t();x1t();_1t();b1t();w1t();T1t()});var L1t=W((Kai,F1t)=>{"use strict";var E1t=M1t(),Q8=it(),k1t=Kn(),o7r=k1t.EPOCHJD,s7r=k1t.ONEDAY,Ose={valType:"enumerated",values:Q8.sortObjectKeys(E1t.calendars),editType:"calc",dflt:"gregorian"},C1t=function(e,t,r,i){var n={};return n[r]=Ose,Q8.coerce(e,t,n,r,i)},l7r=function(e,t,r,i){for(var n=0;n{"use strict";P1t.exports=L1t()});var p7r=W((Qai,z1t)=>{var R1t=B4e();R1t.register([OTe(),S6e(),UAe(),lMe(),wMe(),ySe(),FSe(),xEe(),YEe(),Dke(),m8e(),GPe(),LIe(),Tze(),fBe(),VBe(),hqe(),SOe(),jOe(),uNe(),bNe(),RNe(),ZNe(),hUe(),XVe(),vGe(),zXe(),zZe(),OKe(),fJe(),flt(),Slt(),Zlt(),uct(),Pct(),pft(),zht(),s0t(),k0t(),edt(),pdt(),dpt(),Lpt(),Kpt(),Lvt(),n1t(),I1t()]);z1t.exports=R1t});return p7r();})(); /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ /*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */ /*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ /*! Bundled license information: native-promise-only/lib/npo.src.js: (*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org *) polybooljs/index.js: (* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) object-assign/index.js: (* object-assign (c) Sindre Sorhus @license MIT *) maplibre-gl/dist/maplibre-gl-shared.mjs: maplibre-gl/dist/maplibre-gl.mjs: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt *) */ window.Plotly = Plotly; return Plotly; }));